Skip to content

Commit

Permalink
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -412,7 +412,7 @@ public RubyNode visitBlockNode(org.jruby.ast.BlockNode node) {

length = Math.min(length + startIndex, sourceSection.getSource().getLength()) - startIndex;

ret = sequence(context, sourceSection.getSource().createSection(startIndex, length), translatedChildren);
ret = sequence(context, sourceSection.getSource().createSection("(identifier)", startIndex, length), translatedChildren);
}

return addNewlineIfNeeded(node, ret);
Original file line number Diff line number Diff line change
@@ -418,7 +418,7 @@ private SourceSection considerExtendingMethodToCoverEnd(SourceSection sourceSect
for (;;) {
final String lineAfterString = source.getCode(lineAfter).replaceAll("\\s+$","");
if (lineAfterString.equals(indentationOnFirstLine + "end") || lineAfterString.equals(indentationOnFirstLine + "}")) {
return source.createSection(sourceSection.getCharIndex(), sourceSection.getCharLength() + 1 + source.getLineLength(lineAfter));
return source.createSection("(identifier)", sourceSection.getCharIndex(), sourceSection.getCharLength() + 1 + source.getLineLength(lineAfter));
}
if (++lineAfter >= source.getLineCount()) {
return sourceSection;
Original file line number Diff line number Diff line change
@@ -114,7 +114,7 @@ public static SourceSection enclosing(SourceSection base, SourceSection... sourc
length = Math.min(length, base.getSource().getLength() - index);
length = Math.max(0, length);

return base.getSource().createSection(index, length);
return base.getSource().createSection("(identifier)", index, length);
}

public static SourceSection enclosing(SourceSection base, RubyNode[] sequence) {
@@ -160,7 +160,7 @@ private SourceSection translate(Source source, ISourcePosition sourcePosition) {
return parentSourceSection.peek();
}
} else {
return source.createSection(sourcePosition.getLine() + 1);
return source.createSection("(identifier)", sourcePosition.getLine() + 1);
}
}

Original file line number Diff line number Diff line change
@@ -135,7 +135,7 @@ public RubyRootNode parse(RubyContext context, Source source, Encoding defaultEn
throw new RaiseException(context.getCoreExceptions().syntaxError(message, currentNode));
}

final SourceSection sourceSection = source.createSection(0, source.getCode().length());
final SourceSection sourceSection = source.createSection("(identifier)", 0, source.getCode().length());

final InternalMethod parentMethod = parentFrame == null ? null : RubyArguments.getMethod(parentFrame);
LexicalScope lexicalScope;

0 comments on commit f031ac3

Please sign in to comment.