MCPcopy Create free account
hub / github.com/beefytech/Beef / IsMissingSemicolon

Method IsMissingSemicolon

IDEHelper/Compiler/BfAst.cpp:802–826  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

800//////////////////////////////////////////////////////////////////////////
801
802bool BfAstNode::IsMissingSemicolon()
803{
804 if (auto deferStmt = BfNodeDynCast<BfDeferStatement>(this))
805 {
806 if (BfNodeIsExact<BfBlock>(deferStmt->mTargetNode))
807 return false;
808 }
809 if (auto stmt = BfNodeDynCast<BfCompoundStatement>(this))
810 {
811 if (auto repeatStmt = BfNodeDynCast<BfRepeatStatement>(this))
812 {
813 if (repeatStmt->mWhileToken == NULL)
814 return false;
815 }
816 else
817 return false;
818 }
819 if (auto attribExpr = BfNodeDynCastExact<BfAttributedStatement>(this))
820 return (attribExpr->mStatement == NULL) || (attribExpr->mStatement->IsMissingSemicolon());
821
822 if (auto stmt = BfNodeDynCast<BfStatement>(this))
823 return stmt->mTrailingSemicolon == NULL;
824
825 return false;
826}
827
828bool BfAstNode::IsExpression()
829{

Callers 3

CreateStatementMethod · 0.80
VisitMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected