Implements a Mustache parser class.
Description
The MustacheParser class allows you to implement a Mustache parser.
Properties
initialTokens
List of original Mustache tokens.
publicinitialTokens(): MustacheToken[]
- returns: MustacheToken[] - original mustache tokens.
 
originalTokens
List of original Mustache tokens.
publicoriginalTokens(): Token[]
- returns: Token[] - original Mustache tokens.
 
publicoriginalTokens(value: Token[])
- value: Token[] - original Mustache tokens.
 
resultTokens
List of parsed Mustache tokens.
publicresultTokens(): MustacheToken[]
- returns: MustacheToken[] - parsed Mustache tokens.
 
template
Mustache template.
publictemplate(): string
- returns: string - Mustache template.
 
publictemplate(value: string)
- value: string - Mustache template.
 
variableNames
List of found variable names.
publicvariableNames(): string[]
- returns: string[] - found variable names.
 
Instance methods
clear
Clears parsing results.
publicclear(): void
parseString
Sets a new Mustache string and parses it into internal byte code.
publicparseString(mustache: string): void
- mustache: string - new Mustache string.
 
parseTokens
Sets a new mustache Token and parses it into internal byte code.
publicparseTokens(tokens: Token[]): void
- mustache: Token[] - new Mustache string.