summaryrefslogtreecommitdiff
path: root/tnslc/syntax-playground.tnsl
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2023-05-13 22:21:58 -0400
committerKyle Gunger <kgunger12@gmail.com>2023-05-13 22:21:58 -0400
commite458ba03aab8a2eeac50bb133a6ad4847c0e79a5 (patch)
tree0121c8e7a610a32a938562f15d4f222617ae65a4 /tnslc/syntax-playground.tnsl
parent947e57dd8eb4b8fa32cbee369c1a5e808a709d5c (diff)
Add tmp variables, break calls
Diffstat (limited to 'tnslc/syntax-playground.tnsl')
-rw-r--r--tnslc/syntax-playground.tnsl25
1 files changed, 24 insertions, 1 deletions
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.