Implement order-independent purge (#1173)

Each symbol passed to purge is collected in a list before mass removal.
Fixes the issue described in gbdev/rgbds issue #1152.

---------

Co-authored-by: Rangi42 <[email protected]>
This commit is contained in:
QuinnandRangi42 authored and GitHub committed 2023-10-25 22:34:56 +02:00
1 parent 7a39e9e569
commit 944c5f0cd0
5 files changed
+62 -6

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
DEF prefix EQUS "cool"
DEF {prefix}banana EQU 1
ASSERT DEF(prefix)
ASSERT DEF(coolbanana)
; purging `prefix` should not prevent expanding it to purge `coolbanana`
PURGE prefix, {prefix}banana
ASSERT !DEF(prefix)
ASSERT !DEF(coolbanana)
View File
Whitespace-only changes.
View File
Whitespace-only changes.