Skip to main content

Crate nifty_check

Crate nifty_check 

Source
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 diagnostics is empty: parts with errors are left out or marked with Type::Error.

Functions§

check
Checks files as one program. They share one namespace, so a name declared in any of them can be used in all of them. The first is the entry file.
compile
Checks a program’s parsed files and returns the program; the first is the entry file.