summaryrefslogtreecommitdiff
path: root/tnslc/syntax-playground.tnsl
diff options
context:
space:
mode:
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.