mahmoudalismail/SublimeC0 — pull request #1 by iasEnvy (2014-05-31 18:09:43+00:00)
Title: C0.tmLanguage

Added scopes for functions, structs & contract annotations, and then removed a scope which highlighted my name because I want to believe I don't have an ego problem. The regex for directives at the top I copied from the coin interpreter's help description, but the only one people would ever actually have is the #use. I can't remember if the original had broken string literals or if I introduced that error, but it works as expected now. I also couldn't figure out how to limit things by a number because the usual regex of (scope){repetitions}, so for hexadecimal literals, I copypasted the A-F0-9 match eight times. It's really sloppy.

Finally, I couldn't figure out how to use captures from the file itself to then highlight later elements, so I hardcoded in some types that I was using. If there was some way to store all the things after a typedef, it could dynamically find all the types being defined and highlight them, but I don't know how to do such.