Package com.google.template.soy.soytree

Examples of com.google.template.soy.soytree.PrintNode.addChild()


    // If this CssNode has componentName, add a PrintNode (with '|id' directive) to print it.
    ExprRootNode<?> componentNameExpr = node.getComponentNameExpr();
    if (componentNameExpr != null) {
      PrintNode pn =
          new PrintNode(nodeIdGen.genId(), false, new ExprUnion(componentNameExpr), null);
      pn.addChild(new PrintDirectiveNode(nodeIdGen.genId(), "|id", ""));
      parent.addChild(indexInParent, pn);
      indexInParent += 1;
    }

    // Add a RawTextNode for the selectorText. Also includes preceding dash ("-") if there is a
View Full Code Here


        newNode = new RawTextNode(nodeIdGen.genId(), cssNode.getCommandText());

      } else if (cssHandlingScheme == CssHandlingScheme.REFERENCE) {
        PrintNode newPrintNode =
            new PrintNode(nodeIdGen.genId(), false, cssNode.getCommandText(), null);
        newPrintNode.addChild(new PrintDirectiveNode(nodeIdGen.genId(), "|noAutoescape", ""));
        newNode = newPrintNode;
        // Check that the expression is a valid reference.
        boolean isInvalidExpr = false;
        if (newPrintNode.getExprUnion().getExpr() == null) {
          isInvalidExpr = true;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.