diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-01-05 21:36:26 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-01-05 21:36:26 -0500 |
commit | bc96b9a42e3ee59759e6d63cd5f1617bc6a20f1e (patch) | |
tree | 0bfa424e8675c937a53d280ea72e98139737335e /types.h | |
parent | 73a48f7ef497fb8ac69173949150082b70482dc0 (diff) |
package names
Diffstat (limited to 'types.h')
-rw-r--r-- | types.h | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -276,6 +276,7 @@ typedef enum { KW_BOOL, KW_TRUE, KW_FALSE, + KW_PKG, KW_COUNT } Keyword; @@ -720,12 +721,14 @@ typedef struct Statement { typedef struct ParsedFile { Statement *stmts; + Expression *pkg_name; } ParsedFile; typedef struct Parser { Tokenizer *tokr; Allocator *allocr; Block *block; /* which block are we in? NULL = file scope */ + ParsedFile *file; } Parser; typedef enum { @@ -758,10 +761,12 @@ typedef struct Typer { typedef struct Exporter { FILE *out; /* .top (toc package) to output to */ bool export_locations; + bool started; U64 ident_id; FnExpr **exported_fns; StructDef **exported_structs; Identifier *exported_idents; /* (only those whose names are exported) */ + const char *code; } Exporter; typedef struct CGenerator { |