public ResolveReferanceBlockDefinition( IResolvableScope scope, IPopulateBoxes <IFrontendCodeElement>[] resolveReferance) { this.scope = scope ?? throw new ArgumentNullException(nameof(scope)); this.resolveReferance = resolveReferance ?? throw new ArgumentNullException(nameof(resolveReferance)); }
public ResolveReferanceObjectDefinition( IResolvableScope scope, IPopulateBoxes <IFrontendCodeElement>[] elements) { this.scope = scope ?? throw new ArgumentNullException(nameof(scope)); this.elements = elements ?? throw new ArgumentNullException(nameof(elements)); }
public WeakBlockDefinition( IIsPossibly <IFrontendCodeElement>[] body, IResolvableScope scope, IEnumerable <IIsPossibly <IFrontendCodeElement> > staticInitailizers) : base(scope, body, staticInitailizers) { }
public IIsPossibly <IWeakTypeReference> Run(IResolvableScope scope, IResolveReferenceContext context) { var res = make( left.Run(scope, context), right.Run(scope, context)); return(res); }
public static IPopulateBoxes <WeakModuleDefinition> PopulateBoxes(IResolvableScope scope, IPopulateBoxes <IConvertableFrontendCodeElement <ICodeElement> >[] resolveReferance, NameKey nameKey) { return(new ModuleDefinitionResolveReferance(scope, resolveReferance, nameKey)); }
internal static IBox <IIsPossibly <IWeakMemberDefinition> > GetMemberOrThrow(this IResolvableScope scope, IKey name, bool staticOnly) { if (scope.TryGetMember(name, staticOnly, out var thing)) { return(thing); } throw new Exception($"{name} should exist in scope"); }
public IIsPossibly <TFrontendCodeElement> Run(IResolvableScope scope, IResolveReferenceContext context) { var res = make( left.Run(scope, context), right.Run(scope, context)); return(res); }
internal static IBox <IIsPossibly <IFrontendType> > GetTypeOrThrow(this IResolvableScope scope, IKey name) { if (scope.TryGetType(name, out var thing)) { return(thing); } throw new Exception($"{name} should exist in scope"); }
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); }
public IPopulateBoxes <WeakMemberReference> Run(IResolvableScope scope, IFinalizeScopeContext context) { return(new MemberDefinitionResolveReferance( memberName, isReadonly, type.Run(scope, context), memberDefinitionBox)); }
public WeakGenericTypeDefinition( IIsPossibly <NameKey> key, IResolvableScope scope, IIsPossibly <IGenericTypeParameterPlacholder>[] TypeParameterDefinitions) { this.TypeParameterDefinitions = TypeParameterDefinitions ?? throw new ArgumentNullException(nameof(TypeParameterDefinitions)); Key = key ?? throw new ArgumentNullException(nameof(key)); Scope = scope ?? throw new ArgumentNullException(nameof(scope)); }
public ModuleDefinitionResolveReferance( IResolvableScope scope, IPopulateBoxes <IFrontendCodeElement>[] resolveReferance, NameKey nameKey) { this.scope = scope ?? throw new ArgumentNullException(nameof(scope)); this.resolveReferance = resolveReferance ?? throw new ArgumentNullException(nameof(resolveReferance)); this.nameKey = nameKey ?? throw new ArgumentNullException(nameof(nameKey)); }
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); }
public IIsPossibly <WeakBlockDefinition> Run(IResolvableScope _, IResolveReferenceContext context) { return (Possibly.Is( new WeakBlockDefinition( resolveReferance.Select(x => x.Run(scope, context)).ToArray(), scope, new IIsPossibly <IConvertableFrontendCodeElement <ICodeElement> > [0]))); }
protected WeakAbstractBlockDefinition( IResolvableScope scope, IIsPossibly <IFrontendCodeElement>[] body, IEnumerable <IIsPossibly <IFrontendCodeElement> > staticInitailizers) { Scope = scope ?? throw new ArgumentNullException(nameof(scope)); Body = body ?? throw new ArgumentNullException(nameof(body)); StaticInitailizers = staticInitailizers ?? throw new ArgumentNullException(nameof(staticInitailizers)); }
public IIsPossibly <WeakObjectDefinition> Run(IResolvableScope _, IResolveReferenceContext context) { var innerRes = new WeakObjectDefinition( scope, elements.Select(x => x.Run(scope, context).Cast <IIsPossibly <WeakAssignOperation> >()).ToArray()); var res = Possibly.Is(innerRes); return(res); }
public IPopulateBoxes <WeakModuleDefinition> Run(IResolvableScope parent, IFinalizeScopeContext context) { var finalScope = scope.FinalizeScope(parent); return(new ModuleDefinitionResolveReferance( finalScope, elements.Select(x => x.Run(finalScope, context)).ToArray(), nameKey)); }
public WeakObjectDefinition(IResolvableScope scope, IEnumerable <IIsPossibly <WeakAssignOperation> > assigns) { if (assigns == null) { throw new ArgumentNullException(nameof(assigns)); } Scope = scope ?? throw new ArgumentNullException(nameof(scope)); Assignments = assigns.ToArray(); }
public static IPopulateBoxes <IWeakTypeReference> PopulateBoxes(IResolvableScope scope, Box <IIsPossibly <WeakTypeDefinition> > definitionBox, WeakTypeReference typeReferance, IKey key) { return(new TypeDefinitionResolveReference(scope, definitionBox, typeReferance, key)); }
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))); }
public IPopulateBoxes <WeakImplementationDefinition> Run(IResolvableScope parent, IFinalizeScopeContext context) { var scope = finalizableScope.FinalizeScope(parent); return(new ImplementationDefinitionResolveReferance( scope, contextDefinition.Run(scope, context), parameterDefinition.Run(scope, context), elements.Select(x => x.Run(scope, context)).ToArray(), output.Run(scope, context))); }
public IPopulateBoxes <WeakMethodDefinition> Run(IResolvableScope parent, IFinalizeScopeContext context) { var scope = methodScope.FinalizeScope(parent); return(new MethodDefinitionResolveReferance( scope, parameter.Run(scope, context), lines.Select(x => x.Run(scope, context)).ToArray(), output.Run(scope, context), isEntryPoint)); }
public TypeDefinitionResolveReference( IResolvableScope resolvableScope, Box <IIsPossibly <WeakTypeDefinition> > definitionBox, WeakTypeReference typeReferance, IKey key) { this.resolvableScope = resolvableScope ?? throw new ArgumentNullException(nameof(resolvableScope)); this.definitionBox = definitionBox ?? throw new ArgumentNullException(nameof(definitionBox)); this.typeReferance = typeReferance ?? throw new ArgumentNullException(nameof(typeReferance)); this.key = key ?? throw new ArgumentNullException(nameof(key)); }
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)))); }
public IIsPossibly <WeakModuleDefinition> Run(IResolvableScope _, IResolveReferenceContext context) { var innerRes = new WeakModuleDefinition( scope, resolveReferance.Select(x => x.Run(scope, context)).ToArray(), nameKey); var res = Possibly.Is(innerRes); return(res); }
public WeakMethodDefinition( IIsPossibly <IWeakTypeReference> outputType, IIsPossibly <IBox <IIsPossibly <IWeakMemberDefinition> > > parameterDefinition, IIsPossibly <IFrontendCodeElement>[] body, IResolvableScope scope, IEnumerable <IIsPossibly <IConvertableFrontendCodeElement <ICodeElement> > > staticInitializers, bool isEntryPoint) : base(scope ?? throw new ArgumentNullException(nameof(scope)), body, staticInitializers) { OutputType = outputType ?? throw new ArgumentNullException(nameof(outputType)); ParameterDefinition = parameterDefinition ?? throw new ArgumentNullException(nameof(parameterDefinition)); IsEntryPoint = isEntryPoint; }
public static IPopulateBoxes <WeakGenericTypeDefinition> PopulateBoxes(NameKey nameKey, IResolvableScope scope, Box <IIsPossibly <IFrontendGenericType> > box, IGenericTypeParameterPlacholder[] genericParameters, IPopulateBoxes <IConvertableFrontendCodeElement <ICodeElement> >[] lines) { return(new GenericTypeDefinitionResolveReferance(nameKey, scope, box, genericParameters, lines)); }
public IIsPossibly <WeakGenericTypeDefinition> Run(IResolvableScope _, IResolveReferenceContext context) { // hmm getting the template down here is hard // scope mostly comes from context // why is that? var nextLines = lines.Select(x => x.Run(this.scope, context)).ToArray(); return(box.Fill(Possibly.Is(new WeakGenericTypeDefinition( Possibly.Is(nameKey), this.scope, genericParameters.Select(x => Possibly.Is(x)).ToArray())))); }
public ImplementationDefinitionResolveReferance( IResolvableScope methodScope, IPopulateBoxes <WeakMemberReference> contextDefinition, IPopulateBoxes <WeakMemberReference> parameterDefinition, IPopulateBoxes <IFrontendCodeElement>[] elements, IPopulateBoxes <IWeakTypeReference> output) { this.methodScope = methodScope ?? throw new ArgumentNullException(nameof(methodScope)); this.contextDefinition = contextDefinition ?? throw new ArgumentNullException(nameof(contextDefinition)); this.parameterDefinition = parameterDefinition ?? throw new ArgumentNullException(nameof(parameterDefinition)); this.elements = elements ?? throw new ArgumentNullException(nameof(elements)); this.output = output ?? throw new ArgumentNullException(nameof(output)); }
public GenericTypeDefinitionResolveReferance( NameKey nameKey, IResolvableScope scope, Box <IIsPossibly <IFrontendGenericType> > box, IGenericTypeParameterPlacholder[] genericParameters, IPopulateBoxes <IFrontendCodeElement>[] lines) { this.nameKey = nameKey ?? throw new ArgumentNullException(nameof(nameKey)); this.scope = scope ?? throw new ArgumentNullException(nameof(scope)); this.box = box ?? throw new ArgumentNullException(nameof(box)); this.genericParameters = genericParameters ?? throw new ArgumentNullException(nameof(genericParameters)); this.lines = lines ?? throw new ArgumentNullException(nameof(lines)); }