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:
@@ -125,16 +125,6 @@ void rpn_Symbol(struct Expression *expr, char const *tzSym)
|
||||
uint8_t *ptr = reserveSpace(expr, nameLen + 1);
|
||||
*ptr++ = RPN_SYM;
|
||||
memcpy(ptr, sym->name, nameLen);
|
||||
|
||||
/* RGBLINK assumes PC is at the byte being computed... */
|
||||
if (sym_IsPC(sym) && nPCOffset) {
|
||||
struct Expression pc = *expr, offset;
|
||||
|
||||
rpn_Number(&offset, nPCOffset);
|
||||
rpn_BinaryOp(RPN_SUB, expr, &pc, &offset);
|
||||
if (!rpn_isKnown(expr))
|
||||
expr->isSymbol = true;
|
||||
}
|
||||
} else {
|
||||
rpn_Number(expr, sym_GetConstantValue(tzSym));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user