1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Added [IgnoreErrors] block attribute

This commit is contained in:
Brian Fiete 2020-08-16 08:33:51 -07:00
parent 65d960a6e6
commit 99419097c5
16 changed files with 307 additions and 79 deletions

View file

@ -121,6 +121,11 @@ void BfStructuralVisitor::Visit(BfStatement* stmt)
Visit(stmt->ToBase());
}
void BfStructuralVisitor::Visit(BfAttributedStatement* attribStmt)
{
Visit(attribStmt->ToBase());
}
void BfStructuralVisitor::Visit(BfLabelableStatement* labelableStmt)
{
Visit(labelableStmt->ToBase());
@ -753,8 +758,11 @@ bool BfAstNode::IsMissingSemicolon()
else
return false;
}
if (auto attribExpr = BfNodeDynCastExact<BfAttributedStatement>(this))
return (attribExpr->mStatement == NULL) || (attribExpr->mStatement->IsMissingSemicolon());
if (auto stmt = BfNodeDynCast<BfStatement>(this))
return stmt->mTrailingSemicolon == NULL;
return stmt->mTrailingSemicolon == NULL;
return false;
}
@ -769,6 +777,7 @@ bool BfAstNode::IsExpression()
return false;
return block->mChildArr.GetLast()->IsExpression();
}
return IsA<BfExpression>();
}