mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Rephrase error messages for consistency
This commit is contained in:
@@ -377,7 +377,7 @@ void lexer_IncIFDepth() {
|
||||
|
||||
void lexer_DecIFDepth() {
|
||||
if (lexerState->ifStack.empty())
|
||||
fatalerror("Found ENDC outside an IF construct\n");
|
||||
fatalerror("Found ENDC outside of an IF construct\n");
|
||||
|
||||
lexerState->ifStack.pop_front();
|
||||
}
|
||||
|
||||
@@ -484,7 +484,7 @@ if:
|
||||
elif:
|
||||
POP_ELIF const NEWLINE {
|
||||
if (lexer_GetIFDepth() == 0)
|
||||
fatalerror("Found ELIF outside an IF construct\n");
|
||||
fatalerror("Found ELIF outside of an IF construct\n");
|
||||
|
||||
if (lexer_RanIFBlock()) {
|
||||
if (lexer_ReachedELSEBlock())
|
||||
@@ -502,7 +502,7 @@ elif:
|
||||
else:
|
||||
POP_ELSE NEWLINE {
|
||||
if (lexer_GetIFDepth() == 0)
|
||||
fatalerror("Found ELSE outside an IF construct\n");
|
||||
fatalerror("Found ELSE outside of an IF construct\n");
|
||||
|
||||
if (lexer_RanIFBlock()) {
|
||||
if (lexer_ReachedELSEBlock())
|
||||
|
||||
@@ -71,7 +71,7 @@ void Expression::makeNumber(uint32_t value) {
|
||||
void Expression::makeSymbol(std::string const &symName) {
|
||||
clear();
|
||||
if (Symbol *sym = sym_FindScopedSymbol(symName); sym_IsPC(sym) && !sect_GetSymbolSection()) {
|
||||
error("PC has no value outside a section\n");
|
||||
error("PC has no value outside of a section\n");
|
||||
data = 0;
|
||||
} else if (!sym || !sym->isConstant()) {
|
||||
isSymbol = true;
|
||||
@@ -98,7 +98,7 @@ void Expression::makeBankSymbol(std::string const &symName) {
|
||||
if (Symbol const *sym = sym_FindScopedSymbol(symName); sym_IsPC(sym)) {
|
||||
// The @ symbol is treated differently.
|
||||
if (!currentSection) {
|
||||
error("PC has no bank outside a section\n");
|
||||
error("PC has no bank outside of a section\n");
|
||||
data = 1;
|
||||
} else if (currentSection->bank == (uint32_t)-1) {
|
||||
data = "Current section's bank is not known";
|
||||
|
||||
@@ -45,7 +45,7 @@ static int32_t Callback_NARG() {
|
||||
if (MacroArgs const *macroArgs = fstk_GetCurrentMacroArgs(); macroArgs) {
|
||||
return macroArgs->nbArgs();
|
||||
} else {
|
||||
error("_NARG does not make sense outside of a macro\n");
|
||||
error("_NARG has no value outside of a macro\n");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -145,11 +145,11 @@ Symbol *sym_FindScopedSymbol(std::string const &symName) {
|
||||
Symbol *sym_FindScopedValidSymbol(std::string const &symName) {
|
||||
Symbol *sym = sym_FindScopedSymbol(symName);
|
||||
|
||||
// `@` has no value outside a section
|
||||
// `@` has no value outside of a section
|
||||
if (sym_IsPC(sym) && !sect_GetSymbolSection()) {
|
||||
return nullptr;
|
||||
}
|
||||
// `_NARG` has no value outside a macro
|
||||
// `_NARG` has no value outside of a macro
|
||||
if (sym == _NARGSymbol && !fstk_GetCurrentMacroArgs()) {
|
||||
return nullptr;
|
||||
}
|
||||
@@ -205,9 +205,9 @@ uint32_t sym_GetPCValue() {
|
||||
Section const *sect = sect_GetSymbolSection();
|
||||
|
||||
if (!sect)
|
||||
error("PC has no value outside a section\n");
|
||||
error("PC has no value outside of a section\n");
|
||||
else if (sect->org == (uint32_t)-1)
|
||||
error("Expected constant PC but section is not fixed\n");
|
||||
error("PC does not have a constant value; the current section is not fixed\n");
|
||||
else
|
||||
return CallbackPC();
|
||||
return 0;
|
||||
|
||||
@@ -267,7 +267,7 @@ static int32_t computeRPNExpr(Patch const &patch, std::vector<Symbol> const &fil
|
||||
|
||||
case RPN_BANK_SELF:
|
||||
if (!patch.pcSection) {
|
||||
error(patch.src, patch.lineNo, "PC has no bank outside a section");
|
||||
error(patch.src, patch.lineNo, "PC has no bank outside of a section");
|
||||
isError = true;
|
||||
value = 1;
|
||||
} else {
|
||||
@@ -374,7 +374,7 @@ static int32_t computeRPNExpr(Patch const &patch, std::vector<Symbol> const &fil
|
||||
|
||||
if (value == -1) { // PC
|
||||
if (!patch.pcSection) {
|
||||
error(patch.src, patch.lineNo, "PC has no value outside a section");
|
||||
error(patch.src, patch.lineNo, "PC has no value outside of a section");
|
||||
value = 0;
|
||||
isError = true;
|
||||
} else {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
error: assert-nosect-bank.asm(1):
|
||||
PC has no bank outside a section
|
||||
PC has no bank outside of a section
|
||||
error: Assembly aborted (1 error)!
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
error: assert@-no-sect.asm(1):
|
||||
PC has no value outside a section
|
||||
PC has no value outside of a section
|
||||
error: Assembly aborted (1 error)!
|
||||
|
||||
@@ -3,5 +3,5 @@ error: bracketed-symbols.asm(16):
|
||||
error: bracketed-symbols.asm(20):
|
||||
"Label" does not have a constant value
|
||||
error: bracketed-symbols.asm(21):
|
||||
Expected constant PC but section is not fixed
|
||||
PC does not have a constant value; the current section is not fixed
|
||||
error: Assembly aborted (3 errors)!
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
error: const-and.asm(2):
|
||||
PC has no value outside a section
|
||||
PC has no value outside of a section
|
||||
error: const-and.asm(11):
|
||||
Expected constant expression: 'Aligned' is not constant at assembly time
|
||||
error: const-and.asm(17):
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
FATAL: endc-outside-if.asm(1):
|
||||
Found ENDC outside an IF construct
|
||||
Found ENDC outside of an IF construct
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
error: undefined-builtins.asm(3):
|
||||
PC has no value outside a section
|
||||
PC has no value outside of a section
|
||||
error: undefined-builtins.asm(4):
|
||||
Interpolated symbol "@" does not exist
|
||||
error: undefined-builtins.asm(8):
|
||||
_NARG does not make sense outside of a macro
|
||||
_NARG has no value outside of a macro
|
||||
error: undefined-builtins.asm(9):
|
||||
Interpolated symbol "_NARG" does not exist
|
||||
error: Assembly aborted (4 errors)!
|
||||
|
||||
Reference in New Issue
Block a user