Search in sources :

Example 1 with TagWhile

use of lucee.transformer.bytecode.statement.tag.TagWhile in project Lucee by lucee.

the class While method evaluate.

@Override
public void evaluate(Tag tag, TagLibTag tagLibTag, FunctionLib[] flibs) throws EvaluatorException {
    TagWhile whil = (TagWhile) tag;
    // label
    if (ASMUtil.isLiteralAttribute(tag, "label", ASMUtil.TYPE_STRING, false, true)) {
        LitString ls = (LitString) tag.getFactory().toExprString(tag.getAttribute("label").getValue());
        String l = ls.getString();
        if (!StringUtil.isEmpty(l, true)) {
            whil.setLabel(l.trim());
            tag.removeAttribute("label");
        }
    }
}
Also used : LitString(lucee.transformer.expression.literal.LitString) TagWhile(lucee.transformer.bytecode.statement.tag.TagWhile) LitString(lucee.transformer.expression.literal.LitString)

Aggregations

TagWhile (lucee.transformer.bytecode.statement.tag.TagWhile)1 LitString (lucee.transformer.expression.literal.LitString)1