Пример #1
0
            public IIsPossibly <WeakPathOperation> Run(IResolvableScope scope, IResolveReferenceContext context)
            {
                var res = Possibly.Is(new WeakPathOperation(
                                          left.Run(scope, context),
                                          Possibly.Is(new WeakMemberReference(left.GetReturnedType().GetMemberDefinition(new NameKey(name))))));

                return(res);
            }
Пример #2
0
            public IIsPossibly <IWeakTypeReference> Run(IResolvableScope scope, IResolveReferenceContext context)
            {
                var res = make(
                    left.Run(scope, context),
                    right.Run(scope, context));

                return(res);
            }
Пример #3
0
            public IIsPossibly <TFrontendCodeElement> Run(IResolvableScope scope, IResolveReferenceContext context)
            {
                var res = make(
                    left.Run(scope, context),
                    right.Run(scope, context));

                return(res);
            }
Пример #4
0
            public IIsPossibly <WeakAssignOperation> Run(IResolvableScope scope, IResolveReferenceContext context)
            {
                var leftRes = left.Run(scope, context);
                var res     = Possibly.Is(new WeakAssignOperation(
                                              leftRes,
                                              right.Run(scope, context)));

                return(res);
            }
Пример #5
0
            public IIsPossibly <WeakMemberReference> Run(IResolvableScope scope, IResolveReferenceContext context)
            {
                memberDefinitionBox.Fill(
                    Possibly.Is(
                        new WeakMemberDefinition(
                            isReadonly,
                            memberName,
                            type.Run(scope, context))));

                return(Possibly.Is(new WeakMemberReference(Possibly.Is(memberDefinitionBox))));
            }
Пример #6
0
 public IIsPossibly <WeakMethodDefinition> Run(IResolvableScope _, IResolveReferenceContext context)
 {
     return
         (Possibly.Is(
              new WeakMethodDefinition(
                  output.Run(methodScope, context),
                  parameter.Run(methodScope, context).IfIs(x => x.MemberDefinition),
                  lines.Select(x => x.Run(methodScope, context)).ToArray(),
                  methodScope,
                  new IIsPossibly <IConvertableFrontendCodeElement <ICodeElement> > [0], isEntryPoint)));
 }
Пример #7
0
            public IIsPossibly <WeakImplementationDefinition> Run(IResolvableScope _, IResolveReferenceContext context)
            {
                var innerRes = new WeakImplementationDefinition(
                    contextDefinition.Run(methodScope, context).IfIs(x => x.MemberDefinition),
                    parameterDefinition.Run(methodScope, context).IfIs(x => x.MemberDefinition),
                    output.Run(methodScope, context),
                    elements.Select(x => x.Run(methodScope, context)).ToArray(),
                    methodScope,
                    new IConvertableFrontendCodeElement <ICodeElement> [0]);

                var res = Possibly.Is(innerRes);

                return(res);
            }