AnnotType ::= SimpleType {Annotation}
ArgType ::= Type
CompoundType ::= AnnotType {with AnnotType} [Refinement]
| Refinement
InfixType ::= CompoundType {id [nl] CompoundType}
Returns Some(tree) if it finds a star and prematurely ends parsing.
Returns Some(tree) if it finds a star and prematurely ends parsing. This is an artifact of old implementation which has proven difficult to cleanly extract.
Pattern ::= Pattern1 { `|' Pattern1 } SeqPattern ::= SeqPattern1 { `|' SeqPattern1 }
Pattern1 ::= varid `:' TypePat | `_' `:' TypePat | Pattern2 SeqPattern1 ::= varid `:' TypePat | `_' `:' TypePat | [SeqPattern2]
Pattern2 ::= varid [ @ Pattern3 ] | Pattern3 SeqPattern2 ::= varid [ @ SeqPattern3 ] | SeqPattern3
Pattern3 ::= SimplePattern
| SimplePattern {Id [nl] SimplePattern}
SeqPattern3 ::= SeqSimplePattern [ `*' | `?' | `+' ]
| SeqSimplePattern {Id [nl] SeqSimplePattern}
Patterns ::= Pattern { `,' Pattern } SeqPatterns ::= SeqPattern { `,' SeqPattern }
SimplePattern ::= varid
| `_'
| literal
| XmlPattern
| StableId [TypeArgs] [`(' [SeqPatterns] `)']
| `(' [Patterns] `)'
SimpleSeqPattern ::= varid
| `_'
| literal
| XmlPattern
| `<' xLiteralPattern
| StableId [TypeArgs] [`(' [SeqPatterns] `)']
| `(' [SeqPatterns] `)'
XXX: Hook for IDE
SimpleType ::= SimpleType TypeArgs
| SimpleType `#' Id
| StableId
| Path `.' type
| `(' Types `)'
| WildcardType
Type ::= InfixType `=>' Type | `(' [`=>' Type] `)' `=>' Type | InfixType [ExistentialClause] ExistentialClause ::= forSome `{' ExistentialDcl {semi ExistentialDcl}} `}' ExistentialDcl ::= type TypeDcl | val ValDcl
TypeArgs ::= `[' ArgType {`,' ArgType} `]'
Types ::= Type {`,' Type}
The implementation for parsing inside of patterns at points where sequences are allowed.