use of lucee.runtime.interpreter.ref.op.Negate in project Lucee by lucee.
the class CFMLExpressionInterpreter method negateMinusOp.
/**
* Liest die Vordlobe einer Zahl ein
* @return CFXD Element
* @throws PageException
*/
private Ref negateMinusOp() throws PageException {
// And Operation
if (cfml.forwardIfCurrent('-')) {
if (cfml.forwardIfCurrent('-')) {
cfml.removeSpace();
Ref expr = clip();
Ref res = preciseMath ? new BigMinus(expr, new LNumber(new Double(1)), limited) : new Minus(expr, new LNumber(new Double(1)), limited);
return new Assign(expr, res, limited);
}
cfml.removeSpace();
return new Negate(clip(), limited);
}
if (cfml.forwardIfCurrent('+')) {
if (cfml.forwardIfCurrent('+')) {
cfml.removeSpace();
Ref expr = clip();
Ref res = preciseMath ? new BigPlus(expr, new LNumber(new Double(1)), limited) : new Plus(expr, new LNumber(new Double(1)), limited);
return new Assign(expr, res, limited);
}
cfml.removeSpace();
return new Casting("numeric", CFTypes.TYPE_NUMERIC, clip());
}
return clip();
}
Aggregations