I’m working on implementing extended mode comments to the default RegExp.sublime-syntax syntax def but am unable to do so in the way I wanted to.
I intended to use a with_prototype pattern to match #-indicated line comments within patterns that have extended mode enabled and managed to lock up ST while causing a rapidly increasing RAM usage (like 6GB in 20s). I suspected infinite recursion, but normally ST detects those in a safety net and just errors. I also cannot find a reason for this to happen, which is why I’m creating this thread.
The file: https://gist.github.com/FichteFoll/3dd8223ddb5d8a1d8ee405956b045618
If I uncomment line 40 (or 34, same result) or comment lines 81&82, ST goes crazy on my RAM.
cc @kingkeith (since you primarily worked on this)
Note: This method is not ideal because # is allowed in sets (as are whitespace characters), but I haven’t thought of a better method yet that didn’t involve duplicating the entire group-start context. If only the YAML merge operator was supported …