SpanScanner constructor

SpanScanner(String string, { dynamic sourceUrl, int position })

Creates a new SpanScanner that starts scanning from position.

sourceUrl is used as SourceLocation.sourceUrl for the returned FileSpans as well as for error reporting. It can be a String, a Uri, or null.

Implementation

SpanScanner(String string, {sourceUrl, int position})
    : _sourceFile = new SourceFile.fromString(string, url: sourceUrl),
      super(string, sourceUrl: sourceUrl, position: position);