Пример #1
0
 public object visitSingleDeclaration(SingleDeclaration expr, object arg)
 {
     idTable.enter(expr.Identifier.Spelling, expr);
     return(null);
 }
 internal TopLevelBuilder1(DiagnosticBag bag, Symbol owner, SingleDeclaration declaration, BinderContext enclosingContext)
     : base(owner, declaration, enclosingContext)
 {
     this.diagnosticBag = bag;
 }
Пример #3
0
        // process the base list for one part of a partial class, or for the only part of any other type declaration.
        protected virtual ImmutableArray <NamedTypeSymbol> ResolveBaseTypes(ConsList <TypeSymbol> newBasesBeingResolved, SingleDeclaration decl, DiagnosticBag diagnostics)
        {
            var result = ArrayBuilder <NamedTypeSymbol> .GetInstance();

            var boundNode = this.DeclaringCompilation.GetBoundNode <BoundSymbolDef>(decl.SyntaxReference.GetSyntax());

            Debug.Assert(boundNode != null);
            foreach (var prop in this.ModelSymbolInfo.Properties)
            {
                if (prop.IsBaseScope)
                {
                    var boundProperties = boundNode.GetChildProperties(prop.Name);
                    foreach (var boundProperty in boundProperties)
                    {
                        foreach (var boundValue in boundProperty.BoundValues)
                        {
                            foreach (var value in boundValue.Values)
                            {
                                var symbol = value as NamedTypeSymbol;
                                if (symbol != null)
                                {
                                    result.Add(symbol);
                                }
                                else
                                {
                                    diagnostics.Add(ModelErrorCode.ERR_InvalidBaseType, boundValue.Syntax.Location, value);
                                }
                            }
                        }
                    }
                }
            }
            return(result.ToImmutableAndFree());
        }
Пример #4
0
 internal NamespaceBuilder1(Symbol owner, SingleDeclaration declaration, BinderContext enclosingContext)
     : base(declaration.Location, owner, enclosingContext)
 {
     this.declaration = declaration;
 }
Пример #5
0
 internal TopLevelBuilder1(DiagnosticBag bag, Symbol owner, SingleDeclaration declaration, BinderContext enclosingContext)
     : base(owner, declaration, enclosingContext)
 {
     this.diagnosticBag = bag;
 }
 internal NamespaceBuilder1(Symbol owner, SingleDeclaration declaration, BinderContext enclosingContext)
     : base(declaration.Location, owner, enclosingContext)
 {
     this.declaration = declaration;
 }
Пример #7
0
 internal NamedTypeBuilder(Symbol accessor, SingleDeclaration declaration, BinderContext enclosing)
     : base(declaration.Location, accessor, enclosing)
 {
     this.Declaration = declaration;
 }