Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
a137aa48
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,发现更多精彩内容 >>
提交
a137aa48
编写于
8月 24, 2016
作者:
C
CyrusNajmabadi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove unnecessary extension.
上级
e846cc98
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
28 addition
and
38 deletion
+28
-38
src/Compilers/CSharp/Portable/Parser/DocumentationCommentParser.cs
...lers/CSharp/Portable/Parser/DocumentationCommentParser.cs
+1
-1
src/Compilers/CSharp/Portable/Parser/LanguageParser.cs
src/Compilers/CSharp/Portable/Parser/LanguageParser.cs
+27
-27
src/Compilers/Core/Portable/Syntax/InternalSyntax/SyntaxListBuilderExtensions.cs
...able/Syntax/InternalSyntax/SyntaxListBuilderExtensions.cs
+0
-10
未找到文件。
src/Compilers/CSharp/Portable/Parser/DocumentationCommentParser.cs
浏览文件 @
a137aa48
...
...
@@ -110,7 +110,7 @@ public void ParseRemainder(SyntaxListBuilder<XmlNodeSyntax> nodes)
textTokens
.
Add
(
token
);
}
var
allRemainderText
=
SyntaxFactory
.
XmlText
(
textTokens
.
To
Token
List
());
var
allRemainderText
=
SyntaxFactory
.
XmlText
(
textTokens
.
ToList
());
XmlParseErrorCode
code
=
endTag
?
XmlParseErrorCode
.
XML_EndTagNotExpected
:
XmlParseErrorCode
.
XML_ExpectedEndOfXml
;
allRemainderText
=
WithAdditionalDiagnostics
(
allRemainderText
,
new
XmlSyntaxDiagnosticInfo
(
0
,
1
,
code
));
...
...
src/Compilers/CSharp/Portable/Parser/LanguageParser.cs
浏览文件 @
a137aa48
...
...
@@ -1691,7 +1691,7 @@ private TypeDeclarationSyntax ParseClassOrStructOrInterfaceDeclaration(SyntaxLis
case
SyntaxKind
.
ClassKeyword
:
return
_syntaxFactory
.
ClassDeclaration
(
attributes
,
modifiers
.
To
Token
List
(),
modifiers
.
ToList
(),
classOrStructOrInterface
,
name
,
typeParameters
,
...
...
@@ -1705,7 +1705,7 @@ private TypeDeclarationSyntax ParseClassOrStructOrInterfaceDeclaration(SyntaxLis
case
SyntaxKind
.
StructKeyword
:
return
_syntaxFactory
.
StructDeclaration
(
attributes
,
modifiers
.
To
Token
List
(),
modifiers
.
ToList
(),
classOrStructOrInterface
,
name
,
typeParameters
,
...
...
@@ -1719,7 +1719,7 @@ private TypeDeclarationSyntax ParseClassOrStructOrInterfaceDeclaration(SyntaxLis
case
SyntaxKind
.
InterfaceKeyword
:
return
_syntaxFactory
.
InterfaceDeclaration
(
attributes
,
modifiers
.
To
Token
List
(),
modifiers
.
ToList
(),
classOrStructOrInterface
,
name
,
typeParameters
,
...
...
@@ -2427,7 +2427,7 @@ private MemberDeclarationSyntax ParseMemberDeclarationOrStatement(SyntaxKind par
ErrorCode
.
ERR_BadModifierLocation
,
misplacedModifier
.
Text
);
return
_syntaxFactory
.
IncompleteMember
(
attributes
,
modifiers
.
To
Token
List
(),
type
);
return
_syntaxFactory
.
IncompleteMember
(
attributes
,
modifiers
.
ToList
(),
type
);
}
parse_member_name
:;
...
...
@@ -2471,7 +2471,7 @@ private MemberDeclarationSyntax ParseMemberDeclarationOrStatement(SyntaxKind par
return
null
;
}
var
incompleteMember
=
_syntaxFactory
.
IncompleteMember
(
attributes
,
modifiers
.
To
Token
List
(),
type
.
IsMissing
?
null
:
type
);
var
incompleteMember
=
_syntaxFactory
.
IncompleteMember
(
attributes
,
modifiers
.
ToList
(),
type
.
IsMissing
?
null
:
type
);
if
(
incompleteMember
.
ContainsDiagnostics
)
{
return
incompleteMember
;
...
...
@@ -2705,7 +2705,7 @@ private ConstructorDeclarationSyntax ParseConstructorDeclaration(string typeName
SyntaxToken
semicolon
;
this
.
ParseBodyOrSemicolon
(
out
body
,
out
semicolon
);
return
_syntaxFactory
.
ConstructorDeclaration
(
attributes
,
modifiers
.
To
Token
List
(),
name
,
paramList
,
initializer
,
body
,
semicolon
);
return
_syntaxFactory
.
ConstructorDeclaration
(
attributes
,
modifiers
.
ToList
(),
name
,
paramList
,
initializer
,
body
,
semicolon
);
}
finally
{
...
...
@@ -2775,7 +2775,7 @@ private DestructorDeclarationSyntax ParseDestructorDeclaration(string typeName,
this
.
ParseBodyOrSemicolon
(
out
body
,
out
semicolon
);
var
parameterList
=
_syntaxFactory
.
ParameterList
(
openParen
,
default
(
SeparatedSyntaxList
<
ParameterSyntax
>),
closeParen
);
return
_syntaxFactory
.
DestructorDeclaration
(
attributes
,
modifiers
.
To
Token
List
(),
tilde
,
name
,
parameterList
,
body
,
semicolon
);
return
_syntaxFactory
.
DestructorDeclaration
(
attributes
,
modifiers
.
ToList
(),
tilde
,
name
,
parameterList
,
body
,
semicolon
);
}
/// <summary>
...
...
@@ -2973,7 +2973,7 @@ private bool IsEndOfNameInExplicitInterface()
var
decl
=
_syntaxFactory
.
MethodDeclaration
(
attributes
,
modifiers
.
To
Token
List
(),
modifiers
.
ToList
(),
type
,
explicitInterfaceOpt
,
identifier
,
...
...
@@ -3046,7 +3046,7 @@ private ConversionOperatorDeclarationSyntax ParseConversionOperatorDeclaration(S
var
decl
=
_syntaxFactory
.
ConversionOperatorDeclaration
(
attributes
,
modifiers
.
To
Token
List
(),
modifiers
.
ToList
(),
style
,
opKeyword
,
type
,
...
...
@@ -3179,7 +3179,7 @@ private ConversionOperatorDeclarationSyntax ParseConversionOperatorDeclaration(S
var
decl
=
_syntaxFactory
.
OperatorDeclaration
(
attributes
,
modifiers
.
To
Token
List
(),
modifiers
.
ToList
(),
type
,
opKeyword
,
opToken
,
...
...
@@ -3248,7 +3248,7 @@ private ConversionOperatorDeclarationSyntax ParseConversionOperatorDeclaration(S
var
decl
=
_syntaxFactory
.
IndexerDeclaration
(
attributes
,
modifiers
.
To
Token
List
(),
modifiers
.
ToList
(),
type
,
explicitInterfaceOpt
,
thisKeyword
,
...
...
@@ -3316,7 +3316,7 @@ private ConversionOperatorDeclarationSyntax ParseConversionOperatorDeclaration(S
var
decl
=
_syntaxFactory
.
PropertyDeclaration
(
attributes
,
modifiers
.
To
Token
List
(),
modifiers
.
ToList
(),
type
,
explicitInterfaceOpt
,
identifier
,
...
...
@@ -3746,7 +3746,7 @@ private enum PostSkipAction
}
}
return
_syntaxFactory
.
AccessorDeclaration
(
accessorKind
,
accAttrs
,
accMods
.
To
Token
List
(),
accessorName
,
body
,
semicolon
);
return
_syntaxFactory
.
AccessorDeclaration
(
accessorKind
,
accAttrs
,
accMods
.
ToList
(),
accessorName
,
body
,
semicolon
);
}
finally
{
...
...
@@ -4147,7 +4147,7 @@ private static bool CanReuseParameter(CSharp.Syntax.ParameterSyntax parameter)
}
}
return
_syntaxFactory
.
Parameter
(
attributes
,
modifiers
.
To
Token
List
(),
type
,
name
,
def
);
return
_syntaxFactory
.
Parameter
(
attributes
,
modifiers
.
ToList
(),
type
,
name
,
def
);
}
private
static
bool
IsParameterModifier
(
SyntaxKind
kind
,
bool
allowThisKeyword
)
...
...
@@ -4317,7 +4317,7 @@ private void ParseParameterModifiers(SyntaxListBuilder modifiers, bool allowThis
var
semicolon
=
this
.
EatToken
(
SyntaxKind
.
SemicolonToken
);
return
_syntaxFactory
.
FieldDeclaration
(
attributes
,
modifiers
.
To
Token
List
(),
attributes
,
modifiers
.
ToList
(),
_syntaxFactory
.
VariableDeclaration
(
type
,
variables
),
semicolon
);
}
...
...
@@ -4377,7 +4377,7 @@ private void ParseParameterModifiers(SyntaxListBuilder modifiers, bool allowThis
return
_syntaxFactory
.
EventDeclaration
(
attributes
,
modifiers
.
To
Token
List
(),
modifiers
.
ToList
(),
eventToken
,
type
,
explicitInterfaceOpt
,
//already has an appropriate error attached
...
...
@@ -4419,7 +4419,7 @@ private void ParseParameterModifiers(SyntaxListBuilder modifiers, bool allowThis
var
decl
=
_syntaxFactory
.
EventDeclaration
(
attributes
,
modifiers
.
To
Token
List
(),
modifiers
.
ToList
(),
eventToken
,
type
,
explicitInterfaceOpt
,
...
...
@@ -4460,7 +4460,7 @@ private void ParseParameterModifiers(SyntaxListBuilder modifiers, bool allowThis
var
semicolon
=
this
.
EatToken
(
SyntaxKind
.
SemicolonToken
);
return
_syntaxFactory
.
FieldDeclaration
(
attributes
,
modifiers
.
To
Token
List
(),
modifiers
.
ToList
(),
_syntaxFactory
.
VariableDeclaration
(
type
,
variables
),
semicolon
);
}
...
...
@@ -4506,7 +4506,7 @@ private void ParseParameterModifiers(SyntaxListBuilder modifiers, bool allowThis
var
semicolon
=
this
.
EatToken
(
SyntaxKind
.
SemicolonToken
);
return
_syntaxFactory
.
EventFieldDeclaration
(
attributes
,
modifiers
.
To
Token
List
(),
modifiers
.
ToList
(),
eventToken
,
_syntaxFactory
.
VariableDeclaration
(
type
,
variables
),
semicolon
);
...
...
@@ -4995,7 +4995,7 @@ private FieldDeclarationSyntax ParseConstantFieldDeclaration(SyntaxListBuilder<A
var
semicolon
=
this
.
EatToken
(
SyntaxKind
.
SemicolonToken
);
return
_syntaxFactory
.
FieldDeclaration
(
attributes
,
modifiers
.
To
Token
List
(),
modifiers
.
ToList
(),
_syntaxFactory
.
VariableDeclaration
(
type
,
variables
),
semicolon
);
}
...
...
@@ -5028,7 +5028,7 @@ private DelegateDeclarationSyntax ParseDelegateDeclaration(SyntaxListBuilder<Att
_termState
=
saveTerm
;
var
semicolon
=
this
.
EatToken
(
SyntaxKind
.
SemicolonToken
);
return
_syntaxFactory
.
DelegateDeclaration
(
attributes
,
modifiers
.
To
Token
List
(),
delegateToken
,
type
,
name
,
typeParameters
,
parameterList
,
constraints
,
semicolon
);
return
_syntaxFactory
.
DelegateDeclaration
(
attributes
,
modifiers
.
ToList
(),
delegateToken
,
type
,
name
,
typeParameters
,
parameterList
,
constraints
,
semicolon
);
}
finally
{
...
...
@@ -5093,7 +5093,7 @@ private EnumDeclarationSyntax ParseEnumDeclaration(SyntaxListBuilder<AttributeLi
return
_syntaxFactory
.
EnumDeclaration
(
attributes
,
modifiers
.
To
Token
List
(),
modifiers
.
ToList
(),
enumToken
,
name
,
baseList
,
...
...
@@ -8304,7 +8304,7 @@ private StatementSyntax ParseLocalDeclarationStatement()
if
(
deconstruction
!=
null
)
{
var
semicolon
=
this
.
EatToken
(
SyntaxKind
.
SemicolonToken
);
var
result
=
_syntaxFactory
.
DeconstructionDeclarationStatement
(
mods
.
To
Token
List
(),
deconstruction
,
semicolon
);
var
result
=
_syntaxFactory
.
DeconstructionDeclarationStatement
(
mods
.
ToList
(),
deconstruction
,
semicolon
);
_pool
.
Free
(
mods
);
return
result
;
}
...
...
@@ -8316,7 +8316,7 @@ private StatementSyntax ParseLocalDeclarationStatement()
LocalFunctionStatementSyntax
localFunction
;
this
.
ParseLocalDeclaration
(
variables
,
allowLocalFunctions
:
true
,
mods
:
mods
.
To
Token
List
(),
mods
:
mods
.
ToList
(),
type
:
out
type
,
localFunction
:
out
localFunction
);
...
...
@@ -8346,7 +8346,7 @@ private StatementSyntax ParseLocalDeclarationStatement()
var
semicolon
=
this
.
EatToken
(
SyntaxKind
.
SemicolonToken
);
return
_syntaxFactory
.
LocalDeclarationStatement
(
mods
.
To
Token
List
(),
mods
.
ToList
(),
_syntaxFactory
.
VariableDeclaration
(
type
,
variables
),
semicolon
);
}
...
...
@@ -8831,7 +8831,7 @@ private static bool IsAccessibilityModifier(SyntaxKind kind)
}
if
(
badBuilder
!=
null
)
{
modifiers
=
badBuilder
.
To
Token
List
();
modifiers
=
badBuilder
.
ToList
();
_pool
.
Free
(
badBuilder
);
}
...
...
@@ -10804,7 +10804,7 @@ private ImplicitArrayCreationExpressionSyntax ParseImplicitlyTypedArrayCreation(
var
initializer
=
this
.
ParseArrayInitializer
();
return
_syntaxFactory
.
ImplicitArrayCreationExpression
(
@new
,
openBracket
,
commas
.
To
Token
List
(),
closeBracket
,
initializer
);
return
_syntaxFactory
.
ImplicitArrayCreationExpression
(
@new
,
openBracket
,
commas
.
ToList
(),
closeBracket
,
initializer
);
}
finally
{
...
...
src/Compilers/Core/Portable/Syntax/InternalSyntax/SyntaxListBuilderExtensions.cs
浏览文件 @
a137aa48
...
...
@@ -4,16 +4,6 @@ namespace Microsoft.CodeAnalysis.Syntax.InternalSyntax
{
internal
static
class
SyntaxListBuilderExtensions
{
public
static
SyntaxList
<
GreenNode
>
ToTokenList
(
this
SyntaxListBuilder
builder
)
{
if
(
builder
==
null
)
{
return
default
(
SyntaxList
<
GreenNode
>);
}
return
new
SyntaxList
<
GreenNode
>(
builder
.
ToListNode
());
}
public
static
SyntaxList
<
GreenNode
>
ToList
(
this
SyntaxListBuilder
builder
)
{
return
ToList
<
GreenNode
>(
builder
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录