add scc and update other code
[ccc.git] / ast.h
diff --git a/ast.h b/ast.h
index b797c57..bea8b7c 100644 (file)
--- a/ast.h
+++ b/ast.h
@@ -37,8 +37,12 @@ struct type {
 };
 
 struct decl {
-       enum {dfundecl, dvardecl} type;
+       enum {dcomponent, dfundecl, dvardecl} type;
        union {
+               struct {
+                       int ndecls;
+                       struct decl **decls;
+               } dcomponent;
                struct {
                        char *ident;
                        int nargs;
@@ -158,7 +162,7 @@ struct type *type_var(char *ident);
 
 void ast_print(struct ast *, FILE *out);
 void vardecl_print(struct vardecl *decl, int indent, FILE *out);
-void decl_print(struct decl *ast, int indent, FILE *out);
+void decl_print(struct decl *ast, FILE *out);
 void stmt_print(struct stmt *ast, int indent, FILE *out);
 void expr_print(struct expr *ast, FILE *out);
 void type_print(struct type *type, FILE *out);