Browse Source

Set modpath for imported files, as it is used as a key for loaded "modules".

woollybah 11 years ago
parent
commit
f81f2d4a7b
1 changed files with 5 additions and 2 deletions
  1. 5 2
      iparser.bmx

+ 5 - 2
iparser.bmx

@@ -61,14 +61,17 @@ Type TIParser
 
 		Const STATE_CLASS:Int = 1
 		
-		
+		If Not modpath Then
+			modpath = imp
+		End If
+
 		' already imported??
 		If _appInstance.IsImported(modpath)
 			' add import to the scope (so we can find decls in it later)
 			pmod.imported.Insert(modpath, _appInstance.globalImports.ValueForKey(modpath))
 			Return False
 		End If
-	
+		
 		Local _mod:TModuleDecl = New TModuleDecl.Create(modpath, "bb" + modpath, path, attrs)
 		Select modpath
 			Case "brl.classes", "brl.blitzkeywords"