summaryrefslogtreecommitdiff
path: root/types.h
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-01-05 21:36:26 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-01-05 21:36:26 -0500
commitbc96b9a42e3ee59759e6d63cd5f1617bc6a20f1e (patch)
tree0bfa424e8675c937a53d280ea72e98139737335e /types.h
parent73a48f7ef497fb8ac69173949150082b70482dc0 (diff)
package names
Diffstat (limited to 'types.h')
-rw-r--r--types.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/types.h b/types.h
index 82b1c08..a612368 100644
--- a/types.h
+++ b/types.h
@@ -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 {