Method: Termular::Parser#assert_type
- Defined in:
- lib/termular/parser.rb
#assert_type(token, *types) ⇒ Object
122 123 124 125 126 |
# File 'lib/termular/parser.rb', line 122 def assert_type(token, *types) unless types.include? token[0] raise SyntaxError, "Expected one of #{types.join ", "}, found #{token[0]}" end end |