Ver Fonte

Removed makedocs debug output and added links to enums.

Mark Sibly há 7 anos atrás
pai
commit
f5232a9a15

+ 1 - 1
src/mx2cc/newdocs/docsbuffer.monkey2

@@ -43,7 +43,7 @@ Class DocsBuffer
 			Return
 		Endif
 
-		If _pre=-1 line=tline Else Print line
+		If _pre=-1 line=tline
 		
 		If Not line And _lines.Length And Not _lines.Top Return
 		

+ 23 - 1
src/mx2cc/newdocs/docsmaker.monkey2

@@ -326,7 +326,7 @@ Class DocsMaker
 
 			If Not name 
 				name=path
-				If _module=ctype.transFile.module
+				If module=_module
 					Local i:=name.FindLast( "." )
 					If i<>-1 name=name.Slice( i+1 )
 				Endif
@@ -335,6 +335,28 @@ Class DocsMaker
 			Return outer+"[["+module.name+":"+path+"|"+name+"]]"+types
 		Endif
 		
+		Local etype:=Cast<EnumType>( type )
+		If etype
+			
+			Local module:=etype.transFile.module
+			
+			Local outer:=""
+			Local cscope:=Cast<ClassScope>( etype.scope.outer )
+			If cscope And Not name outer=TypeName( cscope.ctype )+"."
+			
+			Local path:=etype.Name
+			
+			If Not name
+				name=path
+				If module=_module
+					Local i:=name.FindLast( "." )
+					If i<>-1 name=name.Slice( i+1 )
+				Endif
+			Endif
+			
+			Return outer+"[["+module.name+":"+path+"|"+name+"]]"
+		Endif
+		
 		Local gtype:=Cast<GenArgType>( type )
 		If gtype
 			Return gtype.ident