matches method
- Pattern pattern
Returns whether or not pattern
matches at the current position of the
string.
This doesn't move the scan pointer forward.
Implementation
bool matches(Pattern pattern) {
_lastMatch = pattern.matchAsPrefix(string, position);
_lastMatchPosition = _position;
return _lastMatch != null;
}