Skip to content

Improve error recovery when parsing incomplete base lists. #42258

Merged
jcouv merged 5 commits intodotnet:masterfrom
CyrusNajmabadi:errorRecovery
Mar 17, 2020
Merged

Improve error recovery when parsing incomplete base lists. #42258
jcouv merged 5 commits intodotnet:masterfrom
CyrusNajmabadi:errorRecovery

Conversation

@CyrusNajmabadi
Copy link
Copy Markdown
Contributor

Fixes #30102

@CyrusNajmabadi CyrusNajmabadi requested review from a team as code owners March 8, 2020 05:14
@CyrusNajmabadi
Copy link
Copy Markdown
Contributor Author

Tagging @jcouv @gafter


_termState = saveTerm;
var baseList = this.ParseBaseList();
_termState = saveTerm;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the actual change. as long we we're in the base list, we stay in the PossibleAggregateClauseStartOrStop state so that we consider tokens like { something that should stop us from parsing the base-list.

Copy link
Copy Markdown
Member

@jasonmalinowski jasonmalinowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IDE test looks good, but I'm not looking at the compiler portion.

@CyrusNajmabadi
Copy link
Copy Markdown
Contributor Author

@333fred @jcouv @dotnet/roslyn-compiler for eyes. Thanks!

Copy link
Copy Markdown
Member

@333fred 333fred left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add another parsing test for a base list followed by a :? Otherwise, LGTM.

@CyrusNajmabadi
Copy link
Copy Markdown
Contributor Author

@dotnet/roslyn-compiler Could i get another set of eyes please?

Copy link
Copy Markdown
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thanks (iteration 5). Will go ahead with merge/squash.

@jcouv jcouv added this to the 16.6.P2 milestone Mar 17, 2020
@jcouv jcouv merged commit 045c5c0 into dotnet:master Mar 17, 2020
@ghost ghost modified the milestones: 16.6.P2, Next Mar 17, 2020
@jcouv jcouv self-assigned this Mar 17, 2020
@CyrusNajmabadi
Copy link
Copy Markdown
Contributor Author

Thanks!

@CyrusNajmabadi CyrusNajmabadi deleted the errorRecovery branch March 17, 2020 00:30
@sharwell sharwell modified the milestones: Next, 16.6.P2 Mar 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'Implement abstract class' misbehaves when ending generic angle bracket is missing

6 participants