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:
parent
f8ec709750
commit
e06949dac1
10 changed files with 88 additions and 32 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue