Track local label scope, string equated as .. (#1504)

This commit is contained in:
Sylvie
2024-09-18 09:52:30 -04:00
committed by GitHub
parent 197f6cb0ba
commit 9ef2e43bf7
13 changed files with 167 additions and 67 deletions

View File

@@ -1,12 +1,18 @@
ASSERT !DEF(@) && !DEF(.)
ASSERT !DEF(@) && !DEF(.) && !DEF(..)
PURGE @, .
PURGE @, ., ..
SECTION "test", ROM0[42]
Foobar:
db 1
Foo:
db 2
.bar
db 3
PURGE @, .
PURGE @, ., ..
ASSERT DEF(@) && DEF(.) && DEF(Foobar)
ASSERT DEF(@) && DEF(.) && DEF(..) && DEF(Foo) && DEF(.bar)
PRINTLN "PC: {#05X:@}; label scope: \"{.}\"; {.}: {#05X:{.}}"
PRINTLN "PC: {#05X:@}"
PRINTLN "global scope: \"{.}\" ({#05X:{.}})"
PRINTLN "local scope: \"{..}\" ({#05X:{..}})"