match method

bool match(
  1. TokenIterator iterator,
  2. TokenKind expected
)

Implementation

bool match(TokenIterator iterator, TokenKind expected) {
  return iterator.current.kind == expected;
}