Search in sources :

Example 1 with UnaryOperator

use of org.apache.sling.scripting.sightly.compiler.expression.nodes.UnaryOperator in project sling by apache.

the class ExpressionTranslator method visit.

@Override
public void visit(UnaryOperation unaryOperation) {
    UnaryOperator operator = unaryOperation.getOperator();
    ExpressionNode operand = unaryOperation.getTarget();
    UnaryOpGen unaryOpGen = Operators.generatorFor(operator);
    source.startExpression();
    unaryOpGen.generate(source, this, typeInfo.getTyped(operand));
    source.endExpression();
}
Also used : ExpressionNode(org.apache.sling.scripting.sightly.compiler.expression.ExpressionNode) UnaryOpGen(org.apache.sling.scripting.sightly.java.compiler.impl.operator.UnaryOpGen) UnaryOperator(org.apache.sling.scripting.sightly.compiler.expression.nodes.UnaryOperator)

Aggregations

ExpressionNode (org.apache.sling.scripting.sightly.compiler.expression.ExpressionNode)1 UnaryOperator (org.apache.sling.scripting.sightly.compiler.expression.nodes.UnaryOperator)1 UnaryOpGen (org.apache.sling.scripting.sightly.java.compiler.impl.operator.UnaryOpGen)1