Copyright | (c) Justus Adam, 2015 |
---|---|
License | LGPL-3 |
Maintainer | dev@justus.science |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
- parse :: FilePath -> Text -> Either ParseError STree
- parseWithConf :: MustacheConf -> FilePath -> Text -> Either ParseError STree
- data MustacheConf
- defaultConf :: MustacheConf
- type Parser = Parsec Text MustacheState
- data MustacheState
- sectionBegin :: Char
- sectionEnd :: Char
- invertedSectionBegin :: Char
- unescape2 :: (Char, Char)
- unescape1 :: Char
- delimiterChange :: Char
- nestingSeparator :: Char
Generic parsing functions
parse :: FilePath -> Text -> Either ParseError STree Source
Runs the parser for a mustache template, returning the syntax tree.
parseWithConf :: MustacheConf -> FilePath -> Text -> Either ParseError STree Source
Parse using a custom initial configuration
Configurations
data MustacheConf Source
Initial configuration for the parser
defaultConf :: MustacheConf Source
Default configuration (delimiters = ("{{", "}}"))
Parser
type Parser = Parsec Text MustacheState Source
The parser monad in use
data MustacheState Source
User state for the parser
Mustache Constants
#
sectionEnd :: Char Source
/