Fix preprocessor concat with macro argument

This commit is contained in:
drmortalwombat 2023-03-08 18:39:40 +01:00
parent 4f89ad7680
commit 905afd6451
2 changed files with 7 additions and 1 deletions

View File

@ -145,7 +145,8 @@ const char* TokenNames[] =
"'#assign'", "'#assign'",
"'#repeat'", "'#repeat'",
"'#until'", "'#until'",
"'#embed'" "'#embed'",
"'##'"
}; };
@ -806,6 +807,9 @@ void Scanner::NextToken(void)
} }
else else
{ {
while (mTokenChar == ' ')
NextChar();
while (mTokenChar == '#' && mLine[mOffset] == '#') while (mTokenChar == '#' && mLine[mOffset] == '#')
{ {
mOffset++; mOffset++;

View File

@ -145,6 +145,8 @@ enum Token
TK_PREP_UNTIL, TK_PREP_UNTIL,
TK_PREP_EMBED, TK_PREP_EMBED,
TK_PREP_CONCAT,
NUM_TOKENS NUM_TOKENS
}; };