0

I'm trying to create a custom extension for a new language and find the regex flavors/options are not well documented in my opinion. I've found the same links to a github issue left on other SO questions, but all the discussion provides is that VS Code uses Rust engine for 'Find/Replace', not for extension language regex patterns/rules.

Is there any way to output the regex matches/errors in debug view when compiling a new extension? An ambiguous "invalid group" error message is not helpful to anyone for any situation. I've also found that the find/replace feature is not a good alternative either because the tmLanguage regex patterns allow some things the find/replace feature does not, plus it's a tiny box for long regexs.

I just want to see specific errors, if possible, and even more optimistically position / group specific errors

Gama11
  • 31,714
  • 9
  • 78
  • 100
soulshined
  • 9,612
  • 5
  • 44
  • 79
  • 1
    You could use vscode-textmate's inspect script to get detailed info for the tokenization of each line: https://github.com/Microsoft/vscode-textmate#developing. However, errors seem to be the same as those in VSCode's dev console. That might simply be down to Oniguruma's error handling not being more detailed (https://github.com/kkos/oniguruma). – Gama11 Dec 29 '18 at 12:37
  • very cool, not what I was looking for but it looks promising, thank you @Gama11 – soulshined Dec 29 '18 at 13:39

0 Answers0