mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-04 01:41:56 +00:00
- added mixin support to AST output
This commit is contained in:
parent
f2b1d45985
commit
da8c452795
1 changed files with 21 additions and 0 deletions
|
@ -914,6 +914,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,
|
||||
|
@ -973,6 +992,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