Search in sources :

Example 1 with InstOfExpr

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

the class DefaultEvaluator method visit.

/**
 * visit instance of expression
 *
 * @param ioexp
 *            is the instance of expression.
 * @return a new function
 */
public Object visit(InstOfExpr ioexp) {
    // get the value
    ResultSequence rs = (ResultSequence) ioexp.left().accept(this);
    // get the sequence type
    SequenceType seqt = (SequenceType) ioexp.right();
    return ResultSequenceFactory.create_new(new XSBoolean(isInstanceOf(rs, seqt)));
}
Also used : ResultSequence(org.eclipse.wst.xml.xpath2.api.ResultSequence) XSBoolean(org.eclipse.wst.xml.xpath2.processor.internal.types.XSBoolean) SequenceType(org.eclipse.wst.xml.xpath2.processor.internal.ast.SequenceType)

Aggregations

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