-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add script to generate duplicate grammars for embedding #295
Conversation
This looks nice 👍 I'll work on getting it merged in in the next few days |
The Extension Development Host scopes don't match what the tests say the scopes are. I'm guessing that I'm not announcing the syntax file correctly. |
While this might work, and is probably still useful if another grammar needs to embed c++. This is not the best route to go with macros. There are a couple of disadvantages:
|
If you prefer I can rewrite this in ruby, but otherwise, I believe it works well enough to be merged in. |
Oops 😬 I'll look over it now |
I'll work on merging this in before I do anything else. In the future lets turn it into feature inside the ruby gem. I'm fine with stuff being done in javascript in general though, its basically the universal programming language. I was imagining the bailed-out patterns as part of the language-syntax file, so you could take any subset language, for example regex, add an early bailout to it, and then use that like any other tag. |
This PR is from the updated master.
scripts/duplicateForEmbedding.js
adds a generic way to support any number of early bailout patterns.The grammar has been modified to use the macro embedded grammar for macros.