Hello,
I’m trying to understand syntax definition testing, specifically the part with “negative scope matching”.
In docs (sublimetext.com/docs/syntax.html) it is briefly showed on final example…
“Hello, World! // not a comment”;
// ^ string.quoted.double
// ^ string.quoted.double - comment
… but unfortunately without any additional (textual) specification.
I figured that the ‘-’ token indicates negative match (following scope must not be present), but then I found out this test in official Package repository…
void Main(string[] args) {
/// ^^^^ storage.type
/// ^^^^^^^^^^^^^^^^^^^^^ meta.method
/// ^^^^^^^^^^^^^^^^^^^^^ - meta.method meta.method
… which kind of doesn’t work with my naïve understanding as this test would contradict itself, twice.
- How does the negative scope match actually work?
- Does the negative mark apply to only the immediately following scope or all following scopes in a give test line?
Given following test line, does the negative match apply only to meta.B or to meta.C as well?
/// ^^^ meta.A - meta.B meta.C