Browse Source

Don't export private decls.

Semant all imports before processing the current file.
Brucey 5 years ago
parent
commit
e2fd3b61a9
3 changed files with 20 additions and 2 deletions
  1. 5 0
      ctranslator.bmx
  2. 14 1
      decl.bmx
  3. 1 1
      options.bmx

+ 5 - 0
ctranslator.bmx

@@ -5301,6 +5301,8 @@ End Rem
 
 	Method EmitIfcClassFuncDecl(funcDecl:TFuncDecl)
 
+		If funcDecl.IsPrivate() Return
+
 		funcDecl.Semant
 
 		Local func:String
@@ -5487,6 +5489,9 @@ End Rem
 	End Method
 
 	Method EmitIfcFieldDecl(fieldDecl:TFieldDecl)
+	
+		If fieldDecl.IsPrivate() Return
+	
 		Local f:String
 		If fieldDecl.IsReadOnly() Then
 			f :+ "@"

+ 14 - 1
decl.bmx

@@ -4201,7 +4201,9 @@ Type TAppDecl Extends TScopeDecl
 'DebugStop		
 		_env=Null
 		pushenv Self
-		
+	
+		SemantImports()
+
 		SemantDataDefs()	
 
 		mainModule.Semant
@@ -4227,6 +4229,17 @@ Type TAppDecl Extends TScopeDecl
 		Next
 	End Method
 	
+	Method SemantImports()
+		For Local decl:TModuleDecl = EachIn globalImports.Values()
+			For Local cdecl:TClassDecl = EachIn decl._decls
+				If Not cdecl.IsSemanted() Then
+					cdecl.Semant()
+					cdecl.SemantParts()
+				End If
+			Next
+		Next
+	End Method
+	
 	Method SemantDataDefs()
 		TDefDataDecl.count = 0
 		

+ 1 - 1
options.bmx

@@ -25,7 +25,7 @@ SuperStrict
 
 Import "base.configmap.bmx"
 
-Const version:String = "0.126"
+Const version:String = "0.127"
 
 Const BUILDTYPE_APP:Int = 0
 Const BUILDTYPE_MODULE:Int = 1