docs(ir): mark sema/types as editor-only, not compiler truth (A1.2)
Architecture phase A1.2 — documentation/comment only, no behavior change. Resolve the ambiguity over which type model compiler decisions trust: - src/sema.zig: file-level module doc stating it is the editor symbol/type index for the language server (navigation/completion), NOT a compiler semantic pass. Its Type values are editor metadata; the compiler uses the canonical TypeId/TypeTable model in src/ir/. sx requires no as-you-type type checking -- authoritative diagnostics are produced on save by the canonical pipeline. Added notes on SemaResult, Analyzer, resolveTypeNode, inferExprType. No public API renamed (would churn LSP call sites). - src/types.zig: note that Type is editor metadata only, not compiler truth; do not expand for new compiler semantics (A8 deletes/reduces it). - src/ir/types.zig: fix stale TypeTable.aliases comment -- it borrows Lowering.program_index.type_alias_map (post-A1.1b). Deleting the LSP's parallel sema diagnostic stream is A8.1, not this step. Gate green: zig build, zig build test, bash tests/run_examples.sh (350 passed).
This commit is contained in:
@@ -332,7 +332,7 @@ pub const TypeTable = struct {
|
||||
slice_arena: std.heap.ArenaAllocator,
|
||||
/// Target pointer size in bytes (4 for wasm32, 8 for 64-bit targets).
|
||||
pointer_size: u8 = 8,
|
||||
/// Borrowed pointer to Lowering's `type_alias_map`. When set,
|
||||
/// Borrowed pointer to `Lowering.program_index.type_alias_map`. When set,
|
||||
/// `resolveTypeName` consults it before falling through to
|
||||
/// the empty-struct-stub default — so a name like `ShaderHandle`
|
||||
/// (defined `ShaderHandle :: u32`) resolves to `u32` rather than
|
||||
|
||||
Reference in New Issue
Block a user