Tokenization freezes with long line like "((a+a) (a+a) (a+a) (a+a) ...
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start in the csharp-tmLanguage syntax grammar and reproduce the issue in VS Code with the supplied long line after changing the file to C#. Compare the working variations and shorter lines; done means C# tokenization completes without freezing or causing long input delays.
Written by the indexing model from the issue text.
Description
From @Maxpxt in https://github.com/microsoft/vscode/issues/89846
Details
What editor are you seeing the problem in? (e.g. Atom, Visual Studio Code, etc.)
VS Coe
What version of the editor are you using?
VS Code version: Code 1.41.1 (26076a4, 2019-12-18T14:58:56.166Z)
What color theme are you using?
Not applicable
Repro
Create a file in plain text mode and fill it with:
((a+a) + ~30 times (a+a), which looks like ((a+a) (a+a) (a+a) (a+a) ...
Change the file language to C#.
This causes VSCode to stop responding.
This does not happen with other languages like C++, F#, Java, JavaScript.
Interestingly, in the following slight variations of this, everything works fine.
( on line 1 + (a+a) (a+a) (a+a) (a+a) ... on line 2
((a+a)(a+a)(a+a)(a+a) ...
When the line is smaller (around 15 to 20 times (a+a)), the the editor does not stop responding, but takes long to respond to any changes made to the file (like typing a letter). The larger the line, the longer it takes.
- Dominant language
- TypeScript
- Stars
- 78
- Forks
- 43
- Avg merge
- 34m
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dotnet/csharp-tmLanguage
-
C# syntax highlighting broken with collection expressions and string interpolation in method calls Open
Difficulty 3/5 1-2 days Newbie friendliness 35/100
dotnet/csharp-tmLanguage#332 · 7 comments · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
dotnet/csharp-tmLanguage#336 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
dotnet/csharp-tmLanguage#306 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
dotnet/csharp-tmLanguage#304 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
dotnet/csharp-tmLanguage#303 ·
All issues in dotnet/csharp-tmLanguage
Similar issues
-
Browser Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
getsentry/sentry-javascript#24577 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
agilepathway/label-checker#640 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
agentic-workflows
Difficulty 1/5 Under an hour Newbie friendliness 85/100
githubnext/rig#534 ·
-
automation missing-model model-sync provider:pioneer
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
anomalyco/models.dev#7701 ·