private XTreeExpr mergeStatements(XTreePosition position, XTreeExpr left, XOperator o, XTreeExpr right, XTreeExpr between){
		if(left instanceof XTreeOperator){
			XTreeOperator oLeft = (XTreeOperator) left;
			if(oLeft.operators.get(0).priority<o.priority){
				oLeft.exprs.set(oLeft.exprs.size()-1,  mergeStatements(position, oLeft.exprs.get(oLeft.exprs.size()-1), o, right, between));
				return oLeft;
			}else{
				if(o==XOperator.IF)
					return new XTreeOperatorIf(position, left, between, right);
				if(oLeft.operators.get(0).priority==o.priority){
					oLeft.operators.add(o);
					oLeft.exprs.add(right);
					return oLeft;
				}else{
					List<XTreeExpr> exprs = new ArrayList<XTreeExpr>();
					exprs.add(left);
					exprs.add(right);
					List<XOperator> operators = new ArrayList<XOperator>();
					operators.add(o);
					return new XTreeOperator(position, exprs, operators);
				}
			}
		}else if(left instanceof XTreeOperatorIf){
			XTreeOperatorIf oLeft = (XTreeOperatorIf) left;
			if(XOperator.IF.priority<o.priority){
				oLeft.onFalse = mergeStatements(position, oLeft.onFalse, o, right, between);
				return oLeft;
			}else{
				if(o==XOperator.IF)
					return new XTreeOperatorIf(position, left, between, right);
				List<XTreeExpr> exprs = new ArrayList<XTreeExpr>();
				exprs.add(left);
				exprs.add(right);
				List<XOperator> operators = new ArrayList<XOperator>();
				operators.add(o);
				return new XTreeOperator(position, exprs, operators);
			}
		}else{
			if(o==XOperator.IF)
				return new XTreeOperatorIf(position, left, between, right);
			List<XTreeExpr> exprs = new ArrayList<XTreeExpr>();
			exprs.add(left);
			exprs.add(right);
			List<XOperator> operators = new ArrayList<XOperator>();
			operators.add(o);
			return new XTreeOperator(position, exprs, operators);
		}
	}