DOCMODS Documentation Generation - BUG.

BlitzMax Forums/BlitzMax Programming/DOCMODS Documentation Generation - BUG.

Damien Sturdy(Posted 2008) [#1]
Hi,

When generating the documentation for our Module, we noticed that you cannot have two methods with the same name under different types.

for instance:

Type type1
  Method Update()
  End Method
end type

Type type2
  Method Update()
  End Method
end type


Any documentation for this layout is borked. Type2's UPDATE hyperlink jumps to Type1's Update description!

Now, I tried to fix this but could not read this code. (It's been so long since I wrote code like that.)

Has anyone worked around this- or- could anyone point me in the right direction TO fix it?

I do not have all my dev tools here, but I managed to grab a copy of docparser.bmx.

	While FindIdent( "#",t,i,e )
	
		While e<t.length-1 And t[e]=Asc(".") And IsAlpha( t[e+1] )
			e:+2
			While e<t.length And IsAlpha(t[e])
				e:+1
			Wend
		Wend
		
		Local id$=t[i+1..e],q=id.Find("."),ln$

		If q=-1
			ln="<a href=#"+id+">"+id+"</a>"
		Else
			ln="<a href=../../../"
			Repeat
				ln:+id[..q]+".mod/"
				id=id[q+1..]
				q=id.Find(".")
			Until q=-1
			ln:+"doc/commands.html#"+id+">"+id+"</a>"
		EndIf
			
		t=t[..i]+ln+t[e..]
		i:+ln.length
	Wend


What I need to make it do is as simple as anything- I need to make it take the TYPE into consideration, so ID is "<Type>"+ID.

I took a look myself, I tried a few things in search of where it stores the TYPE, if it does at all, but then my machine won't compile it, lots of __ missing identifier stuff! (Yes I do have mingw installed, environment set up etc. I use xp64, and it's playing up a lot)

I don't understand why it didn't take the Type into consideration to begin with?


[edit]

http://www.blitzbasic.com/Community/posts.php?topic=75807#847274

I'm not the only one.


plash(Posted 2008) [#2]
End Method()

What??


Damien Sturdy(Posted 2008) [#3]
Wow- That's an amazing contribution.

If you couldn't tell, I typed that straight into the post box. It's just an example of a layout that causes the docs to cock up.