@Override protected void addForLineNumber(int $line, java.util.List<AbstractAST> $result) { if (getLocation().getBeginLine() == $line) { $result.add(this); } ISourceLocation $l; $l = pre.getLocation(); if ($l.hasLineColumn() && $l.getBeginLine() <= $line && $l.getEndLine() >= $line) { pre.addForLineNumber($line, $result); } if ($l.getBeginLine() > $line) { return; } $l = expression.getLocation(); if ($l.hasLineColumn() && $l.getBeginLine() <= $line && $l.getEndLine() >= $line) { expression.addForLineNumber($line, $result); } if ($l.getBeginLine() > $line) { return; } $l = tail.getLocation(); if ($l.hasLineColumn() && $l.getBeginLine() <= $line && $l.getEndLine() >= $line) { tail.addForLineNumber($line, $result); } if ($l.getBeginLine() > $line) { return; } }
public IValue visitSourceLocation(ISourceLocation o) throws IOException { append('|'); append(o.getURI().toString()); append('|'); if (o.hasOffsetLength()) { append('('); append(Integer.toString(o.getOffset())); append(','); append(Integer.toString(o.getLength())); if (o.hasLineColumn()) { append(','); append('<'); append(Integer.toString(o.getBeginLine())); append(','); append(Integer.toString(o.getBeginColumn())); append('>'); append(','); append('<'); append(Integer.toString(o.getEndLine())); append(','); append(Integer.toString(o.getEndColumn())); append('>'); } append(')'); } return o; }