Closed JoshuaBatty closed 9 years ago
Yeah, I have that in mind. I just need to break apart the brackets & parens as text blocks.
Also, the syntax parser considers non-string, non whitespace text blocks entries as "words". I added support for breaking up these "words" with a new MATCHING_CHAR type so highlighting your example will now work:
If you're going to do a PR with the new example, can you name it editorGLSLSyntaxExample?
Awesome thanks! I have submitted a pull request with a basic live coding GLSL example with syntax highlighting turned on for you to review. I added in + - / * into ofxEditorSettings so that syntax highlighting would still occur in the event of ( float t = 10.0+sin(u_time); ) for example.
Hi Akira,
Firstly thanks a bunch for the amazing editor, really is coming along nicely. I have just forked the library as i'm creating a syntax highlighting example for GLSL. You can see it here https://github.com/JoshuaBatty/ofxGLEditor/tree/master/GLSLeditorSyntaxExample
What would be great is for GLSL keywords to be detected for highlighting without needing to provide a " " (space) for them to be detected. This way you could write the following for example and sytax highlighting would still occur on abs and sin...
float t = abs(sin(u_time)); instead of: float t = abs ( sin ( u_time));
Obviously the first example is a lot nicer to write and read so would be great for the glsl functions to still highlight using this method.... any ideas?
Cheers.