Method: Logicality::Parser::SimpleParser#initialize
- Defined in:
- lib/logicality/parser/simple_parser.rb
#initialize(lexer) ⇒ SimpleParser
Returns a new instance of SimpleParser.
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/logicality/parser/simple_parser.rb', line 14 def initialize(lexer) @lexer = lexer @current_token = lexer.next_token if @current_token.nil? raise ArgumentError, 'Lexer must contain at least one token' end end |