aboutsummaryrefslogtreecommitdiff
path: root/sys/cmd/cc/cc.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cmd/cc/cc.h')
-rw-r--r--sys/cmd/cc/cc.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/sys/cmd/cc/cc.h b/sys/cmd/cc/cc.h
index cf97233..da45b18 100644
--- a/sys/cmd/cc/cc.h
+++ b/sys/cmd/cc/cc.h
@@ -371,11 +371,15 @@ enum
Xcomma,
+ Dvar,
Dfunc,
- Dobj,
- Dobjs,
+ Dtype,
+ Dlist = iota(20),
+ Dvars = Dvar | Dlist,
+ Dtypes = Dtype | Dlist,
- /* names */
+ /* names (don't interact w/ final AST) */
+ Nnil = 0,
Nident,
Nparen,
Nindex,
@@ -639,7 +643,7 @@ struct Decl
Expr *init;
};
};
- struct Decls objs;
+ struct Decls list;
};
};
@@ -693,7 +697,7 @@ struct Type
/* platform specific */
extern Type pointer;
-extern Type basetypes[23];
+extern Type basetypes[24];
/* mandated by C standard */
extern uint64 validtypespec[40];
extern int indextypespec[40];
@@ -713,9 +717,9 @@ struct Parser
Decl **decls;
} ast;
- /* static buffers */
+ /* static buffers/stacks */
Scope *sp;
- Scope spstk[20];
+ Scope spstk[40];
Name *nm;
Name nmstk[40];
@@ -777,6 +781,11 @@ struct Compiler
int len;
Type *info;
} type;
+
+ /* TODO: make array */
+ struct {
+ Decl vargs;
+ } builtin;
};
extern Compiler C;