Custom Syntax Highlighting
BlitzMax Forums/BlitzMax Programming/Custom Syntax Highlighting
| ||
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. |
| ||
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] |
| ||
Why don't opengl commands show as documented or with syntax hilighting? |
| ||
Because they do not exist. They are extern only, no BM functionality and not documented. |
| ||
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. |
| ||
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. |
| ||
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. |
| ||
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... |
| ||
Didn't someone write a nicer bbdoc a few years ago? I made something for old bb2d, and someone ported and improved that. |
| ||
whatever, I'm currently rewriting the code for glew2bmx |