Grammar and AST together
Named captures, patterns, structural pipes, modules, trivia, and precedence define what your language accepts and what its tree contains.
Define syntax, author references and types, deliver diagnostics and editor support, and choose how programs execute.
The course grows a TypeScript-like teaching language from its first declaration through expressions, diagnostics, references, types, function inference, compound data, editor support, and host backends. Every step has runnable files or an explicit checked-in checkpoint. Advanced data and runtime chapters name their subset boundaries rather than claiming complete TypeScript.
cargo run --example 08-mini-typescript
cargo run --example mini_typescript_host -- addition
cargo run --example backend_interpretThe inference host reports Type::number and Type::string for the corresponding bindings; the interpreter prints 42. Follow installation to run the CLI and editor setup to inspect live source diagnostics.
Use core queries when defining new analysis mechanisms. Reuse standard references and types for common behavior, or explicitly opt into arithmetic and structural policies. Hook contracts and host implementations remain separate, so static type information does not impose a runtime value representation.
Browse concepts, the language reference, and capabilities and limits for the current contract.