compiler: load imports and enforce package exports
This commit is contained in:
@@ -383,6 +383,9 @@ struct Parser {
|
||||
|
||||
void parserinit(Parser*, Arena*, Lex*);
|
||||
Node *parsefile(Parser*);
|
||||
/* Imports-only N_FILE: module/pos identify the first package clause,
|
||||
* list holds N_USE declarations, and body holds package-clause markers. */
|
||||
Node *parseimports(Parser*);
|
||||
Node *parseexpr_top(Parser*); /* for testing: parse one expression */
|
||||
|
||||
typedef enum {
|
||||
@@ -585,6 +588,10 @@ struct Checker {
|
||||
int errs;
|
||||
int is_test; /* #15: `w6c -T` — collect @test fns + synth
|
||||
* the entry; loud-reject a user main. */
|
||||
int sep_mode; /* -c package compilation: imported interfaces are
|
||||
* present, so absent members are hard export errors. */
|
||||
Node *synth_test_run; /* exact compiler-generated test.run DOT;
|
||||
* its unresolved external hook is intentional */
|
||||
Node *alloc_octx; /* #3/B': the one empty `alloc([], n)` call node
|
||||
* that has let-declared slice context this walk;
|
||||
* any OTHER empty alloc has no element-type hint
|
||||
|
||||
Reference in New Issue
Block a user