| Constructor and Description |
|---|
ParserImpl(PebbleEngine engine)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
ExpressionParser |
getExpressionParser() |
TokenStream |
getStream()
Provides the stream of tokens which ultimately need to be "parsed" into
Nodes.
|
RootNode |
parse(TokenStream stream) |
String |
peekBlockStack() |
String |
popBlockStack() |
void |
pushBlockStack(String blockName) |
void |
setStream(TokenStream stream) |
BodyNode |
subparse() |
BodyNode |
subparse(StoppingCondition stopCondition)
Parses the existing TokenStream, starting at the current Token, and
ending when the stopCondition is fullfilled.
|
public ParserImpl(PebbleEngine engine)
engine - The main PebbleEngine that this parser is working forpublic RootNode parse(TokenStream stream) throws ParserException
parse in interface ParserParserExceptionpublic BodyNode subparse() throws ParserException
subparse in interface ParserParserExceptionpublic BodyNode subparse(StoppingCondition stopCondition) throws ParserException
Parsersubparse in interface ParserstopCondition - The condition to stop parsing a segment of the template.ParserException - Thrown if a parsing error occurs.public TokenStream getStream()
Parserpublic void setStream(TokenStream stream)
public ExpressionParser getExpressionParser()
getExpressionParser in interface Parserpublic String peekBlockStack()
peekBlockStack in interface Parserpublic String popBlockStack()
popBlockStack in interface Parserpublic void pushBlockStack(String blockName)
pushBlockStack in interface ParserCopyright © 2015. All rights reserved.