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)); }
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); } }
public void Init(IInterpetedOperation <IInterpetedScope> left, IInterpetedMemberReferance <T> right) { Left = left ?? throw new ArgumentNullException(nameof(left)); Right = right ?? throw new ArgumentNullException(nameof(right)); }
public void Init(IInterpetedOperation <TIn> argument) { Argument = argument ?? throw new ArgumentNullException(nameof(argument)); }
public void Init(IInterpetedOperation left, IInterpetedOperation right) { Left = left ?? throw new ArgumentNullException(nameof(left)); Right = right ?? throw new ArgumentNullException(nameof(right)); }