allow method

bool allow()

Implementation

bool allow() {
  if (tokens.isEmpty) return true;
  Token previous = tokens.last;
  return (previous.type == TokenType.EQUAL ||
          previous.type == TokenType.LEFT_PAREN) ||
      previous.type == TokenType.COMMA ||
      previous.type == TokenType.COLON ||
      previous.type == TokenType.MINUS ||
      previous.type == TokenType.PLUS ||
      previous.type == TokenType.STAR ||
      previous.type == TokenType.SLASH ||
      previous.type == TokenType.PRINT;
}