Fix incremental parsing error with dot-dot tokens.#75532
Closed
Rekkonnect wants to merge 12 commits intodotnet:mainfrom
Closed
Fix incremental parsing error with dot-dot tokens.#75532Rekkonnect wants to merge 12 commits intodotnet:mainfrom
Rekkonnect wants to merge 12 commits intodotnet:mainfrom
Conversation
| WalkTreeAndVerify(tree.GetCompilationUnitRoot(), fullTree.GetCompilationUnitRoot()); | ||
| } | ||
|
|
||
| [Fact] |
Contributor
|
I'll look at this. |
| // (1,14): error CS1001: Identifier expected | ||
| // public int I..operator +(int x) => x; | ||
| Diagnostic(ErrorCode.ERR_IdentifierExpected, ".operato").WithLocation(1, 14) | ||
| Diagnostic(ErrorCode.ERR_IdentifierExpected, ".").WithLocation(1, 14) |
Contributor
There was a problem hiding this comment.
these are better. the old results were wacky.
Contributor
|
@dotnet/roslyn-compiler for an incremental parsing bug. |
| // on the dot token itself. This will make this token not reusable in incremental scenarios. The missing | ||
| // identifier is already not reusable (as it has zero length). However, this does not taint the tokens | ||
| // around it. We want that tainting so that an incremental reparse goes and resynthesizes the original `..` | ||
| // token. |
Contributor
There was a problem hiding this comment.
this is the critical part of the fix. previously we had dot token - missing identifier - dot token and the incremental parser was reusing those dot tokens, even though they are not what the lexer would have produced.
….com/Rekkonnect/roslyn into fix/74456-incremental-parsing-dotdot
Contributor
|
@RikkiGibson @cston ptal. |
This was referenced Oct 17, 2024
Contributor
|
Taking #75549 instead. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #74456
This was approved by @CyrusNajmabadi to open as a draft PR to debug. The test source is a minified example of that of the original PR.