mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Resolve some TODO comments
- `out_PushSection` should not set `currentSection` to NULL because PUSHS, PUSHC, and PUSHO consistently keep the current section, charmap, and options, even though the stack has been pushed. - `Callback__FILE__` does not need to assert that `fileName` is not empty because `__FILE__`'s value is quoted, and can safely be empty. - `YY_FATAL_ERROR` and `YYLMAX` are not needed since the lexer is not generated with flex.
This commit is contained in:
@@ -417,7 +417,7 @@ void fstk_RunMacro(char const *macroName, struct MacroArgs *args)
|
||||
memcpy(dest, macro->name, macroNameLen + 1);
|
||||
|
||||
newContext((struct FileStackNode *)fileInfo);
|
||||
contextStack->lexerState = lexer_OpenFileView(macro->macro, macro->macroSize,
|
||||
contextStack->lexerState = lexer_OpenFileView("MACRO", macro->macro, macro->macroSize,
|
||||
macro->fileLine);
|
||||
if (!contextStack->lexerState)
|
||||
fatalerror("Failed to set up lexer for macro invocation\n");
|
||||
@@ -451,7 +451,7 @@ static bool newReptContext(int32_t reptLineNo, char *body, size_t size)
|
||||
/* Correct our line number, which currently points to the `ENDR` line */
|
||||
contextStack->fileInfo->lineNo = reptLineNo;
|
||||
|
||||
contextStack->lexerState = lexer_OpenFileView(body, size, reptLineNo);
|
||||
contextStack->lexerState = lexer_OpenFileView("REPT", body, size, reptLineNo);
|
||||
if (!contextStack->lexerState)
|
||||
fatalerror("Failed to set up lexer for REPT block\n");
|
||||
lexer_SetStateAtEOL(contextStack->lexerState);
|
||||
|
||||
Reference in New Issue
Block a user