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;
}