#parse directive in the parse tree.
A #parse (<primary>) directive does nothing until the template is evaluated. Then the
<primary> should evaluate to a string, which will be used to derive a nested Template. If the string was seen before (in this evaluation, or an earlier evaluation) then the
Template will be retrieved from the parseCache. Otherwise we will get a Reader from the ResourceOpener and parse its contents to produce a new Template,
which we will record in the parseCache. Either way, we will execute the nested Template, which means adding its macros to the EvaluationContext and evaluating it to
add text to the final output.
| Modifier and Type | Field and Description |
|---|---|
| private final ExpressionNode | |
| private final Map | |
| private final Template. |
| Access | Constructor and Description |
|---|---|
| pack-priv | ParseNode(String resourceName, int startLine, ExpressionNode nestedResourceNameExpression, Template.
|
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | render(EvaluationContext context, StringBuilder output)
Implements abstract com. output.
|
| nestedResourceNameExpression | back to summary |
|---|---|
| private final ExpressionNode nestedResourceNameExpression | |
| parseCache | back to summary |
|---|---|
| private final Map<String, Template> parseCache | |
| resourceOpener | back to summary |
|---|---|
| private final Template. | |
| ParseNode | back to summary |
|---|---|
| pack-priv ParseNode(String resourceName, int startLine, ExpressionNode nestedResourceNameExpression, Template. | |
| render | back to summary |
|---|---|
| pack-priv void render(EvaluationContext context, StringBuilder output) Implements abstract com. Doc from com. Adds this node's contribution to the
| |