Search in sources :

Example 1 with IfExpr

use of org.eclipse.wst.xml.xpath2.processor.internal.ast.IfExpr in project webtools.sourceediting by eclipse.

the class DefaultEvaluator method visit.

/**
 * visit if expression
 *
 * @param ifex
 *            is the if expression.
 * @return a ifex.then_clause().accept(this).
 */
public Object visit(IfExpr ifex) {
    ResultSequence test_res = do_expr(ifex.iterator());
    XSBoolean res = effective_boolean_value(test_res);
    if (res.value())
        return ifex.then_clause().accept(this);
    else
        return ifex.else_clause().accept(this);
}
Also used : ResultSequence(org.eclipse.wst.xml.xpath2.api.ResultSequence) XSBoolean(org.eclipse.wst.xml.xpath2.processor.internal.types.XSBoolean)

Aggregations

ResultSequence (org.eclipse.wst.xml.xpath2.api.ResultSequence)1 XSBoolean (org.eclipse.wst.xml.xpath2.processor.internal.types.XSBoolean)1