Allow defining local labels for another scope (#1159)

fix #1157 for the following source code

```
section "hSAVE_locals",HRAM
func3.hSpam: ds 1  ; no longer produces an error
;.hEggs: ds 1      ; uncomment this to see the new error

section "demo",ROM0
func3:
  ldh a, [.hSpam]
  ret
```

Remove two errors:
- `Not currently in the scope of 'func3'`
- `Local label 'func3.hSpam' in main scope`

Add one error:
- `Relative local label '.hSpam' in main scope`

Co-authored-by: Rangi <35663410+Rangi42@users.noreply.github.com>
This commit is contained in:
Damian Yerrick
2023-08-19 20:29:53 -04:00
committed by GitHub
parent e634888a50
commit e1f0a13e5a
8 changed files with 16 additions and 45 deletions

View File

@@ -1,3 +1,3 @@
error: local-without-parent.asm(2):
Local label '.test' in main scope
Unqualified local label '.test' in main scope
error: Assembly aborted (1 error)!