There's some confusion in the spec as to what really constitutes a symbol, and in turn how we check for and handle the keyword.other
, storage.modifier
and keyword.control
categories.
At the moment, we tokenize general symbols (e.g. :foo
) with a negative look behind checking for a :
. The colon here matches another representation, which is the keyword.operator.range.julia
category (previously operator.ternary) and what follows becomes constant.other.symbol.julia
.
Thus, we have two different colours highlighting one thing, and in the back end we get this complication that symbols are actually somehow also a range. The probable fix for this would be drop the negative look behind for symbols, but add a negative look ahead on the range.
The second point, which is where I feel some confusion comes in inside the spec are the checks for these three categories I listed above. Each have a test that matches scopes exactly the same as the symbols, so whilst they currently pass, it looks as though these tests are incomplete. In addition to that, storage.modifier
's test looks for :using
, but using
isn't even in storage.modifier
, it has its own category keyword.control.using.julia
.
What I think needs to happen here is actually drop the :
in front of each of the tests for these three categories. Why are we testing for symbols of these keywords anyway? I may be missing something here, but it seems to make more sense without the colons. Then the tests can be matched against the proper scopes.
If this gets sorted out, I'd say that #75 should also be inherently (or at least easily) solved.
I think I can fix these issues pretty quickly, but some feedback on my thoughts would be appreciated.