aboutsummaryrefslogtreecommitdiff
path: root/src/printer.cpp
diff options
context:
space:
mode:
authorgingerBill <ginger.bill.22@gmail.com>2016-07-23 11:41:11 +0100
committergingerBill <ginger.bill.22@gmail.com>2016-07-23 11:41:11 +0100
commit3fe7fc344d7d17a571a01e531db4a0e5ff057c9f (patch)
treeca617e7e190fd9cf2989bdd3a12e8bff37004f26 /src/printer.cpp
parentf8fd6fce0b9aabd9562ac8d0dda712154b829f26 (diff)
Compound literals and Warnings
Diffstat (limited to 'src/printer.cpp')
-rw-r--r--src/printer.cpp14
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);