Pattern decomposition

This commit is contained in:
Tony Garnock-Jones 2021-06-03 15:58:48 +02:00
parent 3412eabcff
commit a932fa1428
1 changed files with 7 additions and 3 deletions

View File

@ -6,6 +6,10 @@ Pattern = DDiscard / DBind / DLit / DCompound .
DDiscard = <_>.
DBind = <bind @name symbol @pattern Pattern>.
DLit = <lit @value any>.
DCompound = @rec <compound <rec @label any @arity int> @members { int: Pattern ...:... }>
/ @arr <compound <arr @arity int> @members { int: Pattern ...:... }>
/ @dict <compound <dict> @members { any: Pattern ...:... }> .
DCompound = @rec <compound @ctor CRec @members { int: Pattern ...:... }>
/ @arr <compound @ctor CArr @members { int: Pattern ...:... }>
/ @dict <compound @ctor CDict @members { any: Pattern ...:... }> .
CRec = <rec @label any @arity int>.
CArr = <arr @arity int>.
CDict = <dict>.