mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-08 13:51:37 -04:00
VarDecl and ConstDecl split; error, warning, et al. now global
This commit is contained in:
1 parent
eb424bb315
commit
67694c0df0
13 files changed
+1840
-670
No files matched your search
+11
-4
@@ -142,11 +142,18 @@ void print_ast(AstNode *node, isize indent) {
|
||||
|
||||
case AstNode_VarDecl:
|
||||
print_indent(indent);
|
||||
if (node->VarDecl.kind == Declaration_Mutable) {
|
||||
gb_printf("(decl:var,mutable)\n");
|
||||
} else if (node->VarDecl.kind == Declaration_Immutable) {
|
||||
gb_printf("(decl:var,immutable)\n");
|
||||
gb_printf("(decl:var)\n");
|
||||
gb_for_array(i, node->VarDecl.names) {
|
||||
print_ast(node->VarDecl.names[i], indent+1);
|
||||
}
|
||||
print_ast(node->VarDecl.type, indent+1);
|
||||
gb_for_array(i, node->VarDecl.values) {
|
||||
print_ast(node->VarDecl.values[i], indent+1);
|
||||
}
|
||||
break;
|
||||
case AstNode_ConstDecl:
|
||||
print_indent(indent);
|
||||
gb_printf("(decl:const)\n");
|
||||
gb_for_array(i, node->VarDecl.names) {
|
||||
print_ast(node->VarDecl.names[i], indent+1);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user