Search in sources :

Example 31 with Ref

use of lucee.runtime.interpreter.ref.Ref in project Lucee by lucee.

the class CFMLExpressionInterpreter method _concat.

private Ref _concat(Ref ref) throws PageException {
    // &=
    if (cfml.forwardIfCurrent('=')) {
        cfml.removeSpace();
        Ref right = assignOp();
        Ref res = new Concat(ref, right, limited);
        ref = new Assign(ref, res, limited);
    } else {
        cfml.removeSpace();
        ref = new Concat(ref, plusMinusOp(), limited);
    }
    return ref;
}
Also used : Concat(lucee.runtime.interpreter.ref.op.Concat) Ref(lucee.runtime.interpreter.ref.Ref) Assign(lucee.runtime.interpreter.ref.var.Assign) DynAssign(lucee.runtime.interpreter.ref.var.DynAssign)

Example 32 with Ref

use of lucee.runtime.interpreter.ref.Ref in project Lucee by lucee.

the class CFMLExpressionInterpreter method _multi.

private Ref _multi(Ref ref) throws PageException {
    // \=
    if (cfml.forwardIfCurrent('=')) {
        cfml.removeSpace();
        Ref right = assignOp();
        Ref res = preciseMath ? new BigMulti(ref, right, limited) : new Multi(ref, right, limited);
        ref = new Assign(ref, res, limited);
    } else {
        cfml.removeSpace();
        ref = preciseMath ? new BigMulti(ref, expoOp(), limited) : new Multi(ref, expoOp(), limited);
    }
    return ref;
}
Also used : Ref(lucee.runtime.interpreter.ref.Ref) BigMulti(lucee.runtime.interpreter.ref.op.BigMulti) Multi(lucee.runtime.interpreter.ref.op.Multi) Assign(lucee.runtime.interpreter.ref.var.Assign) DynAssign(lucee.runtime.interpreter.ref.var.DynAssign) BigMulti(lucee.runtime.interpreter.ref.op.BigMulti)

Example 33 with Ref

use of lucee.runtime.interpreter.ref.Ref in project Lucee by lucee.

the class LFunctionValue method toStringArray.

public static String[] toStringArray(PageContext pc, Set set) throws PageException {
    Ref ref = set;
    String str;
    List<String> arr = new ArrayList<String>();
    do {
        set = (Set) ref;
        str = set.getKeyAsString(pc);
        if (str != null)
            arr.add(0, str);
        else
            break;
        ref = set.getParent(pc);
    } while (ref instanceof Set);
    return arr.toArray(new String[arr.size()]);
}
Also used : Ref(lucee.runtime.interpreter.ref.Ref) Set(lucee.runtime.interpreter.ref.Set) ArrayList(java.util.ArrayList)

Example 34 with Ref

use of lucee.runtime.interpreter.ref.Ref in project Lucee by lucee.

the class LStringBuffer method getValue.

@Override
public Object getValue(PageContext pc) throws PageException {
    if (refs.size() == 0)
        return sb.toString();
    StringBuffer tmp = new StringBuffer();
    Iterator it = refs.iterator();
    while (it.hasNext()) {
        tmp.append(Caster.toString(((Ref) it.next()).getValue(pc)));
    }
    if (sb.length() > 0)
        tmp.append(sb);
    return tmp.toString();
}
Also used : Ref(lucee.runtime.interpreter.ref.Ref) Iterator(java.util.Iterator)

Aggregations

Ref (lucee.runtime.interpreter.ref.Ref)34 Assign (lucee.runtime.interpreter.ref.var.Assign)9 DynAssign (lucee.runtime.interpreter.ref.var.DynAssign)9 ArrayList (java.util.ArrayList)6 Casting (lucee.runtime.interpreter.ref.cast.Casting)6 BIFCall (lucee.runtime.interpreter.ref.func.BIFCall)6 LString (lucee.runtime.interpreter.ref.literal.LString)6 FunctionLibFunctionArg (lucee.transformer.library.function.FunctionLibFunctionArg)5 ParserString (lucee.commons.lang.ParserString)4 FunctionLibFunction (lucee.transformer.library.function.FunctionLibFunction)4 ExpressionException (lucee.runtime.exp.ExpressionException)3 LFunctionValue (lucee.runtime.interpreter.ref.literal.LFunctionValue)3 BigPlus (lucee.runtime.interpreter.ref.op.BigPlus)3 Plus (lucee.runtime.interpreter.ref.op.Plus)3 BigIntDiv (lucee.runtime.interpreter.ref.op.BigIntDiv)2 BigMinus (lucee.runtime.interpreter.ref.op.BigMinus)2 Concat (lucee.runtime.interpreter.ref.op.Concat)2 IntDiv (lucee.runtime.interpreter.ref.op.IntDiv)2 Minus (lucee.runtime.interpreter.ref.op.Minus)2 Key (lucee.runtime.type.Collection.Key)2