mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Comptime debugging
This commit is contained in:
parent
bbb97d1490
commit
ff2e40e3bf
40 changed files with 6213 additions and 443 deletions
|
@ -720,7 +720,7 @@ BfBlock* BfParser::ParseInlineBlock(int spaceIdx, int endIdx)
|
|||
|
||||
while (true)
|
||||
{
|
||||
NextToken(endIdx + 1);
|
||||
NextToken(endIdx + 1, false, true);
|
||||
if (mSyntaxToken == BfSyntaxToken_HIT_END_IDX)
|
||||
{
|
||||
mSrcIdx = usedEndIdx;
|
||||
|
@ -1384,7 +1384,7 @@ double BfParser::ParseLiteralDouble()
|
|||
return strtod(buf, NULL);
|
||||
}
|
||||
|
||||
void BfParser::NextToken(int endIdx, bool outerIsInterpolate)
|
||||
void BfParser::NextToken(int endIdx, bool outerIsInterpolate, bool disablePreprocessor)
|
||||
{
|
||||
auto prevToken = mToken;
|
||||
|
||||
|
@ -2337,7 +2337,13 @@ void BfParser::NextToken(int endIdx, bool outerIsInterpolate)
|
|||
}
|
||||
break;
|
||||
case '#':
|
||||
HandlePreprocessor();
|
||||
if (disablePreprocessor)
|
||||
{
|
||||
TokenFail("Unexpected character");
|
||||
continue;
|
||||
}
|
||||
else
|
||||
HandlePreprocessor();
|
||||
if (mSyntaxToken == BfSyntaxToken_EOF)
|
||||
return;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue