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

Added @return support

This commit is contained in:
Brian Fiete 2021-01-16 12:35:51 -08:00
parent f8ec709750
commit e06949dac1
10 changed files with 88 additions and 32 deletions

View file

@ -9768,11 +9768,12 @@ void BfReducer::HandleBlock(BfBlock* block, bool allowEndingExpression)
flags = (CreateStmtFlags)(flags | CreateStmtFlags_AllowUnterminatedExpression);
auto statement = CreateStatement(node, flags);
if (statement == NULL)
if ((statement == NULL) && (mSource != NULL))
statement = mSource->CreateErrorNode(node);
isDone = !mVisitorPos.MoveNext();
mVisitorPos.Write(statement);
if (statement != NULL)
mVisitorPos.Write(statement);
}
mVisitorPos.Trim();