Saturday, 7 November 2009

another xcode goody

Xcode is a really good IDE and you never end to delve into his internals!
Today i have found how syntax highlighting works! Every type of language has its own syntax definitions and its own file where such definition is specified.

ALL files are found here


The syntax for the syntax (all puns intended) is quite symple and quite commented considering that they're internal files.

by tweaking the Pascal syntax file specification i was able to fix a nasty glitch that was affecting the single line comments present in FreePascal files -- a // comment was ignored by the syntax highlighter and printed in black, while as a comment should be printed in green (colors may vary according to configurations)

at line 101 of file Pascal.xlangspec to fix the glitch!

There might be more fun in tweaking these files (or bricking xcode) but i simply hadn't time to dedicate! If you know other tweaks post them in the comments!


No comments:

Post a Comment

All the projects here are under a Creative Commons 3.0 licence! You can use and distribute them as you like (just quote the author so he knows his work is not useless)!

If you wish to get in touch with me write at