diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-11-07 19:08:15 +0100 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2012-11-07 19:08:15 +0100 |
commit | 99c8e92238986d00557ded56adc8495086d3c631 (patch) | |
tree | d85adc60f1880fc9ef9f231407a78414039698a5 /parser.cpp | |
parent | 408f8311dd071924d62ae10d0078e595e9137a9e (diff) | |
download | sciteco-99c8e92238986d00557ded56adc8495086d3c631.tar.gz |
fixed "," operator
instead of pushing a special number (which wasn't that special...), use a dedicated "new" operator which does not count as an argument operator, nor does it count as an ordinary operator and it is popped before any number (and "number" operator) is pushed
Diffstat (limited to 'parser.cpp')
-rw-r--r-- | parser.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -111,8 +111,7 @@ StateStart::custom(gchar chr) expressions.push_calc(Expressions::OP_ADD); break; case '-': - if (!expressions.args() || - expressions.peek_num() == G_MAXINT64) + if (!expressions.args()) expressions.set_num_sign(-expressions.num_sign); else expressions.push_calc(Expressions::OP_SUB); @@ -135,7 +134,7 @@ StateStart::custom(gchar chr) break; case ',': expressions.eval(); - expressions.push(G_MAXINT64); + expressions.push(Expressions::OP_NEW); break; /* * commands |