I’ve been reading up on the documentation regarding syntax definitions, and this part confuses me:
This is a small portion of the default Ruby.tmLanguage that ships with Sublime. It’s used to highlight @instance and @@class variables, and it does so perfectly, but I don’t quite understand how. Take this snippet of code, for instance:
@foo = 1
@@bar = 2
After the first rule runs, all that’s left is:
= 1
@ = 2
So… how does Sublime correctly highlight both forms? Essentially, I’d appreciate it very much if somebody could give me the basic rundown of the precedence rules applied when handling these sorts of edge cases. What does the documentation mean by “a few exceptions”, and where would it be indicated that these exceptions should be accounted for? Thanks in advance for any help in this matter.