Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
337fc5b9
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,发现更多精彩内容 >>
提交
337fc5b9
编写于
10月 27, 2015
作者:
N
Neal Gafter
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'features/match' into features/patterns
上级
ddae615b
13f27acf
变更
4
展开全部
隐藏空白更改
内联
并排
Showing
4 changed file
with
60 addition
and
22 deletion
+60
-22
src/Compilers/CSharp/Portable/PublicAPI.Unshipped.txt
src/Compilers/CSharp/Portable/PublicAPI.Unshipped.txt
+22
-21
src/Compilers/CSharp/Portable/Syntax/Syntax.xml
src/Compilers/CSharp/Portable/Syntax/Syntax.xml
+29
-0
src/Compilers/CSharp/Portable/Syntax/SyntaxKind.cs
src/Compilers/CSharp/Portable/Syntax/SyntaxKind.cs
+3
-0
src/Compilers/CSharp/Portable/Syntax/SyntaxKindFacts.cs
src/Compilers/CSharp/Portable/Syntax/SyntaxKindFacts.cs
+6
-1
未找到文件。
src/Compilers/CSharp/Portable/PublicAPI.Unshipped.txt
浏览文件 @
337fc5b9
此差异已折叠。
点击以展开。
src/Compilers/CSharp/Portable/Syntax/Syntax.xml
浏览文件 @
337fc5b9
...
...
@@ -1598,6 +1598,35 @@
<summary>
Creates an IsPatternExpressionSyntax node.
</summary>
</FactoryComment>
</Node>
<Node
Name=
"MatchExpressionSyntax"
Base=
"ExpressionSyntax"
>
<Kind
Name=
"MatchExpression"
/>
<Field
Name=
"Left"
Type=
"ExpressionSyntax"
/>
<Field
Name=
"MatchToken"
Type=
"SyntaxToken"
>
<Kind
Name=
"MatchKeyword"
/>
</Field>
>
<Field
Name=
"OpenParenToken"
Type=
"SyntaxToken"
>
<Kind
Name=
"OpenParenToken"
/>
</Field>
<Field
Name=
"Sections"
Type=
"SyntaxList<MatchSectionSyntax>"
/>
<Field
Name=
"CloseParenToken"
Type=
"SyntaxToken"
>
<Kind
Name=
"CloseParenToken"
/>
</Field>
</Node>
<Node
Name=
"MatchSectionSyntax"
Base=
"CSharpSyntaxNode"
>
<Kind
Name=
"MatchSection"
/>
<Field
Name=
"CaseKeyword"
Type=
"SyntaxToken"
>
<Kind
Name=
"CaseKeyword"
/>
</Field>
<Field
Name=
"Pattern"
Type=
"PatternSyntax"
/>
<Field
Name=
"WhenKeyword"
Type=
"SyntaxToken"
Optional=
"true"
>
<Kind
Name=
"WhenKeyword"
/>
</Field>
<Field
Name=
"Condition"
Type=
"ExpressionSyntax"
Optional=
"true"
/>
<Field
Name=
"ColonToken"
Type=
"SyntaxToken"
>
<Kind
Name=
"ColonToken"
/>
</Field>
<Field
Name=
"Expression"
Type=
"ExpressionSyntax"
/>
</Node>
<AbstractNode
Name=
"PatternSyntax"
Base=
"CSharpSyntaxNode"
/>
<Node
Name=
"DeclarationPatternSyntax"
Base=
"PatternSyntax"
>
<Kind
Name=
"DeclarationPattern"
/>
...
...
src/Compilers/CSharp/Portable/Syntax/SyntaxKind.cs
浏览文件 @
337fc5b9
...
...
@@ -192,6 +192,7 @@ public enum SyntaxKind : ushort
AsyncKeyword
=
8435
,
AwaitKeyword
=
8436
,
WhenKeyword
=
8437
,
MatchKeyword
=
8438
,
// additional preprocessor keywords
ElifKeyword
=
8467
,
...
...
@@ -548,5 +549,7 @@ public enum SyntaxKind : ushort
ShebangDirectiveTrivia
=
8922
,
LoadDirectiveTrivia
=
8923
,
MatchSection
=
8924
,
MatchExpression
=
8925
,
}
}
src/Compilers/CSharp/Portable/Syntax/SyntaxKindFacts.cs
浏览文件 @
337fc5b9
...
...
@@ -1033,7 +1033,7 @@ public static SyntaxKind GetPreprocessorKeywordKind(string text)
public
static
IEnumerable
<
SyntaxKind
>
GetContextualKeywordKinds
()
{
for
(
int
i
=
(
int
)
SyntaxKind
.
YieldKeyword
;
i
<=
(
int
)
SyntaxKind
.
When
Keyword
;
i
++)
for
(
int
i
=
(
int
)
SyntaxKind
.
YieldKeyword
;
i
<=
(
int
)
SyntaxKind
.
Match
Keyword
;
i
++)
{
yield
return
(
SyntaxKind
)
i
;
}
...
...
@@ -1076,6 +1076,7 @@ public static bool IsContextualKeyword(SyntaxKind kind)
case
SyntaxKind
.
AsyncKeyword
:
case
SyntaxKind
.
AwaitKeyword
:
case
SyntaxKind
.
WhenKeyword
:
case
SyntaxKind
.
MatchKeyword
:
return
true
;
default
:
return
false
;
...
...
@@ -1175,6 +1176,8 @@ public static SyntaxKind GetContextualKeywordKind(string text)
return
SyntaxKind
.
WhenKeyword
;
case
"nameof"
:
return
SyntaxKind
.
NameOfKeyword
;
case
"match"
:
return
SyntaxKind
.
MatchKeyword
;
default
:
return
SyntaxKind
.
None
;
}
...
...
@@ -1578,6 +1581,8 @@ public static string GetText(SyntaxKind kind)
return
"$\""
;
case
SyntaxKind
.
InterpolatedStringEndToken
:
return
"\""
;
case
SyntaxKind
.
MatchKeyword
:
return
"match"
;
default
:
return
string
.
Empty
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录