mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Fixed IsMissingSemicolon and IsExpression for defers
This commit is contained in:
parent
e3b3089623
commit
23d8e8993b
1 changed files with 8 additions and 2 deletions
|
@ -767,7 +767,10 @@ BfAstNode* Beefy::BfNodeToNonTemporary(BfAstNode* node)
|
|||
bool BfAstNode::IsMissingSemicolon()
|
||||
{
|
||||
if (auto deferStmt = BfNodeDynCast<BfDeferStatement>(this))
|
||||
return BfNodeDynCastExact<BfBlock>(deferStmt->mTargetNode) == NULL;
|
||||
{
|
||||
if (BfNodeIsExact<BfBlock>(deferStmt->mTargetNode))
|
||||
return false;
|
||||
}
|
||||
if (auto stmt = BfNodeDynCast<BfCompoundStatement>(this))
|
||||
{
|
||||
if (auto repeatStmt = BfNodeDynCast<BfRepeatStatement>(this))
|
||||
|
@ -790,7 +793,10 @@ bool BfAstNode::IsMissingSemicolon()
|
|||
bool BfAstNode::IsExpression()
|
||||
{
|
||||
if (auto deferStmt = BfNodeDynCast<BfDeferStatement>(this))
|
||||
return BfNodeDynCastExact<BfBlock>(deferStmt->mTargetNode) == NULL;
|
||||
{
|
||||
if (BfNodeIsExact<BfBlock>(deferStmt->mTargetNode))
|
||||
return false;
|
||||
}
|
||||
if (auto block = BfNodeDynCast<BfBlock>(this))
|
||||
{
|
||||
if (block->mChildArr.mSize == 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue