rubysolo/dentaku

some edge case statements don't return Dentaku error

a5-stable opened this issue · 1 comments

Greetings.
I know they rarely happen, but sometimes I want to deal with them.
these statements now return NoMethodError instead of Dentaku Error.

# Dentaku::Calculator.new.ast("()")
# parser.rb:41:in `consume': undefined method `peek' for nil:NilClass (NoMethodError)

# Dentaku::Calculator.new.ast("(})")
# parser.rb:44:in `consume': undefined method `min_param_count' for Dentaku::AST::Grouping:Class (NoMethodError)

I tried to fix it at #278.