mustache-2.3.1: A mustache template parser library.

Copyright(c) Justus Adam 2015
LicenseBSD3
Maintainerdev@justus.science
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Text.Mustache.Parser

Contents

Description

 
Synopsis

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

Constructors

MustacheConf 

Fields

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 }