Example #1
0
 /**
  * Span the location range from {@code start} to {@code end}.
  *
  * @param start Start location.
  * @param end End location.
  */
 public final void span(ISourceLocation start, ISourceLocation end) {
   setSourcePath(start.getSourcePath());
   setStart(start.getStart());
   setEnd(end.getEnd());
   setLine(start.getLine());
   setColumn(start.getColumn());
   setEndLine(end.getEndLine());
   setEndColumn(end.getEndColumn());
 }
Example #2
0
  /** Copies source location information from another instance into this instance. */
  public final void setSourceLocation(ISourceLocation src) {
    assert src != null : "source location can't be null";

    this.start = src.getStart();
    this.end = src.getEnd();
    this.line = src.getLine();
    this.column = src.getColumn();
    this.endLine = src.getEndLine();
    this.endColumn = src.getEndColumn();
    this.sourcePath = src.getSourcePath();
  }