mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +00:00
Add function body to ZCC_FuncDeclarator
This commit is contained in:
parent
572823046c
commit
6088acd4c0
3 changed files with 4 additions and 1 deletions
|
@ -548,7 +548,8 @@ static void PrintFuncDeclarator(FString &out, ZCC_TreeNode *node)
|
|||
out << "\n(func-declarator ";
|
||||
PrintNodes(out, dnode->Type);
|
||||
out.AppendFormat("%x %s ", dnode->Flags, FName(dnode->Name).GetChars());
|
||||
PrintNodes(out, dnode->Params, ')');
|
||||
PrintNodes(out, dnode->Params, ' ');
|
||||
PrintNodes(out, dnode->Body, ')');
|
||||
out << '\n';
|
||||
}
|
||||
|
||||
|
|
|
@ -533,6 +533,7 @@ declarator(X) ::= decl_flags(A) type_list_or_void(B) variables_or_function(C).
|
|||
decl->Params = C.FuncParams;
|
||||
decl->Name = C.FuncName;
|
||||
decl->Flags = A | C.FuncFlags;
|
||||
decl->Body = C.FuncBody;
|
||||
X = decl;
|
||||
}
|
||||
else if (B != NULL && B->SiblingNext == B)
|
||||
|
|
|
@ -493,6 +493,7 @@ struct ZCC_FuncDeclarator : ZCC_Declarator
|
|||
{
|
||||
ZCC_FuncParamDecl *Params;
|
||||
ENamedName Name;
|
||||
ZCC_Statement *Body;
|
||||
};
|
||||
|
||||
FString ZCC_PrintAST(ZCC_TreeNode *root);
|
||||
|
|
Loading…
Reference in a new issue