Search in sources :

Example 1 with Operator

use of org.projectnessie.cel.common.operators.Operator in project cel-java by projectnessie.

the class Unparser method visitCall.

void visitCall(Call expr) {
    Operator op = Operator.byId(expr.getFunction());
    if (op != null) {
        switch(op) {
            // ternary operator
            case Conditional:
                visitCallConditional(expr);
                return;
            // index operator
            case Index:
                visitCallIndex(expr);
                return;
            // unary operators
            case LogicalNot:
            case Negate:
                visitCallUnary(expr);
                return;
            // binary operators
            case Add:
            case Divide:
            case Equals:
            case Greater:
            case GreaterEquals:
            case In:
            case Less:
            case LessEquals:
            case LogicalAnd:
            case LogicalOr:
            case Modulo:
            case Multiply:
            case NotEquals:
            case OldIn:
            case Subtract:
                visitCallBinary(expr);
                return;
        }
    }
    // standard function calls.
    visitCallFunc(expr);
}
Also used : Operator(org.projectnessie.cel.common.operators.Operator)

Aggregations

Operator (org.projectnessie.cel.common.operators.Operator)1