From 6a64c6f33f345b88bf6f7fcbe18f7757706a9976 Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Sun, 14 May 2023 02:23:06 -0400 Subject: Change inc/dec --- tnslc/tnslc.tnsl | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'tnslc/tnslc.tnsl') diff --git a/tnslc/tnslc.tnsl b/tnslc/tnslc.tnsl index 1ad73f6..5248a29 100644 --- a/tnslc/tnslc.tnsl +++ b/tnslc/tnslc.tnsl @@ -3062,13 +3062,13 @@ ;return _eval_dot(tok, ~start, max, out, mov, current, scope, t, layer) ;/ - ;layer` = layer` + 1 ;Variable s1, s2 /; if (first == start) ;s1 = _eval_value(tok, first + 1, max, out, mov, current, scope, t, layer) ;; else if (first == max - 1) ;s1 = _eval_value(tok, start, first, out, mov, current, scope, t, layer) ;; else + ;layer` = layer` + 1 /; if (tok`{first}.cmp("=")) ;layer` = layer` - 1 ;/ @@ -3084,9 +3084,9 @@ ;/ ;log_debug(string_add("Calculated s2 as ", s2.sprint())) + ;layer` = layer` - 1 ;/ - ;layer` = layer` - 1 - + ;log_debug(string_add("Calculated s1 as ", s1.sprint())) /; if (tok`{first}.cmp("=")) @@ -3107,18 +3107,12 @@ # Inc and dec /; else if (tok`{first}.cmp("++") || tok`{first}.cmp("--")) - ;wk.data_type = s1.data_type - ;wk.set(s1, out) - /; if (tok`{first}.cmp("++")) ;s1.inc(out) ;; else ;s1.dec(out) ;/ - /; if (first == max - 1) - ;return wk - ;/ ;return s1 ;/ -- cgit v1.2.3