match method

bool match(
  1. List<TokenType> types
)

Implementation

bool match(List<TokenType> types) {
  if (types.contains(peek().type)) {
    advance();
    return true;
  }
  return false;
}