match method

bool match(
  1. List<TokenType> types
)

Implementation

bool match(List<TokenType> types) {
  for (TokenType type in types) {
    if (check(type)) {
      advance();
      return true;
    }
  }
  return false;
}