[math] Better error for 2 + 2 4

This now reports "TOO_MANY_ARGS" instead of no error (and triggering
an assertion).

We might want to add a new error type or report the missing operator
before, but this is okay for now.
This commit is contained in:
Fabian Homborg
2018-02-26 14:00:29 +01:00
parent 6a38eb4f7d
commit f60e1549a9
4 changed files with 19 additions and 6 deletions

View File

@@ -19,3 +19,6 @@ math: Error: Expression is bogus
math: Error: Too few arguments
'sin()'
^
math: Error: Too many arguments
'2 + 2 4'
^