On Oct 21, 2013, at 12:27 PM, Jeremy Whitlock <jcscoobyrs(a)gmail.com> wrote:
* When adding a language specific implementation of a
comment.block (expected) or comment.block.js (What's there now)? (I can't tell if
I use the name that corresponds with the root group, comment.block, or if I add the
language name to the end like comment.block.js.)
All scopes should end with the grammar's suffix, so `comment.block.js` would be
* Is there a way to have certain grammar features
enabled based on the existence, or lack of, a certain "enabler" in the file?
potential plans for supporting them as keywords in the future. That being said, if you
have "use strict;" in your file, certain keywords should be scoped that
wouldn't be otherwise *and* variable names with those keywords should be marked as
This could be done by including a begin/end rule that never ends. Match the beginning and
add a meta.* scope you can target with injections. You could do a branching grammar as
well, but it might lead to more duplication.
* Why isn't 'null' treated as a constant
like undefined/Infinity/NaN? Right now it's constant.language.null.js but I'd
expect it to be constant.language.js.
No reason it needs to be there in that case, we do provide more info in the scope
sometimes just to be more specific. Can be useful in some cases to provide special
One more question about inheritance. I see that
script content, it does bring up this question:
* Who owns extensions to inherited grammars, the embedding grammar (HTML) or the embedded
Ideally the HTML would provide the necessary rules, this can be done with injections. It
wasn't however possible without them which is why you some lingering artifacts still.