public ContainedFunctionBinder(SharedBinderState sharedBinderState, Binder parent, Binder containerBinder)
     : base(sharedBinderState, parent)
 {
     if (containerBinder == null)
         throw new ArgumentNullException(nameof(containerBinder));
     _containerBinder = containerBinder;
 }
 public ContainedFunctionBinder(SharedBinderState sharedBinderState, Binder parent, Binder containerBinder)
     : base(sharedBinderState, parent)
 {
     if (containerBinder == null)
     {
         throw new ArgumentNullException(nameof(containerBinder));
     }
     _containerBinder = containerBinder;
 }
Beispiel #3
0
        public static BindingResult Bind(SyntaxNode syntaxRoot, CancellationToken cancellationToken)
        {
            var sharedBinderState = new SharedBinderState(cancellationToken);

            var intrinsicBinder = new IntrinsicBinder(sharedBinderState);
            var binder          = new Binder(sharedBinderState, intrinsicBinder);

            var boundRoot = binder.Bind(syntaxRoot, binder.BindRoot);

            return(new BindingResult(syntaxRoot, boundRoot,
                                     sharedBinderState.BoundNodeFromSyntaxNode,
                                     sharedBinderState.BinderFromBoundNode,
                                     sharedBinderState.Diagnostics));
        }
Beispiel #4
0
 protected Binder(SharedBinderState sharedBinderState, Binder parent)
 {
     _sharedBinderState = sharedBinderState;
     _symbols           = new Dictionary <string, List <Symbol> >();
     Parent             = parent;
 }
Beispiel #5
0
 public ClassMethodBinder(SharedBinderState sharedBinderState, Binder parent, ClassSymbol classSymbol)
     : base(sharedBinderState, parent)
 {
     _classSymbol = classSymbol;
 }
Beispiel #6
0
 public NamespaceBinder(SharedBinderState sharedBinderState, Binder parent, NamespaceSymbol namespaceSymbol)
     : base(sharedBinderState, parent)
 {
     NamespaceSymbol = namespaceSymbol;
 }
Beispiel #7
0
 public ClassMethodBinder(SharedBinderState sharedBinderState, Binder parent, ClassSymbol classSymbol)
     : base(sharedBinderState, parent)
 {
     _classSymbol = classSymbol;
 }
Beispiel #8
0
 public IntrinsicBinder(SharedBinderState sharedBinderState)
     : base(sharedBinderState, null)
 {
 }
Beispiel #9
0
 public NamespaceBinder(SharedBinderState sharedBinderState, Binder parent, NamespaceSymbol namespaceSymbol)
     : base(sharedBinderState, parent)
 {
     NamespaceSymbol = namespaceSymbol;
 }
Beispiel #10
0
 public IntrinsicBinder(SharedBinderState sharedBinderState)
     : base(sharedBinderState, null)
 {
     
 }