Class: TemplateParser
Implements
Constructors
new TemplateParser()
new TemplateParser(
environment):TemplateParser
Parameters
• environment: Environment
Returns
Defined in
Properties
environment
readonlyenvironment:Environment
Defined in
Methods
getTag()
protectedgetTag(token):Tag
Parameters
• token: Token
Returns
Defined in
parse()
parse(
stream):Root
Parameters
• stream: TokenStream
Returns
Implementation of
Defined in
parseBlock()
parseBlock(
stream,end,token?):BlockNode
Parse a block of tokens from the given stream until an end tag is found or the end of the stream is reached.
Parameters
• stream: TokenStream
A template token stream.
• end: Set<string>
A set of tag names that indicate the end of the block.
• token?: Token
The token to store on the block. Defaults to the current token in the stream.
Returns
Implementation of
Defined in
parseLiquid()
parseLiquid(
stream):BlockNode
Like parseBlock, but read until the end of the stream.
Useful for the liquid tag.
Parameters
• stream: TokenStream
A template token stream.
Returns
Implementation of
Defined in
parseStatement()
protectedparseStatement(stream):Node
Parameters
• stream: TokenStream