Sublime Text build 4050 introduced a new feature to sublime-syntax grammars called branch points. The docs haven't been published yet, but the packages which ship with Sublime Text have started to use this new functionality. i.e. sublimehq/Packages@c08f853
This essentially uses backtracking to effectively allow looking ahead multiple lines (up to 128) etc. and enables non-deterministic parsing as described at sublimehq/sublime_text#2241
My understanding is that some official documentation should be coming soon, but I wanted to log this here now in case we want to get a head start on it i.e. by experimenting with it in Sublime to see how it works and thinking about how we can go about implementing it for syntect. This also serves as a note that updating the sublimehq/Packages submodule will likely cause those syntax definitions relying on this new feature to not work as expected until syntect adds support for it.
Sublime Text build 4050 introduced a new feature to
sublime-syntaxgrammars called branch points. The docs haven't been published yet, but the packages which ship with Sublime Text have started to use this new functionality. i.e. sublimehq/Packages@c08f853This essentially uses backtracking to effectively allow looking ahead multiple lines (up to 128) etc. and enables non-deterministic parsing as described at sublimehq/sublime_text#2241
My understanding is that some official documentation should be coming soon, but I wanted to log this here now in case we want to get a head start on it i.e. by experimenting with it in Sublime to see how it works and thinking about how we can go about implementing it for
syntect. This also serves as a note that updating the sublimehq/Packages submodule will likely cause those syntax definitions relying on this new feature to not work as expected untilsyntectadds support for it.