mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Added type initializer blocks
This commit is contained in:
parent
9a857cceb3
commit
879b15ecd8
6 changed files with 154 additions and 71 deletions
|
@ -5774,8 +5774,19 @@ BfAstNode* BfReducer::ReadTypeMember(BfTokenNode* tokenNode, int depth, BfAstNod
|
|||
ctorDecl->mReturnType = NULL;
|
||||
ReplaceNode(tokenNode, ctorDecl);
|
||||
MEMBER_SET(ctorDecl, mThisToken, tokenNode);
|
||||
if (auto block = BfNodeDynCast<BfBlock>(mVisitorPos.GetNext()))
|
||||
{
|
||||
mVisitorPos.MoveNext();
|
||||
MEMBER_SET(ctorDecl, mBody, block);
|
||||
|
||||
ParseMethod(ctorDecl, ¶ms, &commas);
|
||||
if (IsNodeRelevant(ctorDecl))
|
||||
{
|
||||
SetAndRestoreValue<BfMethodDeclaration*> prevMethodDeclaration(mCurMethodDecl, ctorDecl);
|
||||
HandleBlock(block);
|
||||
}
|
||||
}
|
||||
else
|
||||
ParseMethod(ctorDecl, ¶ms, &commas);
|
||||
return ctorDecl;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue