eclipse / tm4e

TextMate support in Eclipse IDE
https://projects.eclipse.org/projects/technology.tm4e
Eclipse Public License 2.0
87 stars 56 forks source link

fix: loading csharp, markdown-math, and search-result syntax failed #680

Closed sebthom closed 7 months ago

sebthom commented 7 months ago

This PR fixes parsing of some TextMate syntax files that use negative variable lookbehinds which is not supported by the joni regex library. See https://github.com/eclipse/tm4e/issues/677

Currently this is done in a rather naive but performant way by rewriting specific incompatible regex patterns to forms parseable by joni. E.g. patterns starting with (?<!\.\s*) are rewritten to (?<!\.)\s* and patterns starting with (?<=^\s*) are rewritten to (?<=^)\s*