diff options
author | Nicholas Noll <nbnoll@eml.cc> | 2020-05-30 15:09:33 -0700 |
---|---|---|
committer | Nicholas Noll <nbnoll@eml.cc> | 2020-05-30 15:09:33 -0700 |
commit | cf65141f154651115028d6456a1d7582d30b2083 (patch) | |
tree | 731b1b1fe7e513e8e9410ad090687fa203838f43 /sys/cmd/cc/cc.h | |
parent | 038ea2d0a34fb362f577e6c9884c710ebaf4042e (diff) |
many bug fixes
Diffstat (limited to 'sys/cmd/cc/cc.h')
-rw-r--r-- | sys/cmd/cc/cc.h | 23 |
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; |