Skip to content

Commit

Permalink
Changes recommended via code review.
Browse files Browse the repository at this point in the history
  • Loading branch information
gafter committed Dec 6, 2016
1 parent f90f62b commit c4d4991
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Portable/Parser/LanguageParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9750,7 +9750,7 @@ private void ParseArgumentList(
this.CurrentToken.Kind == SyntaxKind.OpenBracketToken)
{
// convert `[` into `(` or vice versa for error recovery
openToken = this.ConsumeOneToken(openKind);
openToken = this.EatTokenAsKind(openKind);
}
else
{
Expand Down Expand Up @@ -9821,7 +9821,7 @@ private void ParseArgumentList(
this.CurrentToken.Kind == SyntaxKind.CloseBracketToken)
{
// convert `]` into `)` or vice versa for error recovery
closeToken = this.ConsumeOneToken(closeKind);
closeToken = this.EatTokenAsKind(closeKind);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ private bool ScanDesignation(bool permitTuple)
while (true)
{
this.EatToken(); // consume the `(` or `,`
if (!ScanDesignation(true))
if (!ScanDesignation(permitTuple: true))
{
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Portable/Parser/SyntaxParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ protected SyntaxToken EatToken(SyntaxKind kind)
}

// Consume a token if it is the right kind. Otherwise skip a token and replace it with one of the correct kind.
protected SyntaxToken ConsumeOneToken(SyntaxKind expected)
protected SyntaxToken EatTokenAsKind(SyntaxKind expected)
{
Debug.Assert(SyntaxFacts.IsAnyToken(expected));

Expand Down

0 comments on commit c4d4991

Please sign in to comment.