Safe Haskell | None |
---|---|
Language | Haskell2010 |
- between :: Parser b -> Parser b -> Parser a -> Parser a
- stripped :: Parser a -> Parser a
- tag :: Parser a -> Parser a
- outputTag :: Parser a -> Parser a
- tagWith :: Parser a -> Parser b -> Parser b
- mapT :: Parser [Char] -> Parser Text
- var :: Parser Text
- parseBoxedInt :: Parser Int
- varIndexSection :: Parser (NonEmpty VarIndex)
- variable :: Parser Expr
- rawBodyTag :: Parser Text -> Parser Text -> Parser Text
- rawTag :: Parser Expr
- commentTag :: Parser Expr
- textPart :: Parser Expr
- manyTill1 :: Alternative f => f a -> f b -> f [a]
- ordOperator :: Parser (Expr -> Expr -> Expr)
- ordCombinator :: Parser (Expr -> Expr -> Expr)
- quoteString :: Parser Expr
- binaryPredicate :: Parser Expr
- truthy :: Parser Expr
- predicate :: Parser Expr
- predicateClause :: Parser Expr
- ifClause :: Parser Expr
- ifKeyClause :: Parser Expr
- elsifClause :: Parser Expr
- elseClause :: Parser Expr
- endIfClause :: Parser Expr
- caseClause :: Parser Expr
- whenClause :: Parser Expr
- endCaseClause :: Parser Expr
- filterName :: Parser Text
- filterArgs :: Parser [Expr]
- filterCell :: Parser Expr
- typeCheckFilter :: Text -> [Expr] -> Parser Expr
- filterCells :: Parser [Expr]
- filterBlock :: Parser Expr
- output :: Parser Expr
- ifLogic :: Parser Expr
- caseLogic :: Parser Expr
- block :: Parser Expr
- templateParser :: Parser [Expr]
- parseTemplate :: Text -> IResult Text [Expr]
- templateP :: Prism' Text [Expr]
Documentation
Match middle parser, around explicit start and end parsers
Match given tag name (e.g. for, case) with following parser
parseBoxedInt :: Parser Int Source #
Parse a positive integer within square brackets, e.g. "[123]", NOT "[123.1]"
varIndexSection :: Parser (NonEmpty VarIndex) Source #
Parse a variable section with an optional indexing An array index MUST be preceded by an object index ...hence Maybe do comprehension
e.g. raw tag, comment tag
commentTag :: Parser Expr Source #
Match interior of comment tag
manyTill1 :: Alternative f => f a -> f b -> f [a] Source #
Force the first character to be valid, otherwise fail miserably
quoteString :: Parser Expr Source #
Match a quoted string
binaryPredicate :: Parser Expr Source #
Match a binary predicate, e.g. a.b >= b.name
predicateClause :: Parser Expr Source #
Match any predicate clause
ifKeyClause :: Parser Expr Source #
Match an ifkey clause
elsifClause :: Parser Expr Source #
Match an elsif clause
elseClause :: Parser Expr Source #
Match an else clause
endIfClause :: Parser Expr Source #
Match the end of an if clause
caseClause :: Parser Expr Source #
Match a variable condition for a case clause
whenClause :: Parser Expr Source #
Match a when clause, part of a case pattern match block
endCaseClause :: Parser Expr Source #
Match the end of a case pattern match block
filterName :: Parser Text Source #
Match a filter fn name
filterArgs :: Parser [Expr] Source #
Match the list of arguments for the filter fn
filterCell :: Parser Expr Source #
Match a filter cell, fn and args
typeCheckFilter :: Text -> [Expr] -> Parser Expr Source #
Type check the function args and check arity
filterCells :: Parser [Expr] Source #
Match multiple filter fns and args
filterBlock :: Parser Expr Source #
Match a lhs and a block of filters with their args
templateParser :: Parser [Expr] Source #
Parse an entire template into chunks