Package io.pebbletemplates.pebble.parser
Interface Parser
-
- All Known Implementing Classes:
ParserImpl
public interface Parser
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ExpressionParsergetExpressionParser()TokenStreamgetStream()Provides the stream of tokens which ultimately need to be "parsed" into Nodes.RootNodeparse(TokenStream stream)java.lang.StringpeekBlockStack()java.lang.StringpopBlockStack()voidpushBlockStack(java.lang.String blockName)BodyNodesubparse()BodyNodesubparse(StoppingCondition stopCondition)Parses the existing TokenStream, starting at the current Token, and ending when the stopCondition is fullfilled.
-
-
-
Method Detail
-
parse
RootNode parse(TokenStream stream)
-
subparse
BodyNode subparse()
-
getStream
TokenStream getStream()
Provides the stream of tokens which ultimately need to be "parsed" into Nodes.- Returns:
- TokenStream
-
subparse
BodyNode subparse(StoppingCondition stopCondition)
Parses the existing TokenStream, starting at the current Token, and ending when the stopCondition is fullfilled.- Parameters:
stopCondition- The condition to stop parsing a segment of the template.- Returns:
- A node representing the parsed section
-
getExpressionParser
ExpressionParser getExpressionParser()
-
peekBlockStack
java.lang.String peekBlockStack()
-
popBlockStack
java.lang.String popBlockStack()
-
pushBlockStack
void pushBlockStack(java.lang.String blockName)
-
-