| 123456789101112131415161718192021222324252627282930 |
- DEFINITION MODULE Check;
- (* Resolve / check pass (two-phase, part 2). A walk over a parsed unit's
- AST that binds identifiers to symbols, resolves and completes types,
- and emits the 2xx diagnostics -- run by the driver between Parse and
- Lower. See docs/plan-resolve-check.md. *)
- IMPORT AST;
- PROCEDURE BeginSession (progName: ARRAY OF CHAR);
- (* Per-session setup (alongside Lower.BeginSession). *)
- PROCEDURE BeginUnit;
- (* Per-unit setup (called before Parse). *)
- PROCEDURE NoteForward (id: INTEGER);
- (* Records a forward module-level reference noted by the parser (Design);
- FlushForward resolves it once the unit's declarations are complete. *)
- PROCEDURE FlushForward;
- (* Resolve every noted forward reference against the unit's declarations;
- an unresolved name is 201. *)
- PROCEDURE Resolve (unit: AST.Node);
- (* Resolve and check the parsed unit. *)
- PROCEDURE EndSession;
- (* Per-session teardown. *)
- END Check.
|