Search in sources :

Example 1 with ExprString

use of org.csstudio.autocomplete.parser.engine.expr.ExprString in project yamcs-studio by yamcs.

the class ExprParser method parseValue.

private void parseValue(ExprToken e) throws ExprException {
    Expr value = null;
    switch(e.type) {
        case Decimal:
            value = new ExprDouble(e.doubleValue);
            break;
        case Integer:
            value = new ExprInteger(e.integerValue);
            break;
        case String:
            value = new ExprString(e.val);
            break;
        case Variable:
            value = new ExprVariable(e.val);
            break;
        case QuotedVariable:
            value = new ExprPV(e.val);
            break;
        default:
            break;
    }
    setValue(value);
}
Also used : ExprDouble(org.csstudio.autocomplete.parser.engine.expr.ExprDouble) Expr(org.csstudio.autocomplete.parser.engine.expr.Expr) ExprString(org.csstudio.autocomplete.parser.engine.expr.ExprString) ExprPV(org.csstudio.autocomplete.parser.engine.expr.ExprPV) ExprInteger(org.csstudio.autocomplete.parser.engine.expr.ExprInteger) ExprVariable(org.csstudio.autocomplete.parser.engine.expr.ExprVariable)

Aggregations

Expr (org.csstudio.autocomplete.parser.engine.expr.Expr)1 ExprDouble (org.csstudio.autocomplete.parser.engine.expr.ExprDouble)1 ExprInteger (org.csstudio.autocomplete.parser.engine.expr.ExprInteger)1 ExprPV (org.csstudio.autocomplete.parser.engine.expr.ExprPV)1 ExprString (org.csstudio.autocomplete.parser.engine.expr.ExprString)1 ExprVariable (org.csstudio.autocomplete.parser.engine.expr.ExprVariable)1