Allow {symbol} interpolation outside of strings

Fixes #629

Closes #631
This commit is contained in:
Rangi authored and Eldred Habert committed 2020-12-13 23:53:16 +01:00
1 parent 5aabb915ec
commit ce58f6d6be
5 files changed
+76 -29

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
SECTION "Test", ROM0
NAME equs "ITEM"
FMT equs "d"
ZERO_NUM equ 0
ZERO_STR equs "0"
; Defines INDEX as 100
INDEX = 1{ZERO_STR}{{FMT}:ZERO_NUM}
; Defines ITEM_100 as "\"hundredth\""
{NAME}_{d:INDEX} equs "\"hundredth\""
; Prints "ITEM_100 is hundredth"
PRINTT STRCAT("{NAME}_{d:INDEX} is ", {NAME}_{d:INDEX}, "\n")
; Purges ITEM_100
PURGE {NAME}_{d:INDEX}
ASSERT !DEF({NAME}_{d:INDEX})
View File
Whitespace-only changes.
+1
View File
@@ -0,0 +1 @@
ITEM_100 is hundredth