Method: Termular::Parser#command
- Defined in:
- lib/termular/parser.rb
#command ⇒ Object
138 139 140 141 142 143 144 145 146 |
# File 'lib/termular/parser.rb', line 138 def command assert_type next_token, :COMMAND case token[1] when "q"; AST::QuitCommand.new when "c"; AST::CartesianCommand.new expression: expression when "p"; AST::PolarCommand.new expression: expression when "opt"; option_command end end |