Syntax.Parse.DeclStable
Pattern-synonym and stable-family declarations.
These two declaration families carry more parse-time validation than the ordinary top-level forms. Keeping them together and out of the declaration dispatcher makes that validation visible without turning Syntax.Parse.Decl into a second grammar file.
The public functions start at the declaration keyword and return a complete Item. They are intentionally shaped for direct dispatch from Syntax.Parse.Decl: the caller supplies the remaining depth budget and the already-decoded visibility.
Functions and Values
parse_pattern_decl
parse_pattern_decl : (Syntax.Cursor.Cursor, Int, Option(String)) -> Syntax.Parse.Support.Parsed(Syntax.Ast.Item)
Parse a complete pattern declaration.
The clause assembler enforces the surface contract at parse time: one one-argument view, at most one make, and a make arity equal to the pattern parameter count. A bare name is admitted for view because it may name a class-dispatched view method; every other clause body must be a lambda.
parse_stable_decl
parse_stable_decl : (Syntax.Cursor.Cursor, Int, Option(String)) -> Syntax.Parse.Support.Parsed(Syntax.Ast.Item)
Parse a complete stable declaration, including rungs, converters, and an optional migrations table.
Stable entries are parsed in their authored order. The assembler rejects an empty family, a rung after converters or migrations, and duplicate migration tables before constructing the IStable item.