Ejemplo n.º 1
0
        public override IInterpetedResult <IInterpetedMember <IBoxedDouble> > Interpet(InterpetedContext interpetedContext)
        {
            var leftResult = Left.Interpet(interpetedContext);

            if (leftResult.IsReturn(out var leftReturned, out var leftValue))
            {
                return(InterpetedResult.Return <IInterpetedMember <IBoxedDouble> >(leftReturned));
            }

            var rightResult = Right.Interpet(interpetedContext);

            if (rightResult.IsReturn(out var rightReturned, out var rightValue))
            {
                return(InterpetedResult.Return <IInterpetedMember <IBoxedDouble> >(rightReturned));
            }

            return(InterpetedResult.Create(TypeManager.NumberMember(TypeManager.Double(
                                                                        leftValue.Value.Value -
                                                                        rightValue.Value.Value))));
        }
Ejemplo n.º 2
0
 public IInterpetedResult <IInterpetedMember <IBoxedDouble> > Interpet(InterpetedContext interpetedContext)
 {
     return(InterpetedResult.Create(TypeManager.NumberMember(TypeManager.Double(Value))));
 }