Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
4637b0ff
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
4637b0ff
编写于
12月 13, 2019
作者:
A
Amaury Levé
提交者:
GitHub
12月 13, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Apply suggestions from code review
Co-Authored-By:
N
Sam Harwell
<
sam@tunnelvisionlabs.com
>
上级
4cb0ae2b
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
10 addition
and
10 deletion
+10
-10
src/Compilers/CSharp/Portable/CSharpExtensions.cs
src/Compilers/CSharp/Portable/CSharpExtensions.cs
+5
-5
src/Compilers/VisualBasic/Portable/VisualBasicExtensions.vb
src/Compilers/VisualBasic/Portable/VisualBasicExtensions.vb
+5
-5
未找到文件。
src/Compilers/CSharp/Portable/CSharpExtensions.cs
浏览文件 @
4637b0ff
...
@@ -18,7 +18,7 @@ public static class CSharpExtensions
...
@@ -18,7 +18,7 @@ public static class CSharpExtensions
/// </summary>
/// </summary>
/// <param name="token">The source token.</param>
/// <param name="token">The source token.</param>
/// <param name="kind">The syntax kind to test for.</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
)
public
static
bool
IsKind
(
this
SyntaxToken
token
,
SyntaxKind
kind
)
{
{
return
token
.
RawKind
==
(
int
)
kind
;
return
token
.
RawKind
==
(
int
)
kind
;
...
@@ -29,7 +29,7 @@ public static bool IsKind(this SyntaxToken token, SyntaxKind kind)
...
@@ -29,7 +29,7 @@ public static bool IsKind(this SyntaxToken token, SyntaxKind kind)
/// </summary>
/// </summary>
/// <param name="trivia">The source trivia.</param>
/// <param name="trivia">The source trivia.</param>
/// <param name="kind">The syntax kind to test for.</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
)
public
static
bool
IsKind
(
this
SyntaxTrivia
trivia
,
SyntaxKind
kind
)
{
{
return
trivia
.
RawKind
==
(
int
)
kind
;
return
trivia
.
RawKind
==
(
int
)
kind
;
...
@@ -40,7 +40,7 @@ public static bool IsKind(this SyntaxTrivia trivia, SyntaxKind kind)
...
@@ -40,7 +40,7 @@ public static bool IsKind(this SyntaxTrivia trivia, SyntaxKind kind)
/// </summary>
/// </summary>
/// <param name="node">The source node.</param>
/// <param name="node">The source node.</param>
/// <param name="kind">The syntax kind to test for.</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
)
public
static
bool
IsKind
(
this
SyntaxNode
node
,
SyntaxKind
kind
)
{
{
return
node
?.
RawKind
==
(
int
)
kind
;
return
node
?.
RawKind
==
(
int
)
kind
;
...
@@ -51,7 +51,7 @@ public static bool IsKind(this SyntaxNode node, SyntaxKind kind)
...
@@ -51,7 +51,7 @@ public static bool IsKind(this SyntaxNode node, SyntaxKind kind)
/// </summary>
/// </summary>
/// <param name="nodeOrToken">The source node or token.</param>
/// <param name="nodeOrToken">The source node or token.</param>
/// <param name="kind">The syntax kind to test for.</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
)
public
static
bool
IsKind
(
this
SyntaxNodeOrToken
nodeOrToken
,
SyntaxKind
kind
)
{
{
return
nodeOrToken
.
RawKind
==
(
int
)
kind
;
return
nodeOrToken
.
RawKind
==
(
int
)
kind
;
...
@@ -166,7 +166,7 @@ public static class CSharpExtensions
...
@@ -166,7 +166,7 @@ public static class CSharpExtensions
/// Determines if the given raw kind value belongs to the C# <see cref="SyntaxKind"/> enumeration.
/// Determines if the given raw kind value belongs to the C# <see cref="SyntaxKind"/> enumeration.
/// </summary>
/// </summary>
/// <param name="rawKind">The raw value to test.</param>
/// <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
)
internal
static
bool
IsCSharpKind
(
int
rawKind
)
{
{
const
int
FirstVisualBasicKind
=
(
int
)
SyntaxKind
.
List
+
1
;
const
int
FirstVisualBasicKind
=
(
int
)
SyntaxKind
.
List
+
1
;
...
...
src/Compilers/VisualBasic/Portable/VisualBasicExtensions.vb
浏览文件 @
4637b0ff
...
@@ -22,7 +22,7 @@ Namespace Microsoft.CodeAnalysis
...
@@ -22,7 +22,7 @@ Namespace Microsoft.CodeAnalysis
''' </summary>
''' </summary>
''' <param name="trivia">The source trivia.</param>
''' <param name="trivia">The source trivia.</param>
''' <param name="kind">The syntax kind to test for.</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
>
<
Extension
>
Public
Function
IsKind
(
trivia
As
SyntaxTrivia
,
kind
As
SyntaxKind
)
As
Boolean
Public
Function
IsKind
(
trivia
As
SyntaxTrivia
,
kind
As
SyntaxKind
)
As
Boolean
Return
trivia
.
RawKind
=
kind
Return
trivia
.
RawKind
=
kind
...
@@ -33,7 +33,7 @@ Namespace Microsoft.CodeAnalysis
...
@@ -33,7 +33,7 @@ Namespace Microsoft.CodeAnalysis
''' </summary>
''' </summary>
''' <param name="token">The source token.</param>
''' <param name="token">The source token.</param>
''' <param name="kind">The syntax kind to test for.</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
>
<
Extension
>
Public
Function
IsKind
(
token
As
SyntaxToken
,
kind
As
SyntaxKind
)
As
Boolean
Public
Function
IsKind
(
token
As
SyntaxToken
,
kind
As
SyntaxKind
)
As
Boolean
Return
token
.
RawKind
=
kind
Return
token
.
RawKind
=
kind
...
@@ -44,7 +44,7 @@ Namespace Microsoft.CodeAnalysis
...
@@ -44,7 +44,7 @@ Namespace Microsoft.CodeAnalysis
''' </summary>
''' </summary>
''' <param name="node">The Source node.</param>
''' <param name="node">The Source node.</param>
''' <param name="kind">The syntax kind to test for.</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
>
<
Extension
>
Public
Function
IsKind
(
node
As
SyntaxNode
,
kind
As
SyntaxKind
)
As
Boolean
Public
Function
IsKind
(
node
As
SyntaxNode
,
kind
As
SyntaxKind
)
As
Boolean
Return
node
IsNot
Nothing
AndAlso
node
.
RawKind
=
kind
Return
node
IsNot
Nothing
AndAlso
node
.
RawKind
=
kind
...
@@ -55,7 +55,7 @@ Namespace Microsoft.CodeAnalysis
...
@@ -55,7 +55,7 @@ Namespace Microsoft.CodeAnalysis
''' </summary>
''' </summary>
''' <param name="nodeOrToken">The source node or token.</param>
''' <param name="nodeOrToken">The source node or token.</param>
''' <param name="kind">The syntax kind to test for.</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
>
<
Extension
>
Public
Function
IsKind
(
nodeOrToken
As
SyntaxNodeOrToken
,
kind
As
SyntaxKind
)
As
Boolean
Public
Function
IsKind
(
nodeOrToken
As
SyntaxNodeOrToken
,
kind
As
SyntaxKind
)
As
Boolean
Return
nodeOrToken
.
RawKind
=
kind
Return
nodeOrToken
.
RawKind
=
kind
...
@@ -168,7 +168,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
...
@@ -168,7 +168,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
''' Determines if the given raw kind value belongs to the Visual Basic <see cref="SyntaxKind"/> enumeration.
''' Determines if the given raw kind value belongs to the Visual Basic <see cref="SyntaxKind"/> enumeration.
''' </summary>
''' </summary>
''' <param name="rawKind">The raw value to test.</param>
''' <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
Friend
Function
IsVisualBasicKind
(
rawKind
As
Integer
)
As
Boolean
Const
LastPossibleVisualBasicKind
As
Integer
=
8192
Const
LastPossibleVisualBasicKind
As
Integer
=
8192
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录