Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
23458933
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,发现更多精彩内容 >>
提交
23458933
编写于
7月 17, 2019
作者:
P
Petr Houska
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'SyntaxKindsService-cleanup' into move-refa-to-helpers4
上级
236ea5d3
968a764a
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
26 addition
and
33 deletion
+26
-33
eng/config/PublishData.json
eng/config/PublishData.json
+6
-6
src/EditorFeatures/CSharpTest/EditAndContinue/StatementEditingTests.cs
...tures/CSharpTest/EditAndContinue/StatementEditingTests.cs
+13
-13
src/EditorFeatures/CSharpTest/EditAndContinue/StatementMatchingTests.cs
...ures/CSharpTest/EditAndContinue/StatementMatchingTests.cs
+4
-4
src/Workspaces/CSharp/Portable/LanguageServices/CSharpSyntaxKindsService.cs
...arp/Portable/LanguageServices/CSharpSyntaxKindsService.cs
+0
-6
src/Workspaces/Core/Portable/Indentation/AbstractIndentationService.Indenter.cs
...rtable/Indentation/AbstractIndentationService.Indenter.cs
+3
-3
src/Workspaces/Core/Portable/LanguageServices/SyntaxFactsService/ISyntaxKindsService.cs
...anguageServices/SyntaxFactsService/ISyntaxKindsService.cs
+0
-1
未找到文件。
eng/config/PublishData.json
浏览文件 @
23458933
...
...
@@ -74,23 +74,23 @@
"vsMajorVersion"
:
16
,
"ibcSourceBranch"
:
"master-vs-deps"
},
"features/
lspSupport
"
:
{
"features/
razorSupport2
"
:
{
"nugetKind"
:
[
"Shipping"
,
"NonShipping"
],
"version"
:
"3.1.*"
,
"nuget"
:
[
"https://dotnet.myget.org/F/roslyn/api/v2/package"
],
"vsix"
:
[
"https://dotnet.myget.org/F/roslyn/vsix/upload"
],
"channels"
:
[
"
lspSupport
"
],
"channels"
:
[
"
razorSupport2
"
],
"vsBranch"
:
"lab/d16.1stg"
,
"vsMajorVersion"
:
16
,
"ibcSourceBranch"
:
"master-vs-deps"
},
"features/
razorSupport2
"
:
{
"features/
compilerNext
"
:
{
"nugetKind"
:
[
"Shipping"
,
"NonShipping"
],
"version"
:
"3.
1
.*"
,
"version"
:
"3.
4
.*"
,
"nuget"
:
[
"https://dotnet.myget.org/F/roslyn/api/v2/package"
],
"vsix"
:
[
"https://dotnet.myget.org/F/roslyn/vsix/upload"
],
"channels"
:
[
"
razorSupport2
"
],
"vsBranch"
:
"
lab/d16.1stg
"
,
"channels"
:
[
"
compilerNext
"
],
"vsBranch"
:
"
master
"
,
"vsMajorVersion"
:
16
,
"ibcSourceBranch"
:
"master-vs-deps"
}
...
...
src/EditorFeatures/CSharpTest/EditAndContinue/StatementEditingTests.cs
浏览文件 @
23458933
...
...
@@ -6822,7 +6822,7 @@ public void LocalFunction_AddStatic()
var
src1
=
@"class Test { void M() { int local() { throw null; } } }"
;
var
src2
=
@"class Test { void M() { static int local() { throw null; } } }"
;
var
edits
=
GetTopEdits
(
src1
,
src2
,
CSharpParseOptions
.
Default
.
WithLanguageVersion
(
LanguageVersion
.
Preview
)
);
var
edits
=
GetTopEdits
(
src1
,
src2
);
edits
.
VerifyEdits
(
"Update [void M() { int local() { throw null; } }]@13 -> [void M() { static int local() { throw null; } }]@13"
);
...
...
@@ -6836,7 +6836,7 @@ public void LocalFunction_RemoveStatic()
var
src1
=
@"class Test { void M() { static int local() { throw null; } } }"
;
var
src2
=
@"class Test { void M() { int local() { throw null; } } }"
;
var
edits
=
GetTopEdits
(
src1
,
src2
,
CSharpParseOptions
.
Default
.
WithLanguageVersion
(
LanguageVersion
.
Preview
)
);
var
edits
=
GetTopEdits
(
src1
,
src2
);
edits
.
VerifyEdits
(
"Update [void M() { static int local() { throw null; } }]@13 -> [void M() { int local() { throw null; } }]@13"
);
...
...
@@ -6850,7 +6850,7 @@ public void LocalFunction_AddUnsafe()
var
src1
=
@"class Test { void M() { int local() { throw null; } } }"
;
var
src2
=
@"class Test { void M() { unsafe int local() { throw null; } } }"
;
var
edits
=
GetTopEdits
(
src1
,
src2
,
CSharpParseOptions
.
Default
.
WithLanguageVersion
(
LanguageVersion
.
Preview
)
);
var
edits
=
GetTopEdits
(
src1
,
src2
);
edits
.
VerifyEdits
(
"Update [void M() { int local() { throw null; } }]@13 -> [void M() { unsafe int local() { throw null; } }]@13"
);
...
...
@@ -6864,7 +6864,7 @@ public void LocalFunction_RemoveUnsafe()
var
src1
=
@"class Test { void M() { unsafe int local() { throw null; } } }"
;
var
src2
=
@"class Test { void M() { int local() { throw null; } } }"
;
var
edits
=
GetTopEdits
(
src1
,
src2
,
CSharpParseOptions
.
Default
.
WithLanguageVersion
(
LanguageVersion
.
Preview
)
);
var
edits
=
GetTopEdits
(
src1
,
src2
);
edits
.
VerifyEdits
(
"Update [void M() { unsafe int local() { throw null; } }]@13 -> [void M() { int local() { throw null; } }]@13"
);
...
...
@@ -6878,7 +6878,7 @@ public void LocalFunction_AddAsync()
var
src1
=
@"class Test { void M() { int local() { throw null; } } }"
;
var
src2
=
@"class Test { void M() { async int local() { throw null; } } }"
;
var
edits
=
GetTopEdits
(
src1
,
src2
,
CSharpParseOptions
.
Default
.
WithLanguageVersion
(
LanguageVersion
.
Preview
)
);
var
edits
=
GetTopEdits
(
src1
,
src2
);
edits
.
VerifyEdits
(
"Update [void M() { int local() { throw null; } }]@13 -> [void M() { async int local() { throw null; } }]@13"
);
...
...
@@ -6893,7 +6893,7 @@ public void LocalFunction_RemoveAsync()
var
src1
=
@"class Test { void M() { async int local() { throw null; } } }"
;
var
src2
=
@"class Test { void M() { int local() { throw null; } } }"
;
var
edits
=
GetTopEdits
(
src1
,
src2
,
CSharpParseOptions
.
Default
.
WithLanguageVersion
(
LanguageVersion
.
Preview
)
);
var
edits
=
GetTopEdits
(
src1
,
src2
);
edits
.
VerifyEdits
(
"Update [void M() { async int local() { throw null; } }]@13 -> [void M() { int local() { throw null; } }]@13"
);
...
...
@@ -8499,7 +8499,7 @@ static async Task<int> F()
}
}
"
;
var
edits
=
GetTopEdits
(
src1
,
src2
,
CSharpParseOptions
.
Default
.
WithLanguageVersion
(
LanguageVersion
.
Preview
)
);
var
edits
=
GetTopEdits
(
src1
,
src2
);
// consider: these edits can be allowed if we get more sophisticated
edits
.
VerifyRudeDiagnostics
(
...
...
@@ -9042,7 +9042,7 @@ public void VarPattern_Update()
if (o3 is (string k, int l2, int m)) return;
"
;
var
edits
=
GetMethodEdits
(
src1
,
src2
,
CSharpParseOptions
.
Default
.
WithLanguageVersion
(
LanguageVersion
.
Preview
)
);
var
edits
=
GetMethodEdits
(
src1
,
src2
);
edits
.
VerifyEdits
(
"Update [if (o is (var x, var y)) return;]@4 -> [if (o is (int x, int y1)) return;]@4"
,
...
...
@@ -9070,7 +9070,7 @@ public void PositionalPattern_Update1()
};
"
;
var
edits
=
GetMethodEdits
(
src1
,
src2
,
CSharpParseOptions
.
Default
.
WithLanguageVersion
(
LanguageVersion
.
Preview
)
);
var
edits
=
GetMethodEdits
(
src1
,
src2
);
edits
.
VerifyEdits
(
@"Update [r = (x, y, z) switch {
...
...
@@ -9103,7 +9103,7 @@ public void PositionalPattern_Update2()
};
"
;
var
edits
=
GetMethodEdits
(
src1
,
src2
,
CSharpParseOptions
.
Default
.
WithLanguageVersion
(
LanguageVersion
.
Preview
)
);
var
edits
=
GetMethodEdits
(
src1
,
src2
);
edits
.
VerifyEdits
(
@"Update [r = (x, y, z) switch {
...
...
@@ -9140,7 +9140,7 @@ public void PositionalPattern_Reorder()
};
"
;
var
edits
=
GetMethodEdits
(
src1
,
src2
,
CSharpParseOptions
.
Default
.
WithLanguageVersion
(
LanguageVersion
.
Preview
)
);
var
edits
=
GetMethodEdits
(
src1
,
src2
);
edits
.
VerifyEdits
(
@"Update [r = (x, y, z) switch {
...
...
@@ -9175,7 +9175,7 @@ public void PropertyPattern_Update()
if (o is string { Length: 7 } s7) return 5;
"
;
var
edits
=
GetMethodEdits
(
src1
,
src2
,
CSharpParseOptions
.
Default
.
WithLanguageVersion
(
LanguageVersion
.
Preview
)
);
var
edits
=
GetMethodEdits
(
src1
,
src2
);
edits
.
VerifyEdits
(
"Update [if (address is { State: \"WA\" }) return 1;]@4 -> [if (address is { ZipCode: 98052 }) return 4;]@4"
,
...
...
@@ -9213,7 +9213,7 @@ public void RecursivePatterns_Reorder()
};
"
;
var
edits
=
GetMethodEdits
(
src1
,
src2
,
CSharpParseOptions
.
Default
.
WithLanguageVersion
(
LanguageVersion
.
Preview
)
);
var
edits
=
GetMethodEdits
(
src1
,
src2
);
edits
.
VerifyEdits
(
@"Update [r = obj switch
...
...
src/EditorFeatures/CSharpTest/EditAndContinue/StatementMatchingTests.cs
浏览文件 @
23458933
...
...
@@ -1638,7 +1638,7 @@ public void VarPattern()
if (!(o7 is var (g, e, f))) return;
if (!(o3 is (string k, int l2, int m))) return;
"
;
var
match
=
GetMethodMatches
(
src1
,
src2
,
CSharpParseOptions
.
Default
.
WithLanguageVersion
(
LanguageVersion
.
Preview
),
kind
:
MethodKind
.
Regular
);
var
match
=
GetMethodMatches
(
src1
,
src2
,
kind
:
MethodKind
.
Regular
);
var
actual
=
ToMatchingPairs
(
match
);
var
expected
=
new
MatchingPairs
{
...
...
@@ -1687,7 +1687,7 @@ public void PositionalPattern()
};
"
;
var
match
=
GetMethodMatches
(
src1
,
src2
,
CSharpParseOptions
.
Default
.
WithLanguageVersion
(
LanguageVersion
.
Preview
),
kind
:
MethodKind
.
Regular
);
var
match
=
GetMethodMatches
(
src1
,
src2
,
kind
:
MethodKind
.
Regular
);
var
actual
=
ToMatchingPairs
(
match
);
var
expected
=
new
MatchingPairs
{
...
...
@@ -1719,7 +1719,7 @@ public void PropertyPattern()
if (o is string { Length: 7 } s7) return 5;
"
;
var
match
=
GetMethodMatches
(
src1
,
src2
,
CSharpParseOptions
.
Default
.
WithLanguageVersion
(
LanguageVersion
.
Preview
),
kind
:
MethodKind
.
Regular
);
var
match
=
GetMethodMatches
(
src1
,
src2
,
kind
:
MethodKind
.
Regular
);
var
actual
=
ToMatchingPairs
(
match
);
var
expected
=
new
MatchingPairs
{
...
...
@@ -1764,7 +1764,7 @@ public void RecursivePatterns()
};
"
;
var
match
=
GetMethodMatches
(
src1
,
src2
,
CSharpParseOptions
.
Default
.
WithLanguageVersion
(
LanguageVersion
.
Preview
),
kind
:
MethodKind
.
Regular
);
var
match
=
GetMethodMatches
(
src1
,
src2
,
kind
:
MethodKind
.
Regular
);
var
actual
=
ToMatchingPairs
(
match
);
var
expected
=
new
MatchingPairs
{
...
...
src/Workspaces/CSharp/Portable/LanguageServices/CSharpSyntaxKindsService.cs
浏览文件 @
23458933
...
...
@@ -22,17 +22,11 @@ private CSharpSyntaxKindsService()
public
override
int
LogicalOrExpression
=>
(
int
)
SyntaxKind
.
LogicalOrExpression
;
public
override
int
EndOfFileToken
=>
(
int
)
SyntaxKind
.
EndOfFileToken
;
public
override
int
AwaitKeyword
=>
(
int
)
SyntaxKind
.
AwaitKeyword
;
public
override
int
IdentifierToken
=>
(
int
)
SyntaxKind
.
IdentifierToken
;
public
override
int
GlobalKeyword
=>
(
int
)
SyntaxKind
.
GlobalKeyword
;
public
override
int
IncompleteMember
=>
(
int
)
SyntaxKind
.
IncompleteMember
;
public
override
int
UsingStatement
=>
(
int
)
SyntaxKind
.
UsingStatement
;
public
override
int
ReturnStatement
=>
(
int
)
SyntaxKind
.
ReturnStatement
;
public
override
int
HashToken
=>
(
int
)
SyntaxKind
.
HashToken
;
}
}
src/Workspaces/Core/Portable/Indentation/AbstractIndentationService.
Abstract
Indenter.cs
→
src/Workspaces/Core/Portable/Indentation/AbstractIndentationService.Indenter.cs
浏览文件 @
23458933
...
...
@@ -35,7 +35,7 @@ protected struct Indenter
(
tk
.
LeadingTrivia
.
Any
(
tr
=>
tr
.
IsDirective
)
||
tk
.
TrailingTrivia
.
Any
(
tr
=>
tr
.
IsDirective
));
private
readonly
ISyntaxFactsService
_syntaxFacts
;
private
readonly
int
T
abSize
;
private
readonly
int
_t
abSize
;
public
Indenter
(
AbstractIndentationService
<
TSyntaxRoot
>
service
,
...
...
@@ -52,13 +52,13 @@ protected struct Indenter
this
.
OptionSet
=
optionSet
;
this
.
Root
=
(
TSyntaxRoot
)
document
.
Root
;
this
.
LineToBeIndented
=
lineToBeIndented
;
this
.
T
abSize
=
this
.
OptionSet
.
GetOption
(
FormattingOptions
.
TabSize
,
Root
.
Language
);
this
.
_t
abSize
=
this
.
OptionSet
.
GetOption
(
FormattingOptions
.
TabSize
,
Root
.
Language
);
this
.
CancellationToken
=
cancellationToken
;
this
.
Rules
=
rules
;
this
.
Finder
=
new
BottomUpBaseIndentationFinder
(
new
ChainedFormattingRules
(
this
.
Rules
,
OptionSet
),
this
.
T
abSize
,
this
.
_t
abSize
,
this
.
OptionSet
.
GetOption
(
FormattingOptions
.
IndentationSize
,
Root
.
Language
),
tokenStream
:
null
);
}
...
...
src/Workspaces/Core/Portable/LanguageServices/SyntaxFactsService/ISyntaxKindsService.cs
浏览文件 @
23458933
...
...
@@ -44,7 +44,6 @@ internal abstract class AbstractSyntaxKindsService : ISyntaxKindsService
public
abstract
int
LogicalAndExpression
{
get
;
}
public
abstract
int
LogicalOrExpression
{
get
;
}
public
abstract
int
EndOfFileToken
{
get
;
}
public
abstract
int
IdentifierToken
{
get
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录