Search in sources :

Example 1 with Elvis

use of lucee.runtime.interpreter.ref.op.Elvis in project Lucee by lucee.

the class CFMLExpressionInterpreter method contOp.

private Ref contOp() throws PageException {
    Ref ref = impOp();
    while (cfml.forwardIfCurrent('?')) {
        cfml.removeSpace();
        if (cfml.forwardIfCurrent(':')) {
            cfml.removeSpace();
            Ref right = assignOp();
            ref = new Elvis(ref, right, limited);
        } else {
            Ref left = assignOp();
            if (!cfml.forwardIfCurrent(':'))
                throw new InterpreterException("Syntax Error, invalid conditional operator [" + cfml.toString() + "]");
            cfml.removeSpace();
            Ref right = assignOp();
            ref = new Cont(ref, left, right, limited);
        }
    }
    return ref;
}
Also used : Ref(lucee.runtime.interpreter.ref.Ref) Cont(lucee.runtime.interpreter.ref.op.Cont) Elvis(lucee.runtime.interpreter.ref.op.Elvis)

Aggregations

Ref (lucee.runtime.interpreter.ref.Ref)1 Cont (lucee.runtime.interpreter.ref.op.Cont)1 Elvis (lucee.runtime.interpreter.ref.op.Elvis)1