Code

frontend/grammar: Check arithmetic expressions early.
authorSebastian Harl <sh@tokkee.org>
Sun, 1 Mar 2015 17:36:34 +0000 (18:36 +0100)
committerSebastian Harl <sh@tokkee.org>
Sun, 1 Mar 2015 17:36:34 +0000 (18:36 +0100)
commit125891926646e7e42dee777a15b79bb9acc2b84a
tree212ed6f9e677dd9fabd1bd884db2e666af7c2a65
parentb34c3a74068217ebeeb25954543d6693cc91c6c8
frontend/grammar: Check arithmetic expressions early.

Constant expressions are evaluated early. Thus, creating an expression object
may fail if there's a semantics error. Catch this early and report a (generic)
error to avoid propagating a NULL value.
src/frontend/grammar.y