예제 #1
0
 public ContainedFunctionBinder(SharedBinderState sharedBinderState, Binder parent, Binder containerBinder)
     : base(sharedBinderState, parent)
 {
     if (containerBinder == null)
         throw new ArgumentNullException(nameof(containerBinder));
     _containerBinder = containerBinder;
 }
예제 #2
0
 public ContainedFunctionBinder(SharedBinderState sharedBinderState, Binder parent, Binder containerBinder)
     : base(sharedBinderState, parent)
 {
     if (containerBinder == null)
     {
         throw new ArgumentNullException(nameof(containerBinder));
     }
     _containerBinder = containerBinder;
 }
예제 #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));
        }
예제 #4
0
 protected Binder(SharedBinderState sharedBinderState, Binder parent)
 {
     _sharedBinderState = sharedBinderState;
     _symbols           = new Dictionary <string, List <Symbol> >();
     Parent             = parent;
 }
예제 #5
0
 public ClassMethodBinder(SharedBinderState sharedBinderState, Binder parent, ClassSymbol classSymbol)
     : base(sharedBinderState, parent)
 {
     _classSymbol = classSymbol;
 }
예제 #6
0
 public NamespaceBinder(SharedBinderState sharedBinderState, Binder parent, NamespaceSymbol namespaceSymbol)
     : base(sharedBinderState, parent)
 {
     NamespaceSymbol = namespaceSymbol;
 }
예제 #7
0
 public ClassMethodBinder(SharedBinderState sharedBinderState, Binder parent, ClassSymbol classSymbol)
     : base(sharedBinderState, parent)
 {
     _classSymbol = classSymbol;
 }
예제 #8
0
 public IntrinsicBinder(SharedBinderState sharedBinderState)
     : base(sharedBinderState, null)
 {
 }
예제 #9
0
 public NamespaceBinder(SharedBinderState sharedBinderState, Binder parent, NamespaceSymbol namespaceSymbol)
     : base(sharedBinderState, parent)
 {
     NamespaceSymbol = namespaceSymbol;
 }
예제 #10
0
 public IntrinsicBinder(SharedBinderState sharedBinderState)
     : base(sharedBinderState, null)
 {
     
 }