summaryrefslogtreecommitdiff
path: root/types.h
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-01-16 20:34:41 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-01-16 20:34:41 -0500
commitdd3c2aa388026afcbcb987d9944c6f7207fb2d2c (patch)
tree5c9eb31e80917879cbb95a2a0c40d8060dd21614 /types.h
parent2ca96f5c91395771a37ad6707b2b28c60e6a8873 (diff)
better packages. also started std/io pkg (wrote hello world in toc!)
Diffstat (limited to 'types.h')
-rw-r--r--types.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/types.h b/types.h
index ff80575..6fb68c2 100644
--- a/types.h
+++ b/types.h
@@ -660,10 +660,9 @@ typedef struct Expression {
struct {
Type type;
} del;
- union {
- struct Expression *name_expr; /* before typing */
- Identifier name_ident; /* after typing */
- } pkg;
+ struct {
+ struct Expression *name_expr;
+ } pkg; /* only can exist before typing */
IfExpr if_;
WhileExpr while_;
EachExpr *each;
@@ -769,7 +768,7 @@ typedef struct Evaluator {
} Evaluator;
typedef struct Package {
- Identifier name;
+ char *name; /* package name, not file name */
Identifiers idents;
Statement *stmts;
struct {
@@ -791,7 +790,7 @@ typedef struct Typer {
ErrCtx *err_ctx;
/* for checking for problematic struct circular dependencies */
bool *is_reference_stack;
- Package **pkgs; /* all packages which have been imported */
+ Package *pkgs; /* all packages which have been imported */
} Typer;
typedef struct Exporter {