diff options
| author | gingerBill <ginger.bill.22@gmail.com> | 2016-07-23 11:41:11 +0100 |
|---|---|---|
| committer | gingerBill <ginger.bill.22@gmail.com> | 2016-07-23 11:41:11 +0100 |
| commit | 3fe7fc344d7d17a571a01e531db4a0e5ff057c9f (patch) | |
| tree | ca617e7e190fd9cf2989bdd3a12e8bff37004f26 /src/printer.cpp | |
| parent | f8fd6fce0b9aabd9562ac8d0dda712154b829f26 (diff) | |
Compound literals and Warnings
Diffstat (limited to 'src/printer.cpp')
| -rw-r--r-- | src/printer.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/printer.cpp b/src/printer.cpp index f34dd4559..3ce94aefb 100644 --- a/src/printer.cpp +++ b/src/printer.cpp @@ -18,6 +18,20 @@ void print_ast(AstNode *node, isize indent) { print_indent(indent); print_token(node->identifier.token); break; + case AstNode_ProcedureLiteral: + print_indent(indent); + gb_printf("(proc lit)\n"); + print_ast(node->procedure_literal.type, indent+1); + print_ast(node->procedure_literal.body, indent+1); + break; + + case AstNode_CompoundLiteral: + print_indent(indent); + gb_printf("(compound lit)\n"); + print_ast(node->compound_literal.type_expression, indent+1); + print_ast(node->compound_literal.element_list, indent+1); + break; + case AstNode_TagExpression: print_indent(indent); |