Introjucer Mod: XML & Lua Code Editors (Kudos to other JUCE Users)

Thanks to atom and chrisboy2000, code has been made available to tokenise and colourise Lua and XML code.

I've put their code into the Introjucer, if you'd like to give it a whirl.




If everyone involved is happy to waive their copyright on this stuff (sure, I know these aren't huge amounts of code, but gotta be careful about that kind of thing..), then I'd be glad to merge it in!

Totally fine for me. In fact it makes me a little proud that my code becomes part of JUCE :) 

Perhaps you can alter the colour settings for it to make it consistent within the different tokenizers (I don't know about the Lua tokenizer but I chose the colours quite randomly)

no problem on my side.

Thanks chaps - I've added this now, though TBH very little (maybe none!) of the original code remains after I'd cleaned it up..

The XML parser was pretty far off the mark and I just rewrote that completely, but part of the problem is that the CodeTokeniser base class has to be used statelessly, and doing XML does involves some statefulness. Anyway, I quickly hacked it into a half-decent version that works statelessly, but don't have the time/inclination to add support for tokeniser state that'd be needed to do a more complete implementation.

This is all cool stuff to have though - thanks for getting it rolling!


Just spotted the Lua tokeniser. We have also just added Lua in our application but unfortunately we are using an older version of JUCE.

You can still add multiline strings (delimited by [[ ]] ):

s = [[multi

Similarly Lua has block comments (delimited by --[[ to ]] ):