Compiler.Parse.Pattern
This module provides parsers for Gren patterns.
parser :
Parser Context Error Pattern
Use this to parse patterns.
String.Parser.run parser Compiler.Parse.Context.empty source
topLevelParser :
Parser Context Error Pattern
Use this parser when you know that you're expecting exactly one pattern, as opposed
to one or more patterns. As an example: this parser will treat MyCtor one as one pattern,
not two.
type Error
= ExpectedChar Char
| ExpectedKeyword String
| VariableError Error
| NumberError Error
| FloatNotSupported
| StringError Error
| SpaceError Error
The kind of errors that can happen while parsing patterns.
errorToString :
Error -> String
Returns a human-readable description of an Error.