Skip to main content

Module checker

Module checker 

Source
Expand description

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.

Modulesยง

args ๐Ÿ”’
Matching call arguments to parameters: positional ones by order, named ones by name.
builtins ๐Ÿ”’
Calls to built-in functions.
consts ๐Ÿ”’
Element arguments that must be written literally: layout numbers, fixed text, flags and styles.
env ๐Ÿ”’
What the checker knows while it walks a body: locals in scope, what context it is in, and which state the code it has seen reads and writes.
expr ๐Ÿ”’
Expressions and places.
menu ๐Ÿ”’
Menus: the menu barโ€™s menus, their items and submenus, and the itemsโ€™ shortcuts.
stmt ๐Ÿ”’
Statements in function bodies and button actions.
ui ๐Ÿ”’
Window and view bodies: elements, conditional and repeated UI, and what each dynamic part of the UI reads.

Structsยง

Checker ๐Ÿ”’
Declared ๐Ÿ”’
A top-level name and where it is declared.
Signature ๐Ÿ”’

Enumsยง

Global ๐Ÿ”’

Functionsยง

check ๐Ÿ”’
Checks files as one program; the first is the entry file.
items ๐Ÿ”’
Every top-level item of the program, file by file.
local_types ๐Ÿ”’
The type of each of a bodyโ€™s locals, by id.
top_level_call ๐Ÿ”’
A top-level statement, such as a windowโ€™s or a menuโ€™s call, and the name written before it, if any.