Package com.google.template.soy.exprtree.OperatorNodes

Examples of com.google.template.soy.exprtree.OperatorNodes.NotOpNode


    ExprRootNode<?> expr = (new ExpressionParser("-11")).parseExpression();
    NegativeOpNode negOp = (NegativeOpNode) expr.getChild(0);
    assertEquals(11, ((IntegerNode) negOp.getChild(0)).getValue());

    expr = (new ExpressionParser("not false")).parseExpression();
    NotOpNode notOp = (NotOpNode) expr.getChild(0);
    assertEquals(false, ((BooleanNode) notOp.getChild(0)).getValue());

    expr = (new ExpressionParser("90 -14.75")).parseExpression();
    MinusOpNode minusOp = (MinusOpNode) expr.getChild(0);
    assertEquals(90, ((IntegerNode) minusOp.getChild(0)).getValue());
    assertEquals(14.75, ((FloatNode) minusOp.getChild(1)).getValue());
View Full Code Here


    //       [DataRefNode] $x

    // Root n0.
    ConditionalOpNode n0 = new ConditionalOpNode();
    // Children of n0.
    NotOpNode n1 = new NotOpNode();
    NotEqualOpNode n2 = new NotEqualOpNode();
    TimesOpNode n3 = new TimesOpNode();
    n0.addChild(n1);
    n0.addChild(n2);
    n0.addChild(n3);
    // Child of n1.
    n1.addChild(x);
    // Children of n2.
    n2.addChild(x);
    n2.addChild(x);
    // Children of n3.
    n3.addChild(x);
View Full Code Here

TOP

Related Classes of com.google.template.soy.exprtree.OperatorNodes.NotOpNode

Copyright © 2018 www.massapicom. 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.