From 3fe7fc344d7d17a571a01e531db4a0e5ff057c9f Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sat, 23 Jul 2016 11:41:11 +0100 Subject: Compound literals and Warnings --- src/printer.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/printer.cpp') 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); -- cgit v1.2.3