Safe Haskell | None |
---|---|
Language | Haskell98 |
Lexing logic for the Morte language
- lexExpr :: Text -> Producer LocatedToken (State Position) (Maybe Text)
- data Token
- data Position = P {}
- data LocatedToken = LocatedToken {}
Lexer
lexExpr :: Text -> Producer LocatedToken (State Position) (Maybe Text) Source #
Convert a text representation of an expression into a stream of tokens
lexExpr
keeps track of position and returns the remainder of the input if
lexing fails.
Types
Token type, used to communicate between the lexer and parser
The cursor's location while lexing the text