mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-08 05:48:51 -04:00
Compound literals and Warnings
This commit is contained in:
1 parent
f8fd6fce0b
commit
3fe7fc344d
8 files changed
+539
-296
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user