mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Suggest removing space before colon to define a label instead of invoking a macro
This commit is contained in:
@@ -417,6 +417,14 @@ void fstk_RunMacro(
|
||||
macroName.c_str(),
|
||||
defType
|
||||
);
|
||||
} else if (std::shared_ptr<std::string> firstArg = macroArgs->getArg(1);
|
||||
firstArg && firstArg->starts_with(':')) {
|
||||
error(
|
||||
"Undefined macro `%s` (did you mean a label \"%s%s\"?)",
|
||||
macroName.c_str(),
|
||||
macroName.c_str(),
|
||||
firstArg->starts_with("::") ? "::" : ":"
|
||||
);
|
||||
} else {
|
||||
error("Undefined macro `%s`", macroName.c_str());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user