check method

bool check(
  1. TokenType type
)

Implementation

bool check(TokenType type) {
  if (isAtEnd()) return false;
  return peek().type == type;
}