Page 1 of 1

Writing a custom syntax highlighter?

Posted: Fri Oct 31, 2014 3:54 am
by EssoAir
Hey guys!

I know this is nothing new, syntax highlighting has been implemented in every language since the dawn of multi-colored screens. But I can't seem to find someone that's implemented it in LiveCode. I'm more of the C-like syntax type coder and so I kinda need help here. I want make an IDE for a custom language I'm creating. I think LiveCode would be a great language to write this part in since I can make a cross-platform UI, but then use get shell() to talk to the compiler for my custom language. But all this syntax highlighting is confusing on its own. Add to it LC's syntax (which confuses me) and I'm sort of between a rock and a hard place.

I'd really appreciate any help at all!

Thanks!
EssoAir

Re: Writing a custom syntax highlighter?

Posted: Fri Oct 31, 2014 4:45 am
by FourthWorld
Everyhthing in the LiveCode IDE is written in LiveCode. You can explore things like the Script Editor's syntax highlighting by choosing "LiveCode UI elements appear in lists of stacks" in the Preferences window.

Re: Writing a custom syntax highlighter?

Posted: Fri Oct 31, 2014 5:33 am
by [-hh]
Do you mean syntax highlighting by colors only?

The stack #44 (Nuzzler7b.livecode) of the "RaspberryPi Stacks" collection contains a colorizing script (= lines 70-294 of the stack's script; this is from the use-list archive by W. Abraham et al.).

You could use this as a base for your work relating to LiveCode scripts.

Re: Writing a custom syntax highlighter?

Posted: Wed Nov 12, 2014 1:41 pm
by EssoAir
Thanks guy! I'm not really sure yet, tbh. I'm just trying to figure everything out. I'll have to check out both of those suggestions once I get to the implementation stage.

Re: Writing a custom syntax highlighter?

Posted: Wed Nov 12, 2014 2:30 pm
by dunbarx
Check out therecent thread in the "Features" section of the forum about this issue.

Craig Newman

Re: Writing a custom syntax highlighter?

Posted: Wed Nov 12, 2014 8:46 pm
by dunbarx
See the spectacular results of a great detective in the "feature request" forum. All is right with the world.

Craig Newman