matches method

  1. @override
bool matches(
  1. Pattern pattern
)
override

Returns whether or not pattern matches at the current position of the string.

This doesn't move the scan pointer forward.

Implementation

@override
bool matches(Pattern pattern) {
  if (!super.matches(pattern)) {
    _lastSpan = null;
    return false;
  }

  _lastSpan = _sourceFile.span(position, lastMatch!.end);
  return true;
}