예제 #1
0
        public static BindingResult Bind(CompilationUnitSyntax compilationUnit, DataContext dataContext)
        {
            var sharedBinderState = new SharedBinderState();
            var binder            = new GlobalBinder(sharedBinderState, dataContext);
            var boundRoot         = binder.BindRoot(compilationUnit.Root);

            return(new BindingResult(compilationUnit, boundRoot, sharedBinderState.BoundNodeFromSynatxNode, sharedBinderState.BinderFromBoundNode, sharedBinderState.Diagnostics));
        }
예제 #2
0
        public GlobalBinder(SharedBinderState sharedBinderState, DataContext dataContext)
            : base(sharedBinderState, null)
        {
            var symbols = dataContext.Tables.Cast <Symbol>()
                          .Concat(dataContext.Functions)
                          .Concat(dataContext.Aggregates)
                          .Concat(dataContext.Variables);

            _dataContext = dataContext;
            LocalSymbols = SymbolTable.Create(symbols);
        }
예제 #3
0
 public JoinConditionBinder(SharedBinderState sharedBinderState, Binder parent, IEnumerable <Symbol> localSymbols)
     : base(sharedBinderState, parent, localSymbols)
 {
 }
예제 #4
0
 public QueryBinder(SharedBinderState sharedBinderState, Binder parent)
     : base(sharedBinderState, parent)
 {
     QueryState = new BoundQueryState(parent.QueryState);
 }
예제 #5
0
 public LocalBinder(SharedBinderState sharedBinderState, Binder parent, IEnumerable <Symbol> localSymbols)
     : base(sharedBinderState, parent)
 {
     LocalSymbols = SymbolTable.Create(ExpandTableInstances(localSymbols));
 }
예제 #6
0
 public AggregateArgumentBinder(SharedBinderState sharedBinderState, Binder parent)
     : base(sharedBinderState, parent)
 {
 }
예제 #7
0
 public GroupByClauseBinder(SharedBinderState sharedBinderState, Binder parent)
     : base(sharedBinderState, parent)
 {
 }
예제 #8
0
 protected Binder(SharedBinderState sharedBinderState, Binder parent)
 {
     Parent             = parent;
     _sharedBinderState = sharedBinderState;
 }
예제 #9
0
 public WhereClauseBinder(SharedBinderState sharedBinderState, Binder parent)
     : base(sharedBinderState, parent)
 {
 }