diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2022-04-08 02:20:14 -0400 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2022-04-08 02:20:14 -0400 |
commit | 9222a5a73923407f6c0ab2c0d40bb58114b7a6ec (patch) | |
tree | 9bc0be024035c2d49a48111b9eaaba3ae44bf7ba /examples | |
parent | 2a30bcfb777acab52b4883c6fd44e04ae54b7f8b (diff) |
[EVAL] Control Flow
+ Added support for loop and if
+ Added support for break statements inside CF blocks
+ Fixed a bug with floats not parsing in specific cases
Diffstat (limited to 'examples')
-rw-r--r-- | examples/basic.tnsl | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/examples/basic.tnsl b/examples/basic.tnsl index 71d784d..b19532f 100644 --- a/examples/basic.tnsl +++ b/examples/basic.tnsl @@ -1,3 +1,18 @@ /; main [int] - ;return 0 + + ;int i = 0 + ;float f = 0.25 + + /; loop (i < 2) + + ;i = i + 1 + + /; if (f < 1) + + ;i = i + 1 + ;break + ;/ + ;/ + + ;return i ;/ |