diff options
author | Nicholas Noll <nbnoll@eml.cc> | 2020-05-18 20:28:51 -0700 |
---|---|---|
committer | Nicholas Noll <nbnoll@eml.cc> | 2020-05-18 20:28:51 -0700 |
commit | 7ea7654db6e827038e38c3589c8d5b314db3fcb2 (patch) | |
tree | b9b28558b6aee70c57bd2ff14ea10896c4840b29 /sys/cmd/cc/cc.h | |
parent | 73c04db73163d1d2719bb97a6b8c133065df75c3 (diff) |
fix: line accounting is less buggy
Diffstat (limited to 'sys/cmd/cc/cc.h')
-rw-r--r-- | sys/cmd/cc/cc.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/sys/cmd/cc/cc.h b/sys/cmd/cc/cc.h index 84f173f..0e525be 100644 --- a/sys/cmd/cc/cc.h +++ b/sys/cmd/cc/cc.h @@ -235,8 +235,9 @@ struct SymTab Sym **vals; }; -Sym *lookup(SymTab *tab, string ident); Sym *define(SymTab *tab, string ident, int kind); +Sym *lookup(SymTab *tab, string ident); +error forget(SymTab *tab, string ident); struct Lexer { @@ -363,8 +364,8 @@ struct Decl enum { IOnil = iota(0), - IOonce = iota(1), - IOmac = iota(2), + IOfile = iota(1), + IObuff = iota(2), }; struct Io @@ -381,6 +382,7 @@ struct Io struct Io *link; }; +/* cc.c io functions */ Io* openio(byte *path); Io* makeio(); void freeio(Io *io); @@ -396,6 +398,7 @@ struct StrTab int32 *vals; }; +/* cc.c string functions */ int32 intern(byte **str); string internview(byte* beg, byte *end); @@ -413,6 +416,11 @@ struct Compiler Io *io; Io iostk[100]; + struct { + int cap; + int len; + string *path; + } omit; string outfile; @@ -420,6 +428,8 @@ struct Compiler }; extern Compiler C; -void init(); +/* cc.c compiler functions */ +void pushomit(string omit); +void init(); #undef iota |