Module

PureScript.CST.Parser.Monad

Package
purescript-language-cst-parser
Repository
natefaubion/purescript-language-cst-parser

#ParserState Source

type ParserState = { consumed :: Boolean, errors :: Array PositionedError, stream :: TokenStream }

#PositionedError Source

type PositionedError = { error :: ParseError, position :: SourcePos }

#runParser' Source

runParser' :: forall a. ParserState -> Parser a -> ParserResult a

#take Source

take :: forall a. (SourceToken -> Either ParseError a) -> Parser a

#fail Source

fail :: forall a. PositionedError -> Parser a

#try Source

try :: forall a. Parser a -> Parser a

#lookAhead Source

lookAhead :: forall a. Parser a -> Parser a

#many Source

many :: forall a. Parser a -> Parser (Array a)

#optional Source

optional :: forall a. Parser a -> Parser (Maybe a)

#recover Source