-
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
source_wrapper overshoots non while based embdedding #285
Comments
Current workaroundIf the parent language (in this case LaTex) includes the This same solution stands for embedding the shell, perl, and dockerfile grammar. However C, objective-C, objective-C++ shouldn't have this issue. General problemThis is tough since it is a somewhat unresolvable conflict. Source wrapper needs to wrap the whole language, but it doesn't know when then language ends. I had the same issue when I was embedding the Shell grammar inside of the Dockerfile grammar. Its what started me looking into the textmate The Even assuming the embedded code has closed all the pattern ranges, one solution could be to do statement matching, where every individual statement is wrapped inside of a The most ideal solution would be for the I think you know more about the vscode-textmate parser than I do. I went ahead and added you as a collaborator on https://github.com/jeff-hykin/vscode-textmate. Feel free to push directly to master or merge branches into master. In a week or so I'll switch the cpp-textmate repo back to using the standard vscode-textmate, and add a separate command that will run the tests with the experimental version. This kind of a feature could be really really useful for preventing overflow bugs, which would be nice for basically all macros/preprocessor commands in every language. |
I removed the source wrapper. Instead of the issue falling to each language I think they're now the responsibility of the language that is embedding C++ (meaning this is no longer an issue for C++). At some point I'll remove the source wrapper code from the shell syntax and the textmate_tools.rb |
LatexWorkshops grammar embeds c++ using a begin/end pattern. This causes the source_wrapper to not detect the end. microsoft/vscode#76603 and James-Yu/LaTeX-Workshop#1476. The markdown grammar does not suffer from this because the while check cuts off the end pattern of source_wrapper.
The text was updated successfully, but these errors were encountered: