diff options
author | paltherr <paltherr@epfl.ch> | 2005-02-01 13:40:37 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2005-02-01 13:40:37 +0000 |
commit | 67b84cefdb6b0c00efe04ddd57a836395d6395f9 (patch) | |
tree | 9a764194733a372712fa04206476ab13b0ec5fb4 /sources/scalac/symtab/classfile/PackageParser.java | |
parent | 0f88183f98998ccff74003ea5c373ad0401edb10 (diff) | |
download | scala-67b84cefdb6b0c00efe04ddd57a836395d6395f9.tar.gz scala-67b84cefdb6b0c00efe04ddd57a836395d6395f9.tar.bz2 scala-67b84cefdb6b0c00efe04ddd57a836395d6395f9.zip |
- Added origin to loaded symbols.
Diffstat (limited to 'sources/scalac/symtab/classfile/PackageParser.java')
-rw-r--r-- | sources/scalac/symtab/classfile/PackageParser.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sources/scalac/symtab/classfile/PackageParser.java b/sources/scalac/symtab/classfile/PackageParser.java index 05e1276cf7..fdbc796916 100644 --- a/sources/scalac/symtab/classfile/PackageParser.java +++ b/sources/scalac/symtab/classfile/PackageParser.java @@ -20,6 +20,7 @@ import scalac.symtab.Scope; import scalac.symtab.SourceCompleter; import scalac.symtab.Symbol; import scalac.symtab.SymbolLoader; +import scalac.symtab.SymbolOrigin; import scalac.symtab.Type; import scalac.util.Name; import scalac.util.Debug; @@ -183,7 +184,8 @@ public class PackageParser extends SymbolLoader { AbstractFile sfile = (AbstractFile)entry.getValue(); Name classname = Name.fromString(name).toTypeName(); SymbolLoader loader = new SourceCompleter(global, sfile); - clasz.newLoadedClass(0, classname, loader, members); + SymbolOrigin origin = SymbolOrigin.ScalaFile(sfile); + clasz.newLoadedClass(0, classname, loader, members, origin); } for (Iterator i = symbols.entrySet().iterator(); i.hasNext(); ) { HashMap.Entry entry = (HashMap.Entry)i.next(); @@ -191,7 +193,8 @@ public class PackageParser extends SymbolLoader { AbstractFile zfile = (AbstractFile)entry.getValue(); Name classname = Name.fromString(name).toTypeName(); SymbolLoader loader = new SymblParser(global, zfile); - clasz.newLoadedClass(0, classname, loader, members); + SymbolOrigin origin = SymbolOrigin.SymblFile(zfile); + clasz.newLoadedClass(0, classname, loader, members, origin); } for (Iterator i = classes.entrySet().iterator(); i.hasNext(); ) { HashMap.Entry entry = (HashMap.Entry)i.next(); @@ -199,14 +202,17 @@ public class PackageParser extends SymbolLoader { AbstractFile cfile = (AbstractFile)entry.getValue(); Name classname = Name.fromString(name).toTypeName(); SymbolLoader loader = new ClassParser(global, cfile); - clasz.newLoadedClass(JAVA, classname, loader, members); + SymbolOrigin origin = SymbolOrigin.ClassFile(cfile, null); + clasz.newLoadedClass(JAVA, classname, loader, members, origin); } for (Iterator i = packages.entrySet().iterator(); i.hasNext(); ) { HashMap.Entry entry = (HashMap.Entry)i.next(); String name = (String)entry.getKey(); AbstractFile dfile = (AbstractFile)entry.getValue(); + Name packagename = Name.fromString(name); SymbolLoader loader = newPackageParser(dfile); - clasz.newLoadedPackage(Name.fromString(name), loader, members); + SymbolOrigin origin = SymbolOrigin.Directory(dfile); + clasz.newLoadedPackage(packagename, loader, members, origin); } return members; } |