Skip to content

Commit

Permalink
Merge pull request #52395 from Youssef1313/patch-21
Browse files Browse the repository at this point in the history
Fix tuple naming
  • Loading branch information
CyrusNajmabadi authored Apr 3, 2021
2 parents 3a30d52 + 6ab85a2 commit d056cbe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ protected override async Task<bool> IsValidOpenBraceTokenAtPositionAsync(SyntaxT
}

// now check whether parser think whether there is already counterpart closing parenthesis
var (openBrace, closeBrace) = token.Parent.GetParentheses();
var (openParen, closeParen) = token.Parent.GetParentheses();

// We can complete the brace if the closing brace is missing or the incorrect kind.
if (closeBrace.Kind() != SyntaxKind.CloseParenToken || closeBrace.Span.Length == 0)
if (closeParen.Kind() != SyntaxKind.CloseParenToken || closeParen.Span.Length == 0)
{
return true;
}
Expand All @@ -58,7 +58,7 @@ protected override async Task<bool> IsValidOpenBraceTokenAtPositionAsync(SyntaxT
// brace completion session higher up on the stack. If that's the case then we can
// complete the opening brace here, so return this as valid for completion.
var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
return text.Lines.GetLineFromPosition(openBrace.SpanStart).LineNumber == text.Lines.GetLineFromPosition(closeBrace.Span.End).LineNumber;
return text.Lines.GetLineFromPosition(openParen.SpanStart).LineNumber == text.Lines.GetLineFromPosition(closeParen.Span.End).LineNumber;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,7 @@ internal static SyntaxNodeOrToken ChildThatContainsPosition(this SyntaxNode self
throw new ArgumentOutOfRangeException(nameof(position));
}

public static (SyntaxToken openBrace, SyntaxToken closeBrace) GetParentheses(this SyntaxNode node)
public static (SyntaxToken openParen, SyntaxToken closeParen) GetParentheses(this SyntaxNode node)
{
switch (node)
{
Expand Down

0 comments on commit d056cbe

Please sign in to comment.