mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-27 13:32:08 +00:00
Track local label scope, string equated as .. (#1504)
This commit is contained in:
@@ -1,6 +1,33 @@
|
||||
section "period", rom0
|
||||
SECTION "period", ROM0
|
||||
|
||||
global1: db 1
|
||||
.local db 2
|
||||
. db 3 ; this...
|
||||
global1 db 4 ; ...expands to this
|
||||
assert !def(.) && !def(..)
|
||||
|
||||
global1:
|
||||
assert !strcmp("{.}", "global1") && !def(..)
|
||||
|
||||
.local1:
|
||||
assert !strcmp("{.}", "global1") && !strcmp("{..}", "global1.local1")
|
||||
|
||||
global1.local2:
|
||||
assert !strcmp("{.}", "global1") && !strcmp("{..}", "global1.local2")
|
||||
|
||||
global2:
|
||||
assert !strcmp("{.}", "global2") && !def(..)
|
||||
|
||||
.local1:
|
||||
assert !strcmp("{.}", "global2") && !strcmp("{..}", "global2.local1")
|
||||
|
||||
LOAD "load", WRAM0
|
||||
assert !def(.) && !def(..)
|
||||
|
||||
wGlobal1:
|
||||
assert !strcmp("{.}", "wGlobal1") && !def(..)
|
||||
|
||||
.wLocal1:
|
||||
assert !strcmp("{.}", "wGlobal1") && !strcmp("{..}", "wGlobal1.wLocal1")
|
||||
|
||||
wGlobal2:
|
||||
assert !strcmp("{.}", "wGlobal2") && !def(..)
|
||||
|
||||
ENDL
|
||||
assert !strcmp("{.}", "global2") && !strcmp("{..}", "global2.local1")
|
||||
|
||||
Reference in New Issue
Block a user