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
/Developer/Library/PrivateFrameworks/XcodeEdit.framework/Versions/A/Resources/
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)
Add
"xcode.lang.comment.singleline",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!
Vittorio
No comments:
Post a Comment