1 22 23 24 package org.xquark.xquery.parser; 25 26 import org.xquark.xquery.parser.util.Constants; 27 import org.xquark.xquery.typing.TypeException; 28 29 public class ListOpCompExpression extends XQueryListBinaryOperatorExpression implements Cloneable { 30 31 private static final String RCSRevision = "$Revision: 1.6 $"; 32 private static final String RCSName = "$Name: $"; 33 34 protected int operator = -1; 36 37 41 public void accept(ParserVisitor visitor) throws XQueryException { 42 visitor.visit(this); 43 } 44 45 49 public ListOpCompExpression(XQueryExpression expression1, XQueryExpression expression2, int operator, XQueryModule parentModule) throws TypeException, XQueryException { 50 super(expression1,expression2); 51 this.operator = operator; 52 setParentModule(parentModule); 53 if (parentModule != null && parentModule.getStaticContext().getTypeVisitor() != null) 54 accept(parentModule.getStaticContext().getTypeVisitor()); 55 } 56 57 61 public int getOperator() { return operator; } 62 public void setOperator(int operator) throws XQueryException { 63 if (operator == -1 || operator > Constants.MAX_COMPOP) 64 throw new XQueryException("operator of ListOpCompExpression has incorrect value " + operator); 65 this.operator = operator ; 66 } 67 68 } 69 70 71 72 | Popular Tags |