From a965d27f33c7d1cc69922fd8c94a02fe7dc4d889 Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Sun, 21 May 2023 00:46:04 -0400 Subject: Else if fixes --- tnslc/tnslc.tnsl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tnslc/tnslc.tnsl') diff --git a/tnslc/tnslc.tnsl b/tnslc/tnslc.tnsl index c642216..d5e1f7d 100644 --- a/tnslc/tnslc.tnsl +++ b/tnslc/tnslc.tnsl @@ -7,7 +7,7 @@ # 1 - Info (default) # 2 - Debugging information (useful for me, probably less for you) # 3 - Also logs the state changes of the log itself -;{}uint8 log_level = "1" +;{}uint8 log_level = "2" ;{}uint8 log_mode = "single" /; log_state({}uint8 new_state) @@ -3471,9 +3471,10 @@ }, "") ;outro = {"", "", ""} - ;condition = -1 + ;condition = 0 - 1 /; if (tok`{next_non_nl(tok, cur` + 1)}.cmp("if")) + ;cur` = next_non_nl(tok, cur` + 1) ;cur` = next_non_nl(tok, cur` + 1) ;cf = cf.parent`.new_sub_cf("elif") /; loop (cur` < len (tok`)) [cur`++] @@ -3504,6 +3505,7 @@ ;/ ;cur` = next_non_nl(tok, cur`) + ;cur`-- ;; else ;cf = cf.parent`.new_sub_cf("else") ;/ -- cgit v1.2.3