Search in sources :

Example 6 with LString

use of lucee.runtime.interpreter.ref.literal.LString in project Lucee by lucee.

the class CFMLExpressionInterpreter method functionArgDeclarationVarString.

/**
 * Liest einen gelableten  Funktionsparamter ein
 * <br />
 * EBNF:<br />
 * <code>assignOp [":" spaces assignOp];</code>
 * @return CFXD Element
 * @throws PageException
 */
private Ref functionArgDeclarationVarString() throws PageException {
    cfml.removeSpace();
    StringBuilder str = new StringBuilder();
    String id = null;
    while ((id = identifier(false)) != null) {
        if (str.length() > 0)
            str.append('.');
        str.append(id);
        cfml.removeSpace();
        if (!cfml.forwardIfCurrent('.'))
            break;
        cfml.removeSpace();
    }
    cfml.removeSpace();
    if (str.length() > 0 && cfml.charAt(cfml.getPos() - 1) != '.')
        return new LString(str.toString());
    throw new InterpreterException("invalid variable name definition");
}
Also used : LString(lucee.runtime.interpreter.ref.literal.LString) ParserString(lucee.commons.lang.ParserString) LString(lucee.runtime.interpreter.ref.literal.LString)

Aggregations

LString (lucee.runtime.interpreter.ref.literal.LString)6 Ref (lucee.runtime.interpreter.ref.Ref)5 ParserString (lucee.commons.lang.ParserString)4 BIFCall (lucee.runtime.interpreter.ref.func.BIFCall)3 ArrayList (java.util.ArrayList)2 ExpressionException (lucee.runtime.exp.ExpressionException)2 Casting (lucee.runtime.interpreter.ref.cast.Casting)2 LFunctionValue (lucee.runtime.interpreter.ref.literal.LFunctionValue)2 FunctionLibFunction (lucee.transformer.library.function.FunctionLibFunction)2 FunctionLibFunctionArg (lucee.transformer.library.function.FunctionLibFunctionArg)2 Key (lucee.runtime.type.Collection.Key)1