diff options
Diffstat (limited to 'tnslc/dummy.tnsl')
-rw-r--r-- | tnslc/dummy.tnsl | 42 |
1 files changed, 30 insertions, 12 deletions
diff --git a/tnslc/dummy.tnsl b/tnslc/dummy.tnsl index 12b082e..8fdb165 100644 --- a/tnslc/dummy.tnsl +++ b/tnslc/dummy.tnsl @@ -1,12 +1,30 @@ -;int a = 0x11 -;bool aaaa = false - -/; main - /; if (a !== 11) - ;tnsl.io.println(a) - ;/ - - /; loop (!aaaa) [a !== 17] - ;tnsl.io.println("Looping!") - ;/ -;/ +; struct Token { + int + token_type, + line, + col, + + ~{}charp + data +} + +;struct Node { + Token + # associated token to the node + tok, + + ~{}Node + # sub-nodes + sub +} + +;{}charp cnull = "a" + +/; main [int] + ;{}Node s = {} + ;Node n = {{1, 2, 3, ~cnull}, ~s} + ;s.append(n) + ;tnsl.io.println(~s) + ;tnsl.io.println(n.sub) + ;return 0 +;/
\ No newline at end of file |