mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-22 19:22:05 +00:00
Clean up label generation
Only check for localness when we already know we have a local
This commit is contained in:
21
test/asm/sym-scope.asm
Normal file
21
test/asm/sym-scope.asm
Normal file
@@ -0,0 +1,21 @@
|
||||
SECTION "Scopes", ROM0
|
||||
|
||||
; Neither of these should be created
|
||||
.tooSoon
|
||||
Nice.try
|
||||
|
||||
Parent:
|
||||
.loc
|
||||
dw Parent.loc ; This is what it should expand to
|
||||
Parent.explicit
|
||||
dw .explicit ; This should expand to the above
|
||||
|
||||
|
||||
; None of the two locals below should manage to be created, being in the wrong scopes
|
||||
; Note however that `Parentheses` begins with `Parent`, which string checks may fail to handle
|
||||
|
||||
Parentheses.check
|
||||
|
||||
Parentheses:
|
||||
|
||||
Parent.check
|
||||
Reference in New Issue
Block a user