From cf65141f154651115028d6456a1d7582d30b2083 Mon Sep 17 00:00:00 2001 From: Nicholas Noll Date: Sat, 30 May 2020 15:09:33 -0700 Subject: many bug fixes --- sys/cmd/cc/cc.h | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'sys/cmd/cc/cc.h') 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; -- cgit v1.2.1