From 9222a5a73923407f6c0ab2c0d40bb58114b7a6ec Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Fri, 8 Apr 2022 02:20:14 -0400 Subject: [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 --- examples/basic.tnsl | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'examples') 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 ;/ -- cgit v1.2.3