未验证 提交 4637b0ff 编写于 作者: A Amaury Levé 提交者: GitHub

Apply suggestions from code review

Co-Authored-By: NSam Harwell <sam@tunnelvisionlabs.com>
上级 4cb0ae2b
......@@ -18,7 +18,7 @@ public static class CSharpExtensions
/// </summary>
/// <param name="token">The source token.</param>
/// <param name="kind">The syntax kind to test for.</param>
/// <returns><c>true</c> if token is of specified kind; <c>false</c> otherwise.</returns>
/// <returns><see langword="true"/> if the token is of the specified kind; otherwise, <see langword="false"/>.</returns>
public static bool IsKind(this SyntaxToken token, SyntaxKind kind)
{
return token.RawKind == (int)kind;
......@@ -29,7 +29,7 @@ public static bool IsKind(this SyntaxToken token, SyntaxKind kind)
/// </summary>
/// <param name="trivia">The source trivia.</param>
/// <param name="kind">The syntax kind to test for.</param>
/// <returns><c>true</c> if trivia is of specified kind; <c>false</c> otherwise.</returns>
/// <returns><see langword="true"/> if the trivia is of the specified kind; otherwise, <see langword="false"/>.</returns>
public static bool IsKind(this SyntaxTrivia trivia, SyntaxKind kind)
{
return trivia.RawKind == (int)kind;
......@@ -40,7 +40,7 @@ public static bool IsKind(this SyntaxTrivia trivia, SyntaxKind kind)
/// </summary>
/// <param name="node">The source node.</param>
/// <param name="kind">The syntax kind to test for.</param>
/// <returns><c>true</c> if node is of specified kind; <c>false</c> otherwise.</returns>
/// <returns><see langword="true"/> if the node is of the specified kind; otherwise, <see langword="false"/>.</returns>
public static bool IsKind(this SyntaxNode node, SyntaxKind kind)
{
return node?.RawKind == (int)kind;
......@@ -51,7 +51,7 @@ public static bool IsKind(this SyntaxNode node, SyntaxKind kind)
/// </summary>
/// <param name="nodeOrToken">The source node or token.</param>
/// <param name="kind">The syntax kind to test for.</param>
/// <returns><c>true</c> if node or token is of specified kind; <c>false</c> otherwise.</returns>
/// <returns><see langword="true"/> if the node or token is of the specified kind; otherwise, <see langword="false"/>.</returns>
public static bool IsKind(this SyntaxNodeOrToken nodeOrToken, SyntaxKind kind)
{
return nodeOrToken.RawKind == (int)kind;
......@@ -166,7 +166,7 @@ public static class CSharpExtensions
/// Determines if the given raw kind value belongs to the C# <see cref="SyntaxKind"/> enumeration.
/// </summary>
/// <param name="rawKind">The raw value to test.</param>
/// <returns><c>true</c> when the raw value belongs to the C# syntax kind; <c>false</c> otherwise.</returns>
/// <returns><see langword="true"/> when the raw value belongs to the C# syntax kind; otherwise, <see langword="false"/>.</returns>
internal static bool IsCSharpKind(int rawKind)
{
const int FirstVisualBasicKind = (int)SyntaxKind.List + 1;
......
......@@ -22,7 +22,7 @@ Namespace Microsoft.CodeAnalysis
''' </summary>
''' <param name="trivia">The source trivia.</param>
''' <param name="kind">The syntax kind to test for.</param>
''' <returns><c>true</c> if trivia is of specified kind; <c>false</c> otherwise.</returns>
''' <returns><see langword="true"/> if the trivia is of the specified kind; otherwise, <see langword="false"/>.</returns>
<Extension>
Public Function IsKind(trivia As SyntaxTrivia, kind As SyntaxKind) As Boolean
Return trivia.RawKind = kind
......@@ -33,7 +33,7 @@ Namespace Microsoft.CodeAnalysis
''' </summary>
''' <param name="token">The source token.</param>
''' <param name="kind">The syntax kind to test for.</param>
''' <returns><c>true</c> if token is of specified kind; <c>false</c> otherwise.</returns>
''' <returns><see langword="true"/> if the token is of the specified kind; otherwise, <see langword="false"/>.</returns>
<Extension>
Public Function IsKind(token As SyntaxToken, kind As SyntaxKind) As Boolean
Return token.RawKind = kind
......@@ -44,7 +44,7 @@ Namespace Microsoft.CodeAnalysis
''' </summary>
''' <param name="node">The Source node.</param>
''' <param name="kind">The syntax kind to test for.</param>
''' <returns><c>true</c> if node is of specified kind; <c>false</c> otherwise.</returns>
''' <returns><see langword="true"/> if the node is of the specified kind; otherwise, <see langword="false"/>.</returns>
<Extension>
Public Function IsKind(node As SyntaxNode, kind As SyntaxKind) As Boolean
Return node IsNot Nothing AndAlso node.RawKind = kind
......@@ -55,7 +55,7 @@ Namespace Microsoft.CodeAnalysis
''' </summary>
''' <param name="nodeOrToken">The source node or token.</param>
''' <param name="kind">The syntax kind to test for.</param>
''' <returns><c>true</c> if node or token is of specified kind; <c>false</c> otherwise.</returns>
''' <returns><see langword="true"/> if the node or token is of the specified kind; otherwise, <see langword="false"/>.</returns>
<Extension>
Public Function IsKind(nodeOrToken As SyntaxNodeOrToken, kind As SyntaxKind) As Boolean
Return nodeOrToken.RawKind = kind
......@@ -168,7 +168,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
''' Determines if the given raw kind value belongs to the Visual Basic <see cref="SyntaxKind"/> enumeration.
''' </summary>
''' <param name="rawKind">The raw value to test.</param>
''' <returns><c>true</c> when the raw value belongs to the Visual Basic syntax kind; <c>false</c> otherwise.</returns>
''' <returns><see langword="true"/> when the raw value belongs to the Visual Basic syntax kind; otherwise, <see langword="false"/>.</returns>
Friend Function IsVisualBasicKind(rawKind As Integer) As Boolean
Const LastPossibleVisualBasicKind As Integer = 8192
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册