Пример #1
0
 internal static IInterpetedImplementation Implementation(InterpetedMemberDefinition parameterDefinition,
                                                          InterpetedMemberDefinition contextDefinition,
                                                          IInterpetedOperation[] body,
                                                          InterpetedContext context,
                                                          IInterpetedScopeTemplate scope,
                                                          IMethodType implementationType)
 => Root(new Func <IRunTimeAnyRoot, RunTimeAnyRootEntry>[] { InterpetedImplementationIntention(parameterDefinition, contextDefinition, body, context, scope, implementationType) }).Has <IInterpetedImplementation>();
Пример #2
0
 internal static Func <IRunTimeAnyRoot, RunTimeAnyRootEntry> InterpetedMethodIntention(
     InterpetedMemberDefinition parameterDefinition,
     IInterpetedOperation[] body,
     InterpetedContext context,
     IInterpetedScopeTemplate scope,
     IMethodType methodType)
 => root => {
     var item = new InterpetedMethod(parameterDefinition, body, context, scope, methodType, root);
     return(new RunTimeAnyRootEntry(item, methodType));
 };
Пример #3
0
 public void Init(
     InterpetedMemberDefinition parameterDefinition,
     IInterpetedOperation[] methodBody,
     IInterpetedScopeTemplate scope,
     IMethodType methodType)
 {
     ParameterDefinition = parameterDefinition ?? throw new ArgumentNullException(nameof(parameterDefinition));
     Body       = methodBody ?? throw new ArgumentNullException(nameof(methodBody));
     Scope      = scope ?? throw new ArgumentNullException(nameof(scope));
     MethodType = methodType ?? throw new ArgumentNullException(nameof(methodType));
 }
Пример #4
0
 public IInterpetedOperation MemberDefinition(IMemberDefinition member)
 {
     if (backing.TryGetValue(member, out var res))
     {
         return(res);
     }
     else
     {
         var interpetedMemberDefinition = new InterpetedMemberDefinition();
         backing.Add(member, interpetedMemberDefinition);
         return(interpetedMemberDefinition.Init(member.Key, member.Type));
     }
 }
Пример #5
0
 public InterpetedMethod(
     InterpetedMemberDefinition parameterDefinition,
     IInterpetedOperation[] body,
     InterpetedContext context,
     IInterpetedScopeTemplate scope,
     IMethodType methodType,
     IRunTimeAnyRoot root) : base(root)
 {
     ParameterDefinition = parameterDefinition ?? throw new System.ArgumentNullException(nameof(parameterDefinition));
     Body       = body ?? throw new System.ArgumentNullException(nameof(body));
     Context    = context ?? throw new System.ArgumentNullException(nameof(context));
     Scope      = scope ?? throw new System.ArgumentNullException(nameof(scope));
     MethodType = methodType ?? throw new ArgumentNullException(nameof(methodType));
 }
Пример #6
0
 public InterpetedImplementation(
     InterpetedMemberDefinition parameterDefinition,
     InterpetedMemberDefinition contextDefinition,
     IInterpetedOperation[] body,
     InterpetedContext context,
     IInterpetedScopeTemplate scope,
     IMethodType implementationType,
     IRunTimeAnyRoot root) : base(root)
 {
     ParameterDefinition    = parameterDefinition ?? throw new ArgumentNullException(nameof(parameterDefinition));
     this.contextDefinition = contextDefinition ?? throw new ArgumentNullException(nameof(contextDefinition));
     Body = body ?? throw new ArgumentNullException(nameof(body));
     InterpetedContext  = context ?? throw new ArgumentNullException(nameof(context));
     Scope              = scope ?? throw new ArgumentNullException(nameof(scope));
     ImplementationType = implementationType ?? throw new ArgumentNullException(nameof(implementationType));
 }
Пример #7
0
 public InterpetedMemberReferance Init(InterpetedMemberDefinition memberDefinition)
 {
     MemberDefinition = memberDefinition ?? throw new ArgumentNullException(nameof(memberDefinition));
     return(this);
 }