-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syntax Highlighter Crashing #637
Comments
Confirmed to be reproduceable on 1.79 with no extensions enabled. |
I'd bet that this shares the same underlying issue as this |
I had a little look into this
I managed to simplify "test2": {
"match": "([\\w:]++)(<\\g<0>>)*+",
"captures": {
"1": { "name": "keyword $1" },
"2": { "patterns": [ { "include": "#template_call_range" } ] },
"3": { "patterns": [ { "include": "#template_call_range" } ] },
"4": { "patterns": [ { "include": "#template_call_range" } ] }
}
},
"typename": {
"match": "(?x)(?<_1>\\w++)(?<_2>(?<_3>(?>::)?+(?>\\w++(?<_4><(?>\\g<nest>|[^<>]++)*+>)?+::)*+)?+\\w++(?<nest><(?>\\g<nest>|[^<>]++)*+>)?+)",
"comment": "(?x)(#1\ntypename)(#6\n(#12\n(?>::)?(?>[a-zA-Z0-9_]+(#14\n<(?>\\g<5>|[^<>]++)*>)?::)*+)?[a-zA-Z0-9_]+(#17\n<(?>\\g<5>|[^<>]++)*>)?)",
"captures": {
"1": { "name": "keyword $1" },
"2": { "patterns": [ { "include": "#template_call_range" } ] },
"3": { "patterns": [ { "include": "#template_call_range" } ] },
"4": { "patterns": [ { "include": "#template_call_range" } ] }
}
} and heres a simplified version of the actual problem "typename": {
"match": "\\w+(((<\\g<0>>)))?",
"captures": {
"1": { "patterns": [ { "include": "#typename" } ] },
"2": { "patterns": [ { "include": "#typename" } ] },
"3": { "patterns": [ { "include": "#typename" } ] }
}
}, the problem is that which I guess is exactly the same as doing this: also remember simply having a |
as of right now this one still exists (even though the other performance one was fixed) |
Checklist
"C_Cpp.enhancedColorization": "Disabled"
If Disabling that^ makes the problem go away, then follow this to make an issue on the C++ extension:
https://github.com/microsoft/vscode-cpptools/issues/new/choose
The code with a problem is:
It looks like:
This code is crashing Visual Studio Code when there are no plugins enabled (which I presume is the syntax highlighter). The Visual Studio Code repository linked here so I am reporting this crash here.
It should look like:
It should highlight this code normally without crashing.
The text was updated successfully, but these errors were encountered: