diff options
Diffstat (limited to 'tnslc/simple.tnsl')
-rw-r--r-- | tnslc/simple.tnsl | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/tnslc/simple.tnsl b/tnslc/simple.tnsl index ea517d4..5ef7946 100644 --- a/tnslc/simple.tnsl +++ b/tnslc/simple.tnsl @@ -1,15 +1,34 @@ {}uint8 str1 = "abcd" +struct Stress { + int i +} + +struct Test { + Stress s +} + +/; s_call () [Stress] + Stress a + a.i = 1 + return a +;/ + /; 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 will have garbage values in r8 and r9 asm "mov r8, rcx" asm "mov r9, rdx" - ~uint8 a = ~str1{0} + Stress test + Test stress + + test.i = 1 + + stress.s = s_call() # return 3 - return a` + return stress.s.i ;/ |