| 3598 | static int gParseMemberIdx = 0; |
| 3599 | |
| 3600 | void BfParser::ParseBlock(BfBlock* astNode, int depth, bool isInterpolate) |
| 3601 | { |
| 3602 | gParseBlockIdx++; |
| 3603 | int startParseBlockIdx = gParseBlockIdx; |
| 3604 | |
| 3605 | bool isAsmBlock = false; |
| 3606 | bool isTernary = false; |
| 3607 | bool forceAllowNext = false; |
| 3608 | |
| 3609 | SizedArray<BfAstNode*, 32> childArr; |
| 3610 | |
| 3611 | int parenDepth = 0; |
| 3612 | |
| 3613 | while (true) |
| 3614 | { |
| 3615 | if ((mSyntaxToken == BfSyntaxToken_Token) && (mToken == BfToken_Asm)) |
| 3616 | { |
| 3617 | if (isAsmBlock || mInAsmBlock) |
| 3618 | mPassInstance->Fail("Already inside an 'asm' block", astNode); |
| 3619 | else |
| 3620 | isAsmBlock = true; |
| 3621 | } |
| 3622 | |
| 3623 | NextToken(-1, isInterpolate && (parenDepth == 0) && (!forceAllowNext)); |
| 3624 | forceAllowNext = false; |
| 3625 | |
| 3626 | if (mPreprocessorIgnoredSectionNode != NULL) |
| 3627 | { |
| 3628 | if (mSyntaxToken != BfSyntaxToken_EOF) |
| 3629 | continue; |
| 3630 | mPreprocessorIgnoredSectionNode->SetSrcEnd(mSrcIdx); |
| 3631 | } |
| 3632 | |
| 3633 | if (mScanOnly) |
| 3634 | { |
| 3635 | if (mSyntaxToken == BfSyntaxToken_EOF) |
| 3636 | break; |
| 3637 | continue; |
| 3638 | } |
| 3639 | |
| 3640 | gParseMemberIdx++; |
| 3641 | int memberIdx = gParseMemberIdx; |
| 3642 | |
| 3643 | auto childNode = CreateNode(); |
| 3644 | if (childNode == NULL) |
| 3645 | break; |
| 3646 | if (mSyntaxToken == BfSyntaxToken_EOF) |
| 3647 | { |
| 3648 | if (astNode != 0) |
| 3649 | Fail("Unexpected end of file"); |
| 3650 | break; |
| 3651 | } |
| 3652 | |
| 3653 | if (mToken == BfToken_LBrace) |
| 3654 | { |
| 3655 | BfBlock* newBlock; |
| 3656 | BfInlineAsmStatement* asmBlock = nullptr; |
| 3657 | BfBlock* genBlock = nullptr; |
nothing calls this directly
no test coverage detected