public class HandleCssCommandVisitor extends AbstractSoyNodeVisitor<Void>
Important: Do not use outside of Soy code (treat as superpackage-private).
exec(com.google.template.soy.soytree.SoyNode)
must be called on a full parse tree.
Each scheme is handled as follows: (a) LITERAL: Turn each CssNode into a RawTextNode. (b) REFERENCE: Turn each CssNode into a PrintNode. (c) BACKEND_SPECIFIC: Don't change anything. Let backend handle 'css' commands.
Constructor and Description |
---|
HandleCssCommandVisitor(SoyGeneralOptions.CssHandlingScheme cssHandlingScheme) |
Modifier and Type | Method and Description |
---|---|
Void |
exec(SoyNode node)
Executes the function defined by this visitor.
|
protected void |
visitCssNode(CssNode node) |
protected void |
visitSoyFileSetNode(SoyFileSetNode node) |
protected void |
visitSoyNode(SoyNode node) |
visit, visitCallBasicNode, visitCallDelegateNode, visitCallNode, visitCallParamContentNode, visitCallParamNode, visitCallParamValueNode, visitChildren, visitChildrenAllowingConcurrentModification, visitDebuggerNode, visitForeachIfemptyNode, visitForeachNode, visitForeachNonemptyNode, visitForNode, visitGoogMsgDefNode, visitGoogMsgRefNode, visitIfCondNode, visitIfElseNode, visitIfNode, visitLetContentNode, visitLetNode, visitLetValueNode, visitLogNode, visitLoopNode, visitMsgFallbackGroupNode, visitMsgHtmlTagNode, visitMsgNode, visitMsgPlaceholderNode, visitMsgPluralCaseNode, visitMsgPluralDefaultNode, visitMsgPluralNode, visitMsgPluralRemainderNode, visitMsgSelectCaseNode, visitMsgSelectDefaultNode, visitMsgSelectNode, visitMsgSubstUnitNode, visitPrintDirectiveNode, visitPrintNode, visitRawTextNode, visitSoyFileNode, visitSwitchCaseNode, visitSwitchDefaultNode, visitSwitchNode, visitTemplateBasicNode, visitTemplateDelegateNode, visitTemplateNode, visitXidNode
visitChildren, visitChildrenAllowingConcurrentModification
public HandleCssCommandVisitor(SoyGeneralOptions.CssHandlingScheme cssHandlingScheme)
cssHandlingScheme
- Scheme for handling 'css' commands.public Void exec(SoyNode node)
NodeVisitor
exec
in interface NodeVisitor<SoyNode,Void>
exec
in class AbstractNodeVisitor<SoyNode,Void>
node
- The node to execute the function on.protected void visitSoyFileSetNode(SoyFileSetNode node)
visitSoyFileSetNode
in class AbstractSoyNodeVisitor<Void>
protected void visitCssNode(CssNode node)
visitCssNode
in class AbstractSoyNodeVisitor<Void>
protected void visitSoyNode(SoyNode node)
visitSoyNode
in class AbstractSoyNodeVisitor<Void>
node
- the visited node.