public final class InsertMsgsVisitor extends AbstractSoyNodeVisitor<Void>
Important: Do not use outside of Soy code (treat as superpackage-private).
If the Soy tree doesn't contain plural/select messages, then after this pass, the Soy tree should no longer contain MsgFallbackGroupNodes, MsgNodes, MsgPlaceholderNodes, or MsgHtmlTagNodes. If the Soy tree contains plural/select messages, then the only messages left in the tree after this pass runs should be the plural/select messages.
Note that the Soy tree is usually simplifiable after this pass is run (e.g. it usually contains consecutive RawTextNodes). It's usually advisable to run a simplification pass after this pass.
| Constructor and Description |
|---|
InsertMsgsVisitor(SoyMsgBundle msgBundle,
ErrorReporter errorReporter) |
| Modifier and Type | Method and Description |
|---|---|
Void |
exec(SoyNode node)
Executes the function defined by this visitor.
|
protected void |
visitMsgFallbackGroupNode(MsgFallbackGroupNode node) |
protected void |
visitMsgHtmlTagNode(MsgHtmlTagNode node) |
protected void |
visitSoyNode(SoyNode node) |
visit, visitCallBasicNode, visitCallDelegateNode, visitCallNode, visitCallParamContentNode, visitCallParamNode, visitCallParamValueNode, visitChildren, visitChildrenAllowingConcurrentModification, visitCssNode, visitDebuggerNode, visitForeachIfemptyNode, visitForeachNode, visitForeachNonemptyNode, visitForNode, visitIfCondNode, visitIfElseNode, visitIfNode, visitLetContentNode, visitLetNode, visitLetValueNode, visitLogNode, visitLoopNode, visitMsgNode, visitMsgPlaceholderNode, visitMsgPluralCaseNode, visitMsgPluralDefaultNode, visitMsgPluralNode, visitMsgSelectCaseNode, visitMsgSelectDefaultNode, visitMsgSelectNode, visitMsgSubstUnitNode, visitPrintDirectiveNode, visitPrintNode, visitRawTextNode, visitSoyFileNode, visitSoyFileSetNode, visitSwitchCaseNode, visitSwitchDefaultNode, visitSwitchNode, visitTemplateBasicNode, visitTemplateDelegateNode, visitTemplateNode, visitXidNodevisitChildren, visitChildrenAllowingConcurrentModificationpublic InsertMsgsVisitor(@Nullable SoyMsgBundle msgBundle, ErrorReporter errorReporter)
msgBundle - The bundle of translated messages, or null to use the messages from the Soy
source.errorReporter - For reporting errors.public Void exec(SoyNode node)
NodeVisitorexec in interface NodeVisitor<SoyNode,Void>exec in class AbstractNodeVisitor<SoyNode,Void>node - The node to execute the function on.protected void visitMsgFallbackGroupNode(MsgFallbackGroupNode node)
visitMsgFallbackGroupNode in class AbstractSoyNodeVisitor<Void>protected void visitMsgHtmlTagNode(MsgHtmlTagNode node)
visitMsgHtmlTagNode in class AbstractSoyNodeVisitor<Void>protected void visitSoyNode(SoyNode node)
visitSoyNode in class AbstractSoyNodeVisitor<Void>node - the visited node.