Copyright | (c) Justus Adam, 2015 |
---|---|
License | LGPL-3 |
Maintainer | development@justusadam.com |
Stability | experimental |
Portability | POSIX |
Safe Haskell | None |
Language | Haskell2010 |
- parse :: FilePath -> Text -> Either ParseError MustacheAST
- parseWithConf :: MustacheConf -> FilePath -> Text -> Either ParseError MustacheAST
- data MustacheConf
- emptyConf :: MustacheConf
- defaultConf :: MustacheConf
- type MustacheParser = Parsec Text MustacheConf
- genParseTag :: String -> String -> MustacheParser [Text]
- parseSection :: MNodeParser
- parseTag :: Maybe [Text] -> MustacheParser MustacheAST
- parseVariable :: MNodeParser
- parsePartial :: MNodeParser
- parseText :: Maybe [Text] -> MustacheParser MustacheAST
- parseInvertedSection :: MNodeParser
- parseDelimiterChange :: MustacheParser ()
- parseUnescapedVar :: MNodeParser
- parseEnd :: Maybe [Text] -> MustacheParser ()
- sectionBegin :: String
- sectionEnd :: String
- invertedSectionBegin :: String
- unescape2 :: (String, String)
- unescape1 :: String
- delimiterChange :: String
- nestingSeparator :: String
Generic parsing functions
parse :: FilePath -> Text -> Either ParseError MustacheAST Source
Runs the parser for a mustache template, returning the syntax tree.
parseWithConf :: MustacheConf -> FilePath -> Text -> Either ParseError MustacheAST Source
Configurations
data MustacheConf Source
emptyConf :: MustacheConf Source
Empty configuration
defaultConf :: MustacheConf Source
Default configuration (delimiters = ("{{", "}}"))
Parser
type MustacheParser = Parsec Text MustacheConf Source
Components
genParseTag :: String -> String -> MustacheParser [Text] Source
parseSection :: MNodeParser Source
parseTag :: Maybe [Text] -> MustacheParser MustacheAST Source
parseVariable :: MNodeParser Source
parsePartial :: MNodeParser Source
parseText :: Maybe [Text] -> MustacheParser MustacheAST Source
parseInvertedSection :: MNodeParser Source
parseUnescapedVar :: MNodeParser Source
parseEnd :: Maybe [Text] -> MustacheParser () Source
Mustache Constants
#
/