MCPcopy Create free account
hub / github.com/apache/groovy / setSourcePosition

Method setSourcePosition

src/main/java/org/codehaus/groovy/ast/ASTNode.java:169–174  ·  view source on GitHub ↗

Sets the source position information using another ASTNode as reference. Copies all position data (line/column start and end) from the source node, enabling consistent source location tracking for synthetic or transformed nodes. @param node the reference node providing position information

(final ASTNode node)

Source from the content-addressed store, hash-verified

167 * @param node the reference node providing position information
168 */
169 public void setSourcePosition(final ASTNode node) {
170 this.lineNumber = node.getLineNumber();
171 this.columnNumber = node.getColumnNumber();
172 this.lastLineNumber = node.getLastLineNumber();
173 this.lastColumnNumber = node.getLastColumnNumber();
174 }
175
176 /**
177 * Copies all node metadata from another ASTNode.

Callers 15

DOMethod · 0.45
createClosureClassMethod · 0.45
getAssertionStatementMethod · 0.45
getReturnStatementsMethod · 0.45
visitBlockStatementMethod · 0.45
andMethod · 0.45
orMethod · 0.45
transformMethod · 0.45
weaveMeasureMethod · 0.45
visitMethod · 0.45
visitMethod · 0.45

Calls 4

getLineNumberMethod · 0.45
getColumnNumberMethod · 0.45
getLastLineNumberMethod · 0.45
getLastColumnNumberMethod · 0.45

Tested by

no test coverage detected