mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 10:42:07 +00:00
Remove "EOF-newline" lexer hack
In preparation for an upcoming change Makes for nicer error messages, complaining about EOF instead of newlines The hack had to be kept for the lexer raw mode to avoid a bug; see the relevant code comment for more info.
This commit is contained in:
@@ -421,6 +421,10 @@ static int32_t computeRPNExpr(struct Patch const *patch,
|
||||
isError = true;
|
||||
} else {
|
||||
value = patch->pcOffset + patch->pcSection->org;
|
||||
// If the patch is an operand, PC is not at the patch's
|
||||
// location, but at the (opcode) byte right before it
|
||||
if (patch->isOperand)
|
||||
value--;
|
||||
}
|
||||
} else {
|
||||
symbol = getSymbol(fileSymbols, value);
|
||||
|
||||
Reference in New Issue
Block a user