"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/dmd/dimport.d" between
dmd-2.094.1.tar.gz and dmd-2.094.2.tar.gz

About: DMD (Digital Mars D) is the D reference compiler. D is an object-oriented, imperative, multi-paradigm system programming language.

dimport.d  (dmd-2.094.1):dimport.d  (dmd-2.094.2)
skipping to change at line 25 skipping to change at line 25
import dmd.declaration; import dmd.declaration;
import dmd.dmodule; import dmd.dmodule;
import dmd.dscope; import dmd.dscope;
import dmd.dsymbol; import dmd.dsymbol;
import dmd.dsymbolsem; import dmd.dsymbolsem;
import dmd.errors; import dmd.errors;
import dmd.expression; import dmd.expression;
import dmd.globals; import dmd.globals;
import dmd.identifier; import dmd.identifier;
import dmd.mtype; import dmd.mtype;
import dmd.root.rmem;
import dmd.visitor; import dmd.visitor;
/*********************************************************** /***********************************************************
*/ */
extern (C++) final class Import : Dsymbol extern (C++) final class Import : Dsymbol
{ {
/* static import aliasId = pkg1.pkg2.id : alias1 = name1, alias2 = name2; /* static import aliasId = pkg1.pkg2.id : alias1 = name1, alias2 = name2;
*/ */
Identifiers* packages; // array of Identifier's representing packages Identifiers* packages; // array of Identifier's representing packages
Identifier id; // module Identifier Identifier id; // module Identifier
skipping to change at line 269 skipping to change at line 268
Dsymbol.addMember(sc, sd); Dsymbol.addMember(sc, sd);
/* Instead of adding the import to sd's symbol table, /* Instead of adding the import to sd's symbol table,
* add each of the alias=name pairs * add each of the alias=name pairs
*/ */
for (size_t i = 0; i < names.dim; i++) for (size_t i = 0; i < names.dim; i++)
{ {
Identifier name = names[i]; Identifier name = names[i];
Identifier _alias = aliases[i]; Identifier _alias = aliases[i];
if (!_alias) if (!_alias)
_alias = name; _alias = name;
auto tname = Pool!TypeIdentifier.make(loc, name); auto tname = new TypeIdentifier(loc, name);
auto ad = new AliasDeclaration(loc, _alias, tname); auto ad = new AliasDeclaration(loc, _alias, tname);
ad._import = this; ad._import = this;
ad.addMember(sc, sd); ad.addMember(sc, sd);
aliasdecls.push(ad); aliasdecls.push(ad);
} }
} }
override void setScope(Scope* sc) override void setScope(Scope* sc)
{ {
Dsymbol.setScope(sc); Dsymbol.setScope(sc);
 End of changes. 2 change blocks. 
2 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)