Expand description
Semantic checking for Nifty: resolves names, checks types and element arguments, and records which state every dynamic part of the UI reads.
Modules§
- checker 🔒
- Checks a program’s parsed files in phases: declarations, state, functions, then the UI. Functions are checked before the UI so the UI knows what state every function call reads.
- elements
- The built-in UI elements and the arguments each one takes. The checker dispatches on
Element::kind, and tools such as the language server read the same table. - functions
- The built-in functions and the arguments each one takes. The checker dispatches on
Function::kind, and tools such as the language server read the same table. - hir
- The checked program: every name resolved to an id, every expression typed, and every dynamic part of the UI annotated with the state it reads.
- methods
- The built-in methods on lists and strings. The checker dispatches on
Method::kind, and tools such as the language server read the same table.
Structs§
- Checked
- The checked program. Run it only when
diagnosticsis empty: parts with errors are left out or marked withType::Error.