mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
discardBlockComment sets lexerState->disableMacroArgs = true, like discardComment
This commit is contained in:
@@ -926,11 +926,12 @@ void lexer_DumpStringExpansions(void)
|
|||||||
static void discardBlockComment(void)
|
static void discardBlockComment(void)
|
||||||
{
|
{
|
||||||
dbgPrint("Discarding block comment\n");
|
dbgPrint("Discarding block comment\n");
|
||||||
|
lexerState->disableMacroArgs = true;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
switch (nextChar()) {
|
switch (nextChar()) {
|
||||||
case EOF:
|
case EOF:
|
||||||
error("Unterminated block comment\n");
|
error("Unterminated block comment\n");
|
||||||
return;
|
goto finish;
|
||||||
case '/':
|
case '/':
|
||||||
if (peek(0) == '*') {
|
if (peek(0) == '*') {
|
||||||
warning(WARNING_NESTED_COMMENT,
|
warning(WARNING_NESTED_COMMENT,
|
||||||
@@ -940,13 +941,15 @@ static void discardBlockComment(void)
|
|||||||
case '*':
|
case '*':
|
||||||
if (peek(0) == '/') {
|
if (peek(0) == '/') {
|
||||||
shiftChars(1);
|
shiftChars(1);
|
||||||
return;
|
goto finish;
|
||||||
}
|
}
|
||||||
/* fallthrough */
|
/* fallthrough */
|
||||||
default:
|
default:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
finish:
|
||||||
|
lexerState->disableMacroArgs = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Function to discard all of a line's comments */
|
/* Function to discard all of a line's comments */
|
||||||
|
|||||||
Reference in New Issue
Block a user