public void Visit(LenExpressionOperator @operator, EqualityCheckResult state)
 {
     state.AreEqual = state.Other is LenExpressionOperator otherOperator &&
                      @operator.Operator == otherOperator.Operator &&
                      Check(@operator.LeftOperand, otherOperator.LeftOperand) &&
                      Check(@operator.RightOperand, otherOperator.RightOperand);
 }
Exemplo n.º 2
0
        public void Visit(LenExpressionOperator @operator, ExpressionBuildState state)
        {
            switch (@operator.Operator)
            {
            case LenOperatorType.Divide:
                var left  = Build(@operator.LeftOperand, state.Resolve);
                var right = Build(@operator.RightOperand, state.Resolve);

                state.Result = Divide(left, Cast("float", right));
                break;

            case LenOperatorType.Ceiling:
                var value = Build(@operator.LeftOperand, state.Resolve);

                state.Result = StaticCall("Math", "Ceiling", Cast("float", value));
                break;

            default:
                throw new NotImplementedException();
            }
        }
 public void Visit(LenExpressionOperator @operator, TokenCheckResult state)
 {
     @operator.LeftOperand.Visit(this, state);
     @operator.RightOperand?.Visit(this, state);
 }