"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/util/PositionConfigureUtils.java" between
apache-groovy-src-3.0.8.zip and apache-groovy-src-3.0.9.zip

About: Groovy is an agile dynamic (scripting) language for the Java Platform. It has features similar to those of Python, Ruby, Perl, and Smalltalk. Source release.

PositionConfigureUtils.java  (apache-groovy-src-3.0.8):PositionConfigureUtils.java  (apache-groovy-src-3.0.9)
skipping to change at line 102 skipping to change at line 102
public static <T extends ASTNode> T configureAST(T astNode, GroovyParser.Gro ovyParserRuleContext ctx, ASTNode stop) { public static <T extends ASTNode> T configureAST(T astNode, GroovyParser.Gro ovyParserRuleContext ctx, ASTNode stop) {
Token start = ctx.getStart(); Token start = ctx.getStart();
astNode.setLineNumber(start.getLine()); astNode.setLineNumber(start.getLine());
astNode.setColumnNumber(start.getCharPositionInLine() + 1); astNode.setColumnNumber(start.getCharPositionInLine() + 1);
if (asBoolean(stop)) { if (asBoolean(stop)) {
astNode.setLastLineNumber(stop.getLastLineNumber()); astNode.setLastLineNumber(stop.getLastLineNumber());
astNode.setLastColumnNumber(stop.getLastColumnNumber()); astNode.setLastColumnNumber(stop.getLastColumnNumber());
} else { } else {
configureEndPosition(astNode, start); configureEndPosition(astNode, ctx.getStop());
} }
return astNode; return astNode;
} }
public static <T extends ASTNode> void configureEndPosition(T astNode, Token token) { public static <T extends ASTNode> void configureEndPosition(T astNode, Token token) {
Tuple2<Integer, Integer> endPosition = endPosition(token); Tuple2<Integer, Integer> endPosition = endPosition(token);
astNode.setLastLineNumber(endPosition.getV1()); astNode.setLastLineNumber(endPosition.getV1());
astNode.setLastColumnNumber(endPosition.getV2()); astNode.setLastColumnNumber(endPosition.getV2());
} }
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)