summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2020-09-21 13:31:39 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2020-09-21 13:31:39 -0400
commit9932fac52c0cac2e9e0e11c84dfdf99e0a87ebfb (patch)
treeff97b9288293614fefc6f3ed972c3db69cba6f6e /test
parenteea04e3327972f052dcfb8ae0854b77f87d3d52f (diff)
- Fixed some issues with how structs, and unions were
handled. - Added a function called fix_symtree(), which when called. will rearrange the symbol tree based on the order they're declared in by the token stream. The reason I wrote this, was to make sure the symbol tree could be printed correctly. - Optimized print_symtree() to now use tail recursion. - Started adding all of the SuB Suite's structs.
Diffstat (limited to 'test')
-rw-r--r--test/struct.s47
1 files changed, 45 insertions, 2 deletions
diff --git a/test/struct.s b/test/struct.s
index dce527d..33de1f1 100644
--- a/test/struct.s
+++ b/test/struct.s
@@ -11,9 +11,52 @@
why .word
.endstruct
.endunion
+ .union
+ alkjf .byte
+ lksfja .word
+ .struct a
+ asd .byte
+ dd .byte
+ .struct
+ sdd .byte
+ aas .byte
+ .union no
+ asd .byte
+ ss .word
+ .endunion
+ .endstruct
+ .endstruct
+ aad .byte
+ .endunion
why .word
.endstruct
+.struct oof
+ lol .word
+ .union
+ .struct asd
+ s .word
+ f .byte
+ e .word
+ .endstruct
+ .struct a
+ asd .byte
+ dd .byte
+ .struct
+ sdd .byte
+ aas .byte
+ .union no
+ asd .byte
+ ss .word
+ .endunion
+ .endstruct
+ .endstruct
+ as .word
+ ll .word
+ .endunion
+ ass .word
+.endstruct
+
.org 0
@@ -26,6 +69,6 @@ ldb #lol.asd.aa.lol
ldx #lol.asd.aa.why
ldy #lol.why
a
-l a
-v
+;l a
+;v
q