diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-11-12 06:26:09 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-11-12 06:26:09 +0100 |
commit | 50de1043dc325c8e1adda94c6113607e741d4015 (patch) | |
tree | 46ffeb55fa3b5931bc1125858de6bf394487e5d4 /parser.cpp | |
parent | 59eb0628db77e1145db797406e4de9f97b70d8e2 (diff) | |
download | sciteco-50de1043dc325c8e1adda94c6113607e741d4015.tar.gz |
various arithmetic expression fixes: SUB must have higher precedence than ADD; fixed num_sign (unary minus) handling
Diffstat (limited to 'parser.cpp')
-rw-r--r-- | parser.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -412,6 +412,8 @@ StateStart::custom(gchar chr) case '(': BEGIN_EXEC(this); if (expressions.num_sign < 0) { + expressions.set_num_sign(1); + expressions.eval(); expressions.push(-1); expressions.push_calc(Expressions::OP_MUL); } |