Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
dcbef6e9
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,发现更多精彩内容 >>
提交
dcbef6e9
编写于
8月 13, 2016
作者:
C
CyrusNajmabadi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Decouple SyntaxList from SyntaxListBuilder.
上级
8eafb6f4
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
7 addition
and
15 deletion
+7
-15
src/Compilers/CSharp/Portable/Parser/Lexer.cs
src/Compilers/CSharp/Portable/Parser/Lexer.cs
+6
-4
src/Compilers/CSharp/Portable/Syntax/InternalSyntax/SyntaxList.cs
...ilers/CSharp/Portable/Syntax/InternalSyntax/SyntaxList.cs
+0
-10
src/Dependencies/PooledObjects/Microsoft.CodeAnalysis.PooledObjects.shproj
...PooledObjects/Microsoft.CodeAnalysis.PooledObjects.shproj
+1
-1
未找到文件。
src/Compilers/CSharp/Portable/Parser/Lexer.cs
浏览文件 @
dcbef6e9
...
@@ -303,22 +303,24 @@ internal SyntaxTriviaList LexSyntaxLeadingTrivia()
...
@@ -303,22 +303,24 @@ internal SyntaxTriviaList LexSyntaxLeadingTrivia()
{
{
_leadingTriviaCache
.
Clear
();
_leadingTriviaCache
.
Clear
();
this
.
LexSyntaxTrivia
(
afterFirstToken
:
TextWindow
.
Position
>
0
,
isTrailing
:
false
,
triviaList
:
ref
_leadingTriviaCache
);
this
.
LexSyntaxTrivia
(
afterFirstToken
:
TextWindow
.
Position
>
0
,
isTrailing
:
false
,
triviaList
:
ref
_leadingTriviaCache
);
return
new
SyntaxTriviaList
(
default
(
Microsoft
.
CodeAnalysis
.
SyntaxToken
),
SyntaxList
.
List
(
_leadingTriviaCache
),
0
,
0
);
return
new
SyntaxTriviaList
(
default
(
Microsoft
.
CodeAnalysis
.
SyntaxToken
),
_leadingTriviaCache
?.
ToListNode
(),
position
:
0
,
index
:
0
);
}
}
internal
SyntaxTriviaList
LexSyntaxTrailingTrivia
()
internal
SyntaxTriviaList
LexSyntaxTrailingTrivia
()
{
{
_trailingTriviaCache
.
Clear
();
_trailingTriviaCache
.
Clear
();
this
.
LexSyntaxTrivia
(
afterFirstToken
:
true
,
isTrailing
:
true
,
triviaList
:
ref
_trailingTriviaCache
);
this
.
LexSyntaxTrivia
(
afterFirstToken
:
true
,
isTrailing
:
true
,
triviaList
:
ref
_trailingTriviaCache
);
return
new
SyntaxTriviaList
(
default
(
Microsoft
.
CodeAnalysis
.
SyntaxToken
),
SyntaxList
.
List
(
_trailingTriviaCache
),
0
,
0
);
return
new
SyntaxTriviaList
(
default
(
Microsoft
.
CodeAnalysis
.
SyntaxToken
),
_trailingTriviaCache
?.
ToListNode
(),
position
:
0
,
index
:
0
);
}
}
private
SyntaxToken
Create
(
ref
TokenInfo
info
,
SyntaxListBuilder
leading
,
SyntaxListBuilder
trailing
,
SyntaxDiagnosticInfo
[]
errors
)
private
SyntaxToken
Create
(
ref
TokenInfo
info
,
SyntaxListBuilder
leading
,
SyntaxListBuilder
trailing
,
SyntaxDiagnosticInfo
[]
errors
)
{
{
Debug
.
Assert
(
info
.
Kind
!=
SyntaxKind
.
IdentifierToken
||
info
.
StringValue
!=
null
);
Debug
.
Assert
(
info
.
Kind
!=
SyntaxKind
.
IdentifierToken
||
info
.
StringValue
!=
null
);
var
leadingNode
=
SyntaxList
.
List
(
leading
);
var
leadingNode
=
leading
?.
ToListNode
(
);
var
trailingNode
=
SyntaxList
.
List
(
trailing
);
var
trailingNode
=
trailing
?.
ToListNode
(
);
SyntaxToken
token
;
SyntaxToken
token
;
if
(
info
.
RequiresTextForXmlEntity
)
if
(
info
.
RequiresTextForXmlEntity
)
...
...
src/Compilers/CSharp/Portable/Syntax/InternalSyntax/SyntaxList.cs
浏览文件 @
dcbef6e9
...
@@ -96,16 +96,6 @@ internal static SyntaxList List(ArrayElement<CSharpSyntaxNode>[] children)
...
@@ -96,16 +96,6 @@ internal static SyntaxList List(ArrayElement<CSharpSyntaxNode>[] children)
}
}
}
}
internal
static
CSharpSyntaxNode
List
(
SyntaxListBuilder
builder
)
{
if
(
builder
!=
null
)
{
return
builder
.
ToListNode
();
}
return
null
;
}
internal
abstract
void
CopyTo
(
ArrayElement
<
CSharpSyntaxNode
>[]
array
,
int
offset
);
internal
abstract
void
CopyTo
(
ArrayElement
<
CSharpSyntaxNode
>[]
array
,
int
offset
);
internal
static
CSharpSyntaxNode
Concat
(
CSharpSyntaxNode
left
,
CSharpSyntaxNode
right
)
internal
static
CSharpSyntaxNode
Concat
(
CSharpSyntaxNode
left
,
CSharpSyntaxNode
right
)
...
...
src/Dependencies/PooledObjects/Microsoft.CodeAnalysis.PooledObjects.shproj
浏览文件 @
dcbef6e9
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"14.0"
DefaultTargets=
"Build"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<Project
ToolsVersion=
"14.0"
DefaultTargets=
"Build"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<PropertyGroup
Label=
"Globals"
>
<PropertyGroup
Label=
"Globals"
>
<ProjectGuid>
c
d77a8cc-2885-47a7-b99c-fbf13353400b
</ProjectGuid>
<ProjectGuid>
c
1930979-c824-496b-a630-70f5369a636f
</ProjectGuid>
<MinimumVisualStudioVersion>
14.0
</MinimumVisualStudioVersion>
<MinimumVisualStudioVersion>
14.0
</MinimumVisualStudioVersion>
</PropertyGroup>
</PropertyGroup>
<Import
Project=
"$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props"
Condition=
"Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"
/>
<Import
Project=
"$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props"
Condition=
"Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"
/>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录