mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- added mixin support to AST output
This commit is contained in:
parent
18f2cf0fdc
commit
9629a737b9
1 changed files with 21 additions and 0 deletions
|
@ -913,6 +913,25 @@ static void PrintPropertyStmt(FLispString &out, ZCC_TreeNode *node)
|
|||
out.Close();
|
||||
}
|
||||
|
||||
static void PrintMixinDef(FLispString &out, ZCC_TreeNode *node)
|
||||
{
|
||||
ZCC_MixinDef *mdnode = (ZCC_MixinDef *)node;
|
||||
out.Break();
|
||||
out.Open("mixin-def");
|
||||
out.AddName(mdnode->NodeName);
|
||||
PrintNodes(out, mdnode->Body);
|
||||
out.Close();
|
||||
}
|
||||
|
||||
static void PrintMixinStmt(FLispString &out, ZCC_TreeNode *node)
|
||||
{
|
||||
ZCC_MixinStmt *msnode = (ZCC_MixinStmt *)node;
|
||||
out.Break();
|
||||
out.Open("mixin-stmt");
|
||||
out.AddName(msnode->MixinName);
|
||||
out.Close();
|
||||
}
|
||||
|
||||
void (* const TreeNodePrinter[NUM_AST_NODE_TYPES])(FLispString &, ZCC_TreeNode *) =
|
||||
{
|
||||
PrintIdentifier,
|
||||
|
@ -972,6 +991,8 @@ void (* const TreeNodePrinter[NUM_AST_NODE_TYPES])(FLispString &, ZCC_TreeNode *
|
|||
PrintStaticArrayState,
|
||||
PrintProperty,
|
||||
PrintFlagDef,
|
||||
PrintMixinDef,
|
||||
PrintMixinStmt,
|
||||
};
|
||||
|
||||
FString ZCC_PrintAST(ZCC_TreeNode *root)
|
||||
|
|
Loading…
Reference in a new issue