diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2020-01-16 20:34:41 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2020-01-16 20:34:41 -0500 |
commit | dd3c2aa388026afcbcb987d9944c6f7207fb2d2c (patch) | |
tree | 5c9eb31e80917879cbb95a2a0c40d8060dd21614 /types.h | |
parent | 2ca96f5c91395771a37ad6707b2b28c60e6a8873 (diff) |
better packages. also started std/io pkg (wrote hello world in toc!)
Diffstat (limited to 'types.h')
-rw-r--r-- | types.h | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -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 { |