diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2022-09-14 14:05:03 -0400 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2022-09-14 14:05:03 -0400 |
commit | 4e2e269fab3f5facedc6ec0131f132bd66c0aac4 (patch) | |
tree | dab2c175c4c81c3665703c800d07bb1d775821e0 /tnslc/dummy.tnsl | |
parent | 37d1e9fa02b27d1a6c56b4c95d31e6d2b9eab9ee (diff) |
Focus on ASM generation instead of raw binary
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 |