summaryrefslogtreecommitdiff
path: root/types.h
diff options
context:
space:
mode:
Diffstat (limited to 'types.h')
-rw-r--r--types.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/types.h b/types.h
index 195c97e..0b0fcbb 100644
--- a/types.h
+++ b/types.h
@@ -1033,6 +1033,16 @@ typedef struct Evaluator {
ForeignFnManager ffmgr;
} Evaluator;
+/*
+Keeps track of use stmts.
+We need to keep track of the block so that
+it can be removed when we exit the block.
+*/
+typedef struct {
+ Statement *stmt;
+ Block *scope;
+} UsedExpr;
+
typedef struct Typer {
Allocator *allocr;
Evaluator *evalr;
@@ -1046,6 +1056,7 @@ typedef struct Typer {
ParsedFile *parsed_file;
Namespace *nms;
StrHashTable included_files; /* maps to IncludedFile */
+ UsedExpr *used; /* things which are currently being `use`d */
} Typer;
typedef struct CGenerator {