The scope naming conventions on the ST docs page mention that e.g. for function meta scopes their specialization should not be stacked. In particular, this means that the function body should be scoped as meta.function.body and not meta.function meta.function.body.
A possible solution for SBNF would be the following syntax, where a scope beginning with a . would extend the last scope on the stack instead of pushing a new scope onto it.
The same concept also applies to mapping keys and values, annotations, and possibly further specializations that haven't been standardized yet.
clear_scopes doesn't seem to be implemented by snbf yet, but if it was, it should be applied first, i.e. the specialization be applied on second-to-last scope.
The scope naming conventions on the ST docs page mention that e.g. for function meta scopes their specialization should not be stacked. In particular, this means that the function body should be scoped as
meta.function.body
and notmeta.function meta.function.body
.A possible solution for SBNF would be the following syntax, where a scope beginning with a
.
would extend the last scope on the stack instead of pushing a new scope onto it.The same concept also applies to mapping keys and values, annotations, and possibly further specializations that haven't been standardized yet.
clear_scopes
doesn't seem to be implemented by snbf yet, but if it was, it should be applied first, i.e. the specialization be applied on second-to-last scope.