mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
\# will always be defined inside macros
This lets the case structure here match the other branches
This commit is contained in:
@@ -660,10 +660,13 @@ static std::shared_ptr<std::string> readMacroArg(char name) {
|
|||||||
return str;
|
return str;
|
||||||
} else if (name == '#') {
|
} else if (name == '#') {
|
||||||
MacroArgs *macroArgs = fstk_GetCurrentMacroArgs();
|
MacroArgs *macroArgs = fstk_GetCurrentMacroArgs();
|
||||||
auto str = macroArgs ? macroArgs->getAllArgs() : nullptr;
|
if (!macroArgs) {
|
||||||
if (!str) {
|
|
||||||
error("'\\#' cannot be used outside of a macro\n");
|
error("'\\#' cannot be used outside of a macro\n");
|
||||||
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto str = macroArgs->getAllArgs();
|
||||||
|
assume(str); // '\#' should always be defined (at least as an empty string)
|
||||||
return str;
|
return str;
|
||||||
} else if (name == '<') {
|
} else if (name == '<') {
|
||||||
uint32_t num = readBracketedMacroArgNum();
|
uint32_t num = readBracketedMacroArgNum();
|
||||||
|
|||||||
Reference in New Issue
Block a user