Search in sources :

Example 1 with TreatAsExpr

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

the class DefaultEvaluator method visit.

/**
 * visit treat-as expression
 *
 * @param taexp
 *            is the treat-as expression.
 * @return a new function
 */
public Object visit(TreatAsExpr taexp) {
    ResultSequence rs = (ResultSequence) taexp.left().accept(this);
    SequenceType seqt = (SequenceType) taexp.right();
    SeqType st = new SeqType(seqt, _sc, rs);
    try {
        st.match(rs);
    } catch (DynamicError err) {
        report_error(err);
    }
    return rs;
}
Also used : ResultSequence(org.eclipse.wst.xml.xpath2.api.ResultSequence) SeqType(org.eclipse.wst.xml.xpath2.processor.internal.SeqType) SequenceType(org.eclipse.wst.xml.xpath2.processor.internal.ast.SequenceType)

Aggregations

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