mustache-0.3.1.0: A mustache template parser library.

Copyright(c) Justus Adam, 2015
LicenseLGPL-3
Maintainerdev@justus.science
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Text.Mustache.Parser

Contents

Description

 

Synopsis

Generic parsing functions

parse :: FilePath -> Text -> Either ParseError AST Source

Runs the parser for a mustache template, returning the syntax tree.

parseWithConf :: MustacheConf -> FilePath -> Text -> Either ParseError AST 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

unescape2 :: (Char, Char) Source

{ and }