NodeLocator constructor

NodeLocator(
  1. int startOffset,
  2. [int endOffset]
)

Initialize a newly created locator to locate an AstNode by locating the node within an AST structure that corresponds to the given range of characters (between the startOffset and endOffset in the source.

Implementation

NodeLocator(int startOffset, [int endOffset])
    : this._startOffset = startOffset,
      this._endOffset = endOffset ?? startOffset;