Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Makefile] Fix embedded ShellScript prototypes (#2320)
* [Makefile] Fix embedded ShellScript prototypes Fixes #2318 Problem Description The Makefile.sublime-syntax includes the Bash.sublime-syntax. The `scope:source.shell#prototype` is injected into the embedded Bash.sublime-syntax using `with_prototype` maybe as workaround for sublimehq/sublime_text#1062 The `with_prototype` command ignores `meta_include_prototype: false`, which is heavily used by Bash.sublime-syntax to prevent the `prototype` context from being included into a bunch of contexts such as strings. Fix Description As the prototype context is not included into source.shell's main context only, it is not necessary to inject it via `with_protoype`. Hence it is moved to the `shell-body` together with `source.shell`, which is suggested by the core issue as proper workaround. Notes: The `prototype` context of the Bash.sublime-syntax also includes proper rules to pop off all contexts at eol with respect of line continuation. Hence those don't need to be part of the `with_proptype` statement as well. They are moved to just pop off the Bash's main context as soon as the eol is reached. The `source.shell.embedded` scope is applied to all embedded shell syntax regions. * [Makefile] Fix embedded comment scope Fixes an oversight with regards of the changed `source.shell.embedded` scope, which is used for embedded ShellScript syntax. * [Makefile] Use ST4077 syntax features This commit uses `apply_prototype` to optionally include the prototype if present but keep calm if it was not defined by the included syntax. Add some tests for embedded shell scopes as well.
- Loading branch information