Skip to content

Conversation

@CyrusNajmabadi
Copy link
Member

Fixes #52

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner October 28, 2022 17:03
@ghost ghost added the Area-Compilers label Oct 28, 2022
@CyrusNajmabadi
Copy link
Member Author

@dotnet/roslyn-compiler could i get eyes on this?

Copy link
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.

Done review pass (commit 3)

result = null;
return false;

bool isStartOfPropertyBody(SyntaxKind kind)
Copy link
Member

Choose a reason for hiding this comment

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

Consider extracting this and using below as well.

@CyrusNajmabadi
Copy link
Member Author

@333fred done! @cston ptal :)

@CyrusNajmabadi
Copy link
Member Author

@jcouv @cston could you ptal? thanks!


switch (this.CurrentToken.Kind)
// `{` or `=>` definitely start a property. Also allow
// `; {` and `; =>` as error recovery fo ra misplaced semicolon.
Copy link
Contributor

Choose a reason for hiding this comment

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

fo ra

Typo.

N(SyntaxKind.EndOfFileToken);
}
EOF();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

}

Are we testing script cases for global statements?

Copy link
Member Author

Choose a reason for hiding this comment

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

we are, yes. and they def discovered interesting stuff for example, that int MyProperty; { is totally legal at the script/top-level as a local/field, followed by a block :)

@CyrusNajmabadi CyrusNajmabadi merged commit a47422f into dotnet:main Nov 7, 2022
@ghost ghost added this to the Next milestone Nov 7, 2022
@CyrusNajmabadi CyrusNajmabadi deleted the parserErrorRecovery branch November 8, 2022 00:18
@allisonchou allisonchou removed this from the Next milestone Nov 30, 2022
@allisonchou allisonchou added this to the 17.5 P2 milestone Nov 30, 2022
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.

Adding semicolon inbetween property name and { get; set; } invalidates rest of the document (excess errors)

4 participants