From c07f373b5377050cd52f96a77fbaf91b0e1ff623 Mon Sep 17 00:00:00 2001 From: marcobaye Date: Fri, 15 May 2020 15:33:00 +0000 Subject: [PATCH] added code for indexing (commented out atm) git-svn-id: https://svn.code.sf.net/p/acme-crossass/code-0/trunk@169 4df02467-bbd4-4a76-a152-e7ce94205b78 --- src/alu.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/alu.c b/src/alu.c index 50cec04..ec7cf07 100644 --- a/src/alu.c +++ b/src/alu.c @@ -868,7 +868,17 @@ static void expect_dyadic_operator(void) case ')': // closing parenthesis op = &ops_closing; goto get_byte_and_push_dyadic; - +/* + case '[': // indexing operator + GetByte(); // eat char + // two PUSH_OP in a row without checking could overrun the stack, so: + PUSH_OP(&ops_atindex); // first put high-priority dyadic on stack, + if (op_sp >= opstack_size) + enlarge_operator_stack(); + PUSH_OP(&ops_openindex); // then low-priority special ops_openindex + alu_state = STATE_EXPECT_ARG_OR_MONADIC_OP; + return; +*/ // Multi-character dyadic operators case '!': // "!=" if (GetByte() == '=') {