Search in sources :

Example 26 with Variable

use of lucee.transformer.expression.var.Variable in project Lucee by lucee.

the class AbstrCFMLExprTransformer method _modOp.

private Expression _modOp(ExprData data, Expression expr) throws TemplateException {
    if (data.srcCode.isCurrent('=') && expr instanceof Variable) {
        data.srcCode.next();
        comments(data);
        Expression right = assignOp(data);
        ExprDouble res = OpDouble.toExprDouble(expr, right, OpDouble.MODULUS);
        return new OpVariable((Variable) expr, res, data.srcCode.getPosition());
    }
    comments(data);
    return OpDouble.toExprDouble(expr, expoOp(data), OpDouble.MODULUS);
}
Also used : OpVariable(lucee.transformer.bytecode.op.OpVariable) Variable(lucee.transformer.expression.var.Variable) ExprDouble(lucee.transformer.expression.ExprDouble) OpVariable(lucee.transformer.bytecode.op.OpVariable) FunctionAsExpression(lucee.transformer.bytecode.expression.FunctionAsExpression) Expression(lucee.transformer.expression.Expression)

Aggregations

Variable (lucee.transformer.expression.var.Variable)26 Expression (lucee.transformer.expression.Expression)16 OpVariable (lucee.transformer.bytecode.op.OpVariable)14 FunctionAsExpression (lucee.transformer.bytecode.expression.FunctionAsExpression)12 TemplateException (lucee.runtime.exp.TemplateException)8 Position (lucee.transformer.Position)5 Argument (lucee.transformer.bytecode.expression.var.Argument)5 BIF (lucee.transformer.bytecode.expression.var.BIF)5 ExprString (lucee.transformer.expression.ExprString)5 OPUnary (lucee.transformer.bytecode.op.OPUnary)4 LitString (lucee.transformer.expression.literal.LitString)4 Member (lucee.transformer.expression.var.Member)4 Body (lucee.transformer.bytecode.Body)3 Assign (lucee.transformer.bytecode.expression.var.Assign)3 Literal (lucee.transformer.expression.literal.Literal)3 TransformerException (lucee.transformer.TransformerException)2 Statement (lucee.transformer.bytecode.Statement)2 FunctionMember (lucee.transformer.bytecode.expression.var.FunctionMember)2 NamedArgument (lucee.transformer.bytecode.expression.var.NamedArgument)2 Identifier (lucee.transformer.bytecode.literal.Identifier)2