Custom Syntax Highlighting

BlitzMax Forums/BlitzMax Programming/Custom Syntax Highlighting

Chroma(Posted 2007) [#1]
I want to put syntax highlighting into the IDE for my vector/math library. Can someone steer me in the right direction? I can't find any guide or help on basic "how to" for the IDE.


klepto2(Posted 2007) [#2]
If your lib is a module and has functions, then you have to add something like this to your module code:

You have two possibilties:

1.
before each of your functions add this kind of rem block
Rem
bbdoc: My Function is doing something
End Rem
Function MyFunction()
etc.
End Function


2.

after your whole functions add something like :

Rem
keyword: AddVector
End Rem
Rem
keyword: VectorCrossProduct
End Rem
... and so on


to get both methods to work you have to run docmods from the commandline with your module as a parameter.
eg: docmods myscope.modulename


[code]


ImaginaryHuman(Posted 2007) [#3]
Why don't opengl commands show as documented or with syntax hilighting?


Dreamora(Posted 2007) [#4]
Because they do not exist.
They are extern only, no BM functionality and not documented.


ImaginaryHuman(Posted 2007) [#5]
But from a programmers point of view they really should be at least hilited as real tokens rather than remain white - tokens aid making sure you spell stuff right.


Dreamora(Posted 2007) [#6]
Should yes.
But docmods isn't as "stable" as it would need to be to be assumed to be as usefull as javadoc / doxygen

For example if you have an empty line after the initial bbdoc remblock before the module line, the documentation totally fails.


klepto2(Posted 2007) [#7]


Replace this with the glew2bmx.bmx in the pub.glew folder and run it. then copy the content of 'glewbmxout.txt' as described in the first rem block. After that rebuild the opengl module and make docmods pub.opengl.


Bobysait(Posted 2010) [#8]
For any reason, this one or the original glew2bmx does not register const equal "1"
					If n[..2]="0x"
						Print "Const "+id+"=$"+n[2..]
					Else If n.length And isdigit(n[0]) And n<>"1"
						Print "Const "+id+"="+n
					EndIf


So it can't get GL_TRUE, or GL_ONE and many others...


Warpy(Posted 2010) [#9]
Didn't someone write a nicer bbdoc a few years ago? I made something for old bb2d, and someone ported and improved that.


Bobysait(Posted 2010) [#10]
whatever, I'm currently rewriting the code for glew2bmx