Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
fdb60ace
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,发现更多精彩内容 >>
提交
fdb60ace
编写于
6月 04, 2020
作者:
A
Andy Gocke
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Respond to PR comments
上级
53caa79b
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
15 addition
and
48 deletion
+15
-48
src/Compilers/CSharp/Portable/Generated/Syntax.xml.Main.Generated.cs
...rs/CSharp/Portable/Generated/Syntax.xml.Main.Generated.cs
+12
-0
src/Compilers/CSharp/Portable/Symbols/Source/SourceConstructorSymbolBase.cs
...rp/Portable/Symbols/Source/SourceConstructorSymbolBase.cs
+1
-3
src/Compilers/CSharp/Portable/Symbols/Synthesized/Records/SynthesizedRecordConstructor.cs
...mbols/Synthesized/Records/SynthesizedRecordConstructor.cs
+1
-1
src/Compilers/CSharp/Portable/Syntax/StructDeclarationSyntax.cs
...mpilers/CSharp/Portable/Syntax/StructDeclarationSyntax.cs
+0
-43
src/Compilers/CSharp/Portable/Syntax/Syntax.xml
src/Compilers/CSharp/Portable/Syntax/Syntax.xml
+1
-1
未找到文件。
src/Compilers/CSharp/Portable/Generated/Syntax.xml.Main.Generated.cs
浏览文件 @
fdb60ace
...
...
@@ -4889,6 +4889,18 @@ public static StructDeclarationSyntax StructDeclaration(SyntaxList<AttributeList
return
(
StructDeclarationSyntax
)
Syntax
.
InternalSyntax
.
SyntaxFactory
.
StructDeclaration
(
attributeLists
.
Node
.
ToGreenList
<
Syntax
.
InternalSyntax
.
AttributeListSyntax
>(),
modifiers
.
Node
.
ToGreenList
<
Syntax
.
InternalSyntax
.
SyntaxToken
>(),
(
Syntax
.
InternalSyntax
.
SyntaxToken
)
keyword
.
Node
!,
(
Syntax
.
InternalSyntax
.
SyntaxToken
)
identifier
.
Node
!,
typeParameterList
==
null
?
null
:
(
Syntax
.
InternalSyntax
.
TypeParameterListSyntax
)
typeParameterList
.
Green
,
baseList
==
null
?
null
:
(
Syntax
.
InternalSyntax
.
BaseListSyntax
)
baseList
.
Green
,
constraintClauses
.
Node
.
ToGreenList
<
Syntax
.
InternalSyntax
.
TypeParameterConstraintClauseSyntax
>(),
(
Syntax
.
InternalSyntax
.
SyntaxToken
)
openBraceToken
.
Node
!,
members
.
Node
.
ToGreenList
<
Syntax
.
InternalSyntax
.
MemberDeclarationSyntax
>(),
(
Syntax
.
InternalSyntax
.
SyntaxToken
)
closeBraceToken
.
Node
!,
(
Syntax
.
InternalSyntax
.
SyntaxToken
?)
semicolonToken
.
Node
).
CreateRed
();
}
/// <summary>Creates a new StructDeclarationSyntax instance.</summary>
public
static
StructDeclarationSyntax
StructDeclaration
(
SyntaxList
<
AttributeListSyntax
>
attributeLists
,
SyntaxTokenList
modifiers
,
SyntaxToken
identifier
,
TypeParameterListSyntax
?
typeParameterList
,
BaseListSyntax
?
baseList
,
SyntaxList
<
TypeParameterConstraintClauseSyntax
>
constraintClauses
,
SyntaxList
<
MemberDeclarationSyntax
>
members
)
=>
SyntaxFactory
.
StructDeclaration
(
attributeLists
,
modifiers
,
SyntaxFactory
.
Token
(
SyntaxKind
.
StructKeyword
),
identifier
,
typeParameterList
,
baseList
,
constraintClauses
,
SyntaxFactory
.
Token
(
SyntaxKind
.
OpenBraceToken
),
members
,
SyntaxFactory
.
Token
(
SyntaxKind
.
CloseBraceToken
),
default
);
/// <summary>Creates a new StructDeclarationSyntax instance.</summary>
public
static
StructDeclarationSyntax
StructDeclaration
(
SyntaxToken
identifier
)
=>
SyntaxFactory
.
StructDeclaration
(
default
,
default
(
SyntaxTokenList
),
SyntaxFactory
.
Token
(
SyntaxKind
.
StructKeyword
),
identifier
,
default
,
default
,
default
,
SyntaxFactory
.
Token
(
SyntaxKind
.
OpenBraceToken
),
default
,
SyntaxFactory
.
Token
(
SyntaxKind
.
CloseBraceToken
),
default
);
/// <summary>Creates a new StructDeclarationSyntax instance.</summary>
public
static
StructDeclarationSyntax
StructDeclaration
(
string
identifier
)
=>
SyntaxFactory
.
StructDeclaration
(
default
,
default
(
SyntaxTokenList
),
SyntaxFactory
.
Token
(
SyntaxKind
.
StructKeyword
),
SyntaxFactory
.
Identifier
(
identifier
),
default
,
default
,
default
,
SyntaxFactory
.
Token
(
SyntaxKind
.
OpenBraceToken
),
default
,
SyntaxFactory
.
Token
(
SyntaxKind
.
CloseBraceToken
),
default
);
/// <summary>Creates a new InterfaceDeclarationSyntax instance.</summary>
public
static
InterfaceDeclarationSyntax
InterfaceDeclaration
(
SyntaxList
<
AttributeListSyntax
>
attributeLists
,
SyntaxTokenList
modifiers
,
SyntaxToken
keyword
,
SyntaxToken
identifier
,
TypeParameterListSyntax
?
typeParameterList
,
BaseListSyntax
?
baseList
,
SyntaxList
<
TypeParameterConstraintClauseSyntax
>
constraintClauses
,
SyntaxToken
openBraceToken
,
SyntaxList
<
MemberDeclarationSyntax
>
members
,
SyntaxToken
closeBraceToken
,
SyntaxToken
semicolonToken
)
{
...
...
src/Compilers/CSharp/Portable/Symbols/Source/SourceConstructorSymbolBase.cs
浏览文件 @
fdb60ace
...
...
@@ -26,8 +26,6 @@ internal abstract class SourceConstructorSymbolBase : SourceMemberMethodSymbol
{
Debug
.
Assert
(
syntax
.
IsKind
(
SyntaxKind
.
ConstructorDeclaration
)
||
syntax
.
IsKind
(
SyntaxKind
.
ClassDeclaration
)
||
syntax
.
IsKind
(
SyntaxKind
.
StructDeclaration
)
||
syntax
.
IsKind
(
SyntaxKind
.
RecordDeclaration
));
}
...
...
@@ -75,7 +73,7 @@ protected sealed override void MethodChecks(DiagnosticBag diagnostics)
}
#
nullable
enable
protected
abstract
ParameterListSyntax
?
GetParameterList
();
protected
abstract
ParameterListSyntax
GetParameterList
();
#
nullable
restore
internal
sealed
override
void
AfterAddingTypeMembersChecks
(
ConversionsBase
conversions
,
DiagnosticBag
diagnostics
)
...
...
src/Compilers/CSharp/Portable/Symbols/Synthesized/Records/SynthesizedRecordConstructor.cs
浏览文件 @
fdb60ace
...
...
@@ -29,7 +29,7 @@ internal RecordDeclarationSyntax GetSyntax()
return
(
RecordDeclarationSyntax
)
syntaxReferenceOpt
.
GetSyntax
();
}
protected
override
ParameterListSyntax
?
GetParameterList
()
=>
GetSyntax
().
ParameterList
;
protected
override
ParameterListSyntax
GetParameterList
()
=>
GetSyntax
().
ParameterList
!
;
protected
override
CSharpSyntaxNode
?
GetInitializer
()
{
...
...
src/Compilers/CSharp/Portable/Syntax/StructDeclarationSyntax.cs
已删除
100644 → 0
浏览文件 @
53caa79b
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#
nullable
enable
using
Microsoft.CodeAnalysis.CSharp.Syntax
;
namespace
Microsoft.CodeAnalysis.CSharp
{
public
partial
class
SyntaxFactory
{
public
static
StructDeclarationSyntax
StructDeclaration
(
SyntaxList
<
AttributeListSyntax
>
attributeLists
,
SyntaxTokenList
modifiers
,
SyntaxToken
identifier
,
TypeParameterListSyntax
typeParameterList
,
BaseListSyntax
baseList
,
SyntaxList
<
TypeParameterConstraintClauseSyntax
>
constraintClauses
,
SyntaxList
<
MemberDeclarationSyntax
>
members
)
=>
SyntaxFactory
.
StructDeclaration
(
attributeLists
,
modifiers
,
SyntaxFactory
.
Token
(
SyntaxKind
.
StructKeyword
),
identifier
,
typeParameterList
,
baseList
,
constraintClauses
,
SyntaxFactory
.
Token
(
SyntaxKind
.
OpenBraceToken
),
members
,
SyntaxFactory
.
Token
(
SyntaxKind
.
CloseBraceToken
),
semicolonToken
:
default
);
/// <summary>Creates a new StructDeclarationSyntax instance.</summary>
public
static
StructDeclarationSyntax
StructDeclaration
(
SyntaxToken
identifier
)
=>
SyntaxFactory
.
StructDeclaration
(
default
,
default
(
SyntaxTokenList
),
SyntaxFactory
.
Token
(
SyntaxKind
.
StructKeyword
),
identifier
,
null
,
null
,
default
,
SyntaxFactory
.
Token
(
SyntaxKind
.
CloseBraceToken
),
default
,
SyntaxFactory
.
Token
(
SyntaxKind
.
CloseBraceToken
),
default
);
/// <summary>Creates a new StructDeclarationSyntax instance.</summary>
public
static
StructDeclarationSyntax
StructDeclaration
(
string
identifier
)
=>
SyntaxFactory
.
StructDeclaration
(
default
,
default
(
SyntaxTokenList
),
SyntaxFactory
.
Token
(
SyntaxKind
.
StructKeyword
),
SyntaxFactory
.
Identifier
(
identifier
),
null
,
null
,
default
,
default
,
default
,
default
,
default
);
}
}
src/Compilers/CSharp/Portable/Syntax/Syntax.xml
浏览文件 @
fdb60ace
...
...
@@ -3246,7 +3246,7 @@
<Kind
Name=
"SemicolonToken"
/>
</Field>
</Node>
<Node
Name=
"StructDeclarationSyntax"
Base=
"TypeDeclarationSyntax"
SkipConvenienceFactories=
"true"
>
<Node
Name=
"StructDeclarationSyntax"
Base=
"TypeDeclarationSyntax"
>
<TypeComment>
<summary>
Struct type declaration syntax.
</summary>
</TypeComment>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录