summaryrefslogtreecommitdiff
path: root/tnslc/simple.tnsl
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2023-03-25 14:43:01 -0400
committerKyle Gunger <kgunger12@gmail.com>2023-03-25 14:43:01 -0400
commit6e5d990783caf5630fe75d847b8f7f5559bf5e94 (patch)
tree563c4abaa0e3b23951c3529a6b420328dea78060 /tnslc/simple.tnsl
parent72fa7d598bfe67e9a12c695648243f031f5e1aaf (diff)
Pre-generate function signatures in modules
Diffstat (limited to 'tnslc/simple.tnsl')
-rw-r--r--tnslc/simple.tnsl22
1 files changed, 20 insertions, 2 deletions
diff --git a/tnslc/simple.tnsl b/tnslc/simple.tnsl
index d871e92..d996c1b 100644
--- a/tnslc/simple.tnsl
+++ b/tnslc/simple.tnsl
@@ -2,17 +2,35 @@
{}uint8 str1 = "abcd"
{}uint8 str2 = "abcd"
+/; method Test
+ /; wamba
+ ;/
+;/
+
+struct Test {
+ int i, j, k
+}
+
/; call_me [int]
return 4
;/
/; main (int argc, ~~uint argv) [int]
# On windows, the first two arguments are passed in RCX and RDX, so we need to
- # update their positions here or else tnsl willhave garbage values in r8 and r9
+ # update their positions here or else tnsl will have garbage values in r8 and r9
asm "mov r8, rcx"
asm "mov r9, rdx"
# If on linux, you would use rdi and rsi instead of rcx and rdx, respectively
+ Test m
+ ~int i = ~m.i
+ i{1} = 3
+
+ /; if (argc > 8)
+ argc = 90
+ ;/
+
+ call_me()
# return the number of arguments
- return argc
+ return m.j
;/