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;
}
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;
}
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()]);
}
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();
}
Aggregations