private AST attachLast(AST t, Object last) { if ((t instanceof GroovySourceAST) && (last instanceof SourceInfo)) { SourceInfo lastInfo = (SourceInfo) last; GroovySourceAST node = (GroovySourceAST)t; node.setColumnLast(lastInfo.getColumn()); node.setLineLast(lastInfo.getLine()); // This is a good point to call node.setSnippet(), // but it bulks up the AST too much for production code. } return t; }
public void initialize(Token t) { super.initialize(t); line = t.getLine(); col = t.getColumn(); if (t instanceof SourceInfo) { SourceInfo info = (SourceInfo) t; lineLast = info.getLineLast(); colLast = info.getColumnLast(); } }
private static int getLineLast(ASTRuntimeException e) { final AST ast = e.getAst(); return (ast instanceof SourceInfo) ? ((SourceInfo)ast).getLineLast() : ast.getLine(); }
private static int getColumnLast(ASTRuntimeException e) { final AST ast = e.getAst(); return (ast instanceof SourceInfo) ? ((SourceInfo)ast).getColumnLast() : ast.getColumn()+1; } }
private AST attachLast(AST t, Object last) { if ((t instanceof GroovySourceAST) && (last instanceof SourceInfo)) { SourceInfo lastInfo = (SourceInfo) last; GroovySourceAST node = (GroovySourceAST)t; node.setColumnLast(lastInfo.getColumn()); node.setLineLast(lastInfo.getLine()); // This is a good point to call node.setSnippet(), // but it bulks up the AST too much for production code. } return t; }
public void initialize(Token t) { super.initialize(t); line = t.getLine(); col = t.getColumn(); if (t instanceof SourceInfo) { SourceInfo info = (SourceInfo) t; lineLast = info.getLineLast(); colLast = info.getColumnLast(); } }
private AST attachLast(AST t, Object last) { if ((t instanceof GroovySourceAST) && (last instanceof SourceInfo)) { SourceInfo lastInfo = (SourceInfo) last; GroovySourceAST node = (GroovySourceAST)t; node.setColumnLast(lastInfo.getColumn()); node.setLineLast(lastInfo.getLine()); // This is a good point to call node.setSnippet(), // but it bulks up the AST too much for production code. } return t; }
public void initialize(Token t) { super.initialize(t); line = t.getLine(); col = t.getColumn(); if (t instanceof SourceInfo) { SourceInfo info = (SourceInfo) t; lineLast = info.getLineLast(); colLast = info.getColumnLast(); } }
private AST attachLast(AST t, Object last) { if ((t instanceof GroovySourceAST) && (last instanceof SourceInfo)) { SourceInfo lastInfo = (SourceInfo) last; GroovySourceAST node = (GroovySourceAST)t; node.setColumnLast(lastInfo.getColumn()); node.setLineLast(lastInfo.getLine()); // This is a good point to call node.setSnippet(), // but it bulks up the AST too much for production code. } return t; }
public void initialize(Token t) { super.initialize(t); line = t.getLine(); col = t.getColumn(); if (t instanceof SourceInfo) { SourceInfo info = (SourceInfo) t; lineLast = info.getLineLast(); colLast = info.getColumnLast(); } }
private AST attachLast(AST t, Object last) { if ((t instanceof GroovySourceAST) && (last instanceof SourceInfo)) { SourceInfo lastInfo = (SourceInfo) last; GroovySourceAST node = (GroovySourceAST)t; node.setColumnLast(lastInfo.getColumn()); node.setLineLast(lastInfo.getLine()); // This is a good point to call node.setSnippet(), // but it bulks up the AST too much for production code. } return t; }
public void initialize(Token t) { super.initialize(t); line = t.getLine(); col = t.getColumn(); if (t instanceof SourceInfo) { SourceInfo info = (SourceInfo) t; lineLast = info.getLineLast(); colLast = info.getColumnLast(); } }