Add JSDoc scope
This is a small PR that adds a .jsdoc scope to JSDoc tokens, just like JSX has a specific scope.
This effectively allows differentiating between JavaScript keywords and JSDoc tags in comments.
Release Notes:
- Add scope for JSDoc
These cases don't really seem to be the same.
In the JSX case we differentiate the selectors because they are within the JavaScript language.
But in the JSDoc case we have a whole separate language, so it doesn't seem like we would then need to additionally tag them within that language.
Ultimately JSDoc is injected into JavaScript, so a scope should be added to differentiate "keywords" in both contexts. This would allow highlighting @todo comments differently from actual keywords like if, while etc.
Another alternative would be creating a scope like comment.emphasis
@maxdeviant I see there is a documented comment.doc scope. Would that fit here?