Programs, regions & imports
The shape of a source file: optional frontmatter, the optional module region, the top-level statement spine, imports, and the program entry points and test suites.
Return to the grammar overview.
Terms#
These are the words you write in this part of the language. Each links to its page. The second column names the grammar rule the word belongs to.
| Term | Grammar rule |
|---|---|
import | importa_record |
from | ex_field |
as | ut_field |
all | omnia_field |
from, import | importa_sugar |
public | publica |
as | named_import |
as | wildcard_import |
const | selective_import |
as | import_value_binding |
args, exit | entry_header |
main | incipit_stmt |
async_main | incipiet_stmt |
describe | probandum_decl |
test | proba_stmt |
expect_failure, flaky, todo, bench, skip, repeat, only, only_in, tag, timeout | proba_modifier |
all, teardown, async_teardown, setup, async_setup | praepara_block |
Formal grammar#
The rules for this part of the language are the parser's own definition of it. They are written for models and tools, so this page does not repeat them; the full list is at every production.