throwErrorIfDoesntMatch method
Implementation
void throwErrorIfDoesntMatch(TokenIterator iterator, TokenKind expected) {
if (iterator.current.kind != expected) {
throw UnexpectedToken(iterator.current.lexeme);
}
}
void throwErrorIfDoesntMatch(TokenIterator iterator, TokenKind expected) {
if (iterator.current.kind != expected) {
throw UnexpectedToken(iterator.current.lexeme);
}
}