diff options
author | John Wiegley <johnw@newartisans.com> | 2012-03-13 10:33:59 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-03-13 10:33:59 -0500 |
commit | 927d404ad5d145bbcc58e0a4f9ee5d5df0637160 (patch) | |
tree | 9328e2eeb0149833100571333ecfec1b554a9788 /src/op.cc | |
parent | e65fc729bc4d8adaa66b3fd702f93ef790155543 (diff) | |
download | fork-ledger-927d404ad5d145bbcc58e0a4f9ee5d5df0637160.tar.gz fork-ledger-927d404ad5d145bbcc58e0a4f9ee5d5df0637160.tar.bz2 fork-ledger-927d404ad5d145bbcc58e0a4f9ee5d5df0637160.zip |
Added a syntax error check
Diffstat (limited to 'src/op.cc')
-rw-r--r-- | src/op.cc | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -198,6 +198,9 @@ expr_t::ptr_op_t expr_t::op_t::compile(scope_t& scope, const int depth, } if (! result) { + if (! left()) + throw_(calc_error, _("Syntax error")); + ptr_op_t lhs(left()->compile(*scope_ptr, depth + 1, param_scope)); ptr_op_t rhs(kind > UNARY_OPERATORS && has_right() ? (kind == O_LOOKUP ? right() : |