return ref;
}
private Ref contOp() throws PageException {
Ref ref = impOp();
while(cfml.forwardIfCurrent('?')) {
cfml.removeSpace();
if(cfml.forwardIfCurrent(':')){
cfml.removeSpace();
Ref right = assignOp();
//if(!(ref instanceof Variable))
// throw new InterpreterException("left operant of the Elvis operator has to be a variable declaration "+ref.getClass().getName());
ref=new Elvis(ref,right);
}
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);
}
}
return ref;
}