diff options
Diffstat (limited to 'tnslc')
-rw-r--r-- | tnslc/else.tnsl | 17 | ||||
-rw-r--r-- | tnslc/tnslc.tnsl | 6 |
2 files changed, 12 insertions, 11 deletions
diff --git a/tnslc/else.tnsl b/tnslc/else.tnsl index 8c4789d..a87aad3 100644 --- a/tnslc/else.tnsl +++ b/tnslc/else.tnsl @@ -1,14 +1,13 @@ /; main [int] - /; if (1 == 1) - /; if (1 == 0) - return 1 - ;; else if (1 > 0) - break - ;; else - return 0 - ;/ + int i = 1 + + + /; if (i == 3) + i = 1 + ;; else if (i == 1) + i = 10 ;/ - return 2 + return i ;/
\ No newline at end of file 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,10 +3471,11 @@ }, "") ;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`++] /; if (tok`{cur`}.cmp("(") || tok`{cur`}.cmp("[")) @@ -3504,6 +3505,7 @@ ;/ ;cur` = next_non_nl(tok, cur`) + ;cur`-- ;; else ;cf = cf.parent`.new_sub_cf("else") ;/ |