public void Init(IInterpetedOperation left, IInterpetedOperation right, IInterpetedOperation block, IInterpetedScopeTemplate scope)
 {
     Left  = left ?? throw new ArgumentNullException(nameof(left));
     Right = right ?? throw new ArgumentNullException(nameof(right));
     Block = block ?? throw new ArgumentNullException(nameof(block));
     Scope = scope ?? throw new ArgumentNullException(nameof(scope));
 }
Ejemplo n.º 2
0
 private IInterpetedOperation <IInterpetedAnyType> MethodDefinition <TIn, TOut>(IInternalMethodDefinition codeElement)
     where TIn : class, IInterpetedAnyType
     where TOut : class, IInterpetedAnyType
 {
     if (backing.TryGetValue(codeElement, out var res))
     {
         return(res);
     }
     else
     {
         var op = new InterpetedMethodDefinition <TIn, TOut>();
         backing.Add(codeElement, op);
         op.Init(
             MemberDefinition(codeElement.ParameterDefinition).Cast <InterpetedMemberDefinition <TIn> >(),
             codeElement.Body.Select(x => x.Convert(this)).ToArray(),
             new InterpetedScopeTemplate(codeElement.Scope, codeElement.Scope.ToVerifiableType()),
             codeElement.Returns().Cast <IMethodType>());
         if (codeElement.IsEntryPoint)
         {
             // sloppy this should be on the prop
             if (EntryPoint == null)
             {
                 EntryPoint = op.Cast <IInterpetedOperation <IInterpetedMethod <IInterpedEmpty, IInterpedEmpty> > >();
             }
             else
             {
                 new Exception("we already have an entry point");
             }
         }
         return(op);
     }
 }
Ejemplo n.º 3
0
 public void Init(IInterpetedOperation <IInterpetedScope> left, IInterpetedMemberReferance <T> right)
 {
     Left  = left ?? throw new ArgumentNullException(nameof(left));
     Right = right ?? throw new ArgumentNullException(nameof(right));
 }
Ejemplo n.º 4
0
 public void Init(IInterpetedOperation <TIn> argument)
 {
     Argument = argument ?? throw new ArgumentNullException(nameof(argument));
 }
Ejemplo n.º 5
0
 public void Init(IInterpetedOperation left, IInterpetedOperation right)
 {
     Left  = left ?? throw new ArgumentNullException(nameof(left));
     Right = right ?? throw new ArgumentNullException(nameof(right));
 }