Reduce some more deep nesting

This commit is contained in:
Rangi42
2025-07-15 17:41:32 -04:00
parent 5aec36350b
commit ee29579d3e
4 changed files with 69 additions and 60 deletions

View File

@@ -149,14 +149,15 @@ static void alreadyDefinedError(Symbol const &sym, char const *asType) {
fprintf(stderr, " as %s", asType);
}
dumpFilename(sym);
if (sym.type == SYM_EQUS) {
if (std::string const &contents = *sym.getEqus(); isValidIdentifier(contents)) {
fprintf(
stderr,
"\n (should it be {interpolated} to define its contents \"%s\"?)",
contents.c_str()
);
}
if (sym.type != SYM_EQUS) {
return;
}
if (std::string const &contents = *sym.getEqus(); isValidIdentifier(contents)) {
fprintf(
stderr,
"\n (should it be {interpolated} to define its contents \"%s\"?)",
contents.c_str()
);
}
});
}