From e458ba03aab8a2eeac50bb133a6ad4847c0e79a5 Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Sat, 13 May 2023 22:21:58 -0400 Subject: Add tmp variables, break calls --- tnslc/syntax-playground.tnsl | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'tnslc/syntax-playground.tnsl') diff --git a/tnslc/syntax-playground.tnsl b/tnslc/syntax-playground.tnsl index 12aa895..651be62 100644 --- a/tnslc/syntax-playground.tnsl +++ b/tnslc/syntax-playground.tnsl @@ -25,6 +25,8 @@ ;/ ## END TEST 1 +## +## Thoughts: this is much better. ## TEST 2 - get '.' augment auto de-references pointers @@ -66,4 +68,25 @@ struct b { ref.ints.j = 9 ;/ -## END TEST 2 \ No newline at end of file +## END TEST 2 +## +## Thoughts: not sure, the . operator could become a little too ambiguous if this is added + +## Test 3: using [] for array indexing instead of {} + +:include "tnsl" +:using "tnsl" + +/; main ({}String args) [int] + int i = len args + String first = args[0] + + {}int list = {0, 1, 2, 3} + i = list[2] + + return i +;/ + +## End test 3 +## +## Thoughts: I'm not sure weather I like it better or not. -- cgit v1.2.3