trifecta-0.43: A modern parser combinator library with convenient diagnostics

Portabilitynon-portable
Stabilityexperimental
Maintainerekmett@gmail.com

Text.Trifecta.Parser.Token.Class

Description

 

Documentation

class MonadParser m => MonadTokenParser m whereSource

Methods

whiteSpace :: m ()Source

Parses any white space. White space consists of zero or more occurrences of a space, a line comment or a block (multi line) comment. Block comments may be nested. How comments are started and ended is defined by this method.

nesting :: m a -> m aSource

Called when we enter a nested pair of symbols. Used to disable layout or highlight nested contexts.

semi :: m CharSource

Lexeme parser |semi| parses the character ';' and skips any trailing white space. Returns the character ';'.