From 99c8e92238986d00557ded56adc8495086d3c631 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 7 Nov 2012 19:08:15 +0100 Subject: 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 --- expressions.h | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'expressions.h') diff --git a/expressions.h b/expressions.h index 4a33632..0f4c9eb 100644 --- a/expressions.h +++ b/expressions.h @@ -110,6 +110,7 @@ public: OP_AND, // & OP_OR, // # // pseudo operators: + OP_NEW, OP_BRACE, OP_LOOP, OP_NUMBER @@ -130,11 +131,6 @@ public: gint64 push(gint64 number); - inline gint64 - peek_num(int index = 1) - { - return numbers.peek(index); - } gint64 pop_num(int index = 1); gint64 pop_num_calc(int index, gint64 imply); inline gint64 @@ -155,12 +151,7 @@ public: void eval(bool pop_brace = false); int args(void); - inline int - first_op(void) - { - int n = args() + 1; - return n > operators.items() ? 0 : n; - } + int first_op(void); void discard_args(void); } expressions; -- cgit v1.2.3