I thought a lot of hierarchy problems could be solved by making JLScope a subclass of NSOperation.
This means:
Scopes don't have to be copied in order to have multiple parentScopes
A scope will not begin "performing" until every parent is finished, and then it will merge it's parent's indexes first. (Before: performing regex in each parent's indexSet separately could have caused some matches not to match)
A scope's identifier should now be completely unique (Wasn't the case before – copies)
A method like [self addTokenWithIdentifier:@"" pattern:@"" andScopes:@[ LINE_SCOPE, STRINGS ]]; will be easy to make. (Unique identifiers and simpler hierarchy)
Since the scopes are not longer reusable, this creates problems with the scope:didChangeIndexesFrom:to:-method. Will merge this to development instead.
I thought a lot of hierarchy problems could be solved by making
JLScope
a subclass ofNSOperation
.This means:
[self addTokenWithIdentifier:@"" pattern:@"" andScopes:@[ LINE_SCOPE, STRINGS ]];
will be easy to make. (Unique identifiers and simpler hierarchy)