Fixed folding of single child asts with tags

This commit is contained in:
Daniel Holden
2016-06-11 14:11:19 +01:00
parent 14001ad332
commit 2a19e4c451
5 changed files with 106 additions and 9 deletions

1
mpc.h
View File

@@ -269,6 +269,7 @@ mpc_ast_t *mpc_ast_build(int n, const char *tag, ...);
mpc_ast_t *mpc_ast_add_root(mpc_ast_t *a);
mpc_ast_t *mpc_ast_add_child(mpc_ast_t *r, mpc_ast_t *a);
mpc_ast_t *mpc_ast_add_tag(mpc_ast_t *a, const char *t);
mpc_ast_t *mpc_ast_add_root_tag(mpc_ast_t *a, const char *t);
mpc_ast_t *mpc_ast_tag(mpc_ast_t *a, const char *t);
mpc_ast_t *mpc_ast_state(mpc_ast_t *a, mpc_state_t s);