Fix parse embed with hex skip or size setting

This commit is contained in:
drmortalwombat 2024-02-19 14:19:15 +01:00
parent 5e9df61ffc
commit e2f36bbb9a
2 changed files with 9 additions and 2 deletions

View File

@ -470,6 +470,11 @@ void Scanner::MarkSourceOnce(void)
mOnceDict->Insert(macro);
}
bool Scanner::IsIntegerToken(void) const
{
return mToken == TK_INTEGER || mToken == TK_INTEGERU || mToken == TK_INTEGERL || mToken == TK_INTEGERUL;
}
void Scanner::NextToken(void)
{
if (mReplay)
@ -885,12 +890,12 @@ void Scanner::NextPreToken(void)
mCompilerOptions &= ~COPT_PETSCII;
NextRawToken();
if (mToken == TK_INTEGER)
if (IsIntegerToken())
{
limit = int(mTokenInteger);
NextRawToken();
if (mToken == TK_INTEGER)
if (IsIntegerToken())
{
skip = int(mTokenInteger);
NextRawToken();

View File

@ -275,6 +275,8 @@ public:
uint64 mCompilerOptions;
bool IsIntegerToken(void) const;
void AddMacro(const Ident* ident, const char* value);
void MarkSourceOnce(void);
protected: