InitFromInfile() public method

public InitFromInfile ( InputFile infile ) : void
infile InputFile
return void
Ejemplo n.º 1
0
        /////////////////////////////////////////////////////////////////////////////////
        public AggregateSymbol CreateAggregate(Name name, NamespaceOrAggregateSymbol parent, InputFile infile, TypeManager typeManager)
        {
            if (name == null || parent == null || infile == null || typeManager == null)
            {
                throw Error.InternalCompilerError();
            }

            AggregateSymbol sym = null;

            if (infile.GetAssemblyID() == KAID.kaidUnresolved)
            {
                // Unresolved aggs need extra storage.
                sym = CreateUnresolvedAggregate(name, parent, typeManager);
            }
            else
            {
                sym      = newBasicSym(SYMKIND.SK_AggregateSymbol, name, parent).AsAggregateSymbol();
                sym.name = name;
                sym.SetTypeManager(typeManager);
                sym.SetSealed(false);
                sym.SetAccess(ACCESS.ACC_UNKNOWN);
                sym.initBogus();
                sym.SetIfaces(null);
                sym.SetIfacesAll(null);
                sym.SetTypeVars(null);
            }

            sym.InitFromInfile(infile);
            return(sym);
        }