BigBahss / vscode-cmantic

C/C++ code generation for VS Code: Generate Definitions, Getters, Setters, and much more.
https://bigbahss.github.io/vscode-cmantic/
MIT License
84 stars 9 forks source link

[Code improvement] Update XRegExp to simplify unbalanced recursive parsing #66

Open slevithan opened 5 months ago

slevithan commented 5 months ago

XRegExp 5.1.0+ includes an option that enables XRegExp.matchRecursive to skip unbalanced delimiters. See: XRegExp 5.1.0 release notes and XRegExp.matchRecursive docs.

src/parsing.ts includes its own handling for unbalanced delimiters that looks like it can probably be simplified a lot or removed as a result.

Additionally, package.json includes "@types/xregexp": "^4.3.0" in devDependencies. This can probably be removed since types were added to XRegExp in v4.4.0.