lib/monkey/parser.rb
def parse_statement
      case @cur_token.type
      when Token::LET
        parse_let_statement
      when Token::RETURN
        parse_return_statement
      end
    end
# Initialize the parser. It will use the provided lexer.
#
# @param [Lexer] lexer the lexer providing tokens
Initialize the parser. It will use the provided lexer.
Initialize the parser . It will use the provided lexer .
def parse_statement
      case @cur_token.type
      when Token::LET
        parse_let_statement
      when Token::RETURN
        parse_return_statement
      end
    end
def parse_statement case @cur_token . type when Token :: LET parse_let_statement when Token :: RETURN parse_return_statement end end
Initialize the parser.
Initialize the parser .
lexer the lexer providing tokens
lexer the lexer providing tokens