@Override
	public void visitOperator(XTreeOperator operator) {
		super.visitOperator(operator);
		XTree t = operator.exprs.get(0);
		if(!(t instanceof XTreeConstant))
			return;
		XTreeConstant left = (XTreeConstant)t;
		while(!operator.operators.isEmpty()){
			XOperator o = operator.operators.get(0);
			t = operator.exprs.get(1);
			if(!(t instanceof XTreeConstant)){
				break;
			}
			XTreeConstant right = (XTreeConstant)t;
			try{
				right.value = o.calc(left.value, right.value);
			}catch(UnsupportedOperationException e){
				break;
			}catch(ClassCastException e){
				addDiagnostic(right, "invalid.data.types", e.getMessage());
				break;
			}
			left = right;
			operator.operators.remove(0);
			operator.exprs.remove(0);
		}
		if(operator.operators.isEmpty()){
			setReplace(left);
		}
	}