Patterns & destructuring
Patterns and destructuring: the atoms a match arm accepts, type and alias patterns, and the object and array destructuring forms.
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 |
|---|---|
and | patterns |
or | pattern |
const, as, var | ut_pattern |
as | pattern_binding |
rest, as | pattern_property |
rest | array_pattern_element |
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.