diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-08-22 15:48:52 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-08-22 15:55:46 +0300 |
| commit | dbf3ed3db10f9fa9157d661704e16ba5b73b0e84 (patch) | |
| tree | f4bc4a2d732e40294884277baf364a6fbf36b051 /include | |
| parent | 1bb997feefda0154e975797faaacec7c47de55e0 (diff) | |
| download | ek-dbf3ed3db10f9fa9157d661704e16ba5b73b0e84.tar.gz ek-dbf3ed3db10f9fa9157d661704e16ba5b73b0e84.zip | |
disable ast dump when DEBUG=0
+ Also optimize ast dump generation a little bit
Diffstat (limited to 'include')
| -rw-r--r-- | include/ek/ast.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/ek/ast.h b/include/ek/ast.h index 610efb6..9107e8a 100644 --- a/include/ek/ast.h +++ b/include/ek/ast.h @@ -665,11 +665,19 @@ struct ast *clone_ast_list(struct ast *l); struct type *clone_type(struct type *n); struct type *clone_type_list(struct type *l); +#if defined(DEBUG) void ast_dump_list(int depth, struct ast *root); void ast_dump(int depth, struct ast *node); void type_dump_list(struct type *root); void type_dump(struct type *node); +#else +#define ast_dump_list(depth, root) +#define ast_dump(depth, root) + +#define type_dump_list(root) +#define type_dump(root) +#endif /* DEBUG */ void ast_append(struct ast **list, struct ast *elem); void type_append(struct type **list, struct type *elem); |
