Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
9e7362c0
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,发现更多精彩内容 >>
提交
9e7362c0
编写于
8月 27, 2015
作者:
C
Cyrus Najmabadi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Preserve error message.
Fixup tests (which now show better error recovery).
上级
41f22937
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
14 addition
and
12 deletion
+14
-12
src/Compilers/CSharp/Portable/Parser/LanguageParser.cs
src/Compilers/CSharp/Portable/Parser/LanguageParser.cs
+7
-0
src/Compilers/CSharp/Test/Syntax/Parsing/ParserErrorMessageTests.cs
...ers/CSharp/Test/Syntax/Parsing/ParserErrorMessageTests.cs
+2
-6
src/Compilers/CSharp/Test/Syntax/Parsing/ParsingErrorRecoveryTests.cs
...s/CSharp/Test/Syntax/Parsing/ParsingErrorRecoveryTests.cs
+3
-4
src/Test/Utilities/Runtime.FX46/TestRuntime.FX46.csproj.nuget.targets
...lities/Runtime.FX46/TestRuntime.FX46.csproj.nuget.targets
+1
-1
src/Test/Utilities/Runtime.FX46/TestRuntime.FX46.nuget.targets
...est/Utilities/Runtime.FX46/TestRuntime.FX46.nuget.targets
+1
-1
未找到文件。
src/Compilers/CSharp/Portable/Parser/LanguageParser.cs
浏览文件 @
9e7362c0
...
...
@@ -3446,6 +3446,13 @@ private bool IsPossibleAccessorModifier()
}
var
token
=
this
.
PeekToken
(
peekIndex
);
if
(
token
.
Kind
==
SyntaxKind
.
CloseBraceToken
)
{
// If we see "{ get { } public }
// then we will think that "public" likely starts an accessor.
return
true
;
}
switch
(
token
.
ContextualKind
)
{
case
SyntaxKind
.
GetKeyword
:
...
...
src/Compilers/CSharp/Test/Syntax/Parsing/ParserErrorMessageTests.cs
浏览文件 @
9e7362c0
...
...
@@ -2305,12 +2305,8 @@ public static int Main()
// (7,13): error CS1043: { or ; expected
// get return 1;
Diagnostic
(
ErrorCode
.
ERR_SemiOrLBraceExpected
,
"return"
),
// (9,15): error CS1014: A get or set accessor expected
// public static int Main()
Diagnostic
(
ErrorCode
.
ERR_GetOrSetExpected
,
"int"
),
// (9,15): error CS1513: } expected
// public static int Main()
Diagnostic
(
ErrorCode
.
ERR_RbraceExpected
,
"int"
));
// (8,2): error CS1513: } expected
Diagnostic
(
ErrorCode
.
ERR_RbraceExpected
,
""
));
}
[
Fact
]
...
...
src/Compilers/CSharp/Test/Syntax/Parsing/ParsingErrorRecoveryTests.cs
浏览文件 @
9e7362c0
...
...
@@ -5494,7 +5494,7 @@ public void TestModifiedMemberAfterPropertyGetBrace()
Assert
.
False
(
pd
.
AccessorList
.
OpenBraceToken
.
IsMissing
);
Assert
.
NotNull
(
pd
.
AccessorList
.
CloseBraceToken
);
Assert
.
True
(
pd
.
AccessorList
.
CloseBraceToken
.
IsMissing
);
Assert
.
Equal
(
2
,
pd
.
AccessorList
.
Accessors
.
Count
);
Assert
.
Equal
(
1
,
pd
.
AccessorList
.
Accessors
.
Count
);
var
acc
=
pd
.
AccessorList
.
Accessors
[
0
];
Assert
.
Equal
(
SyntaxKind
.
GetAccessorDeclaration
,
acc
.
Kind
());
Assert
.
NotNull
(
acc
.
Keyword
);
...
...
@@ -5508,10 +5508,9 @@ public void TestModifiedMemberAfterPropertyGetBrace()
Assert
.
True
(
acc
.
Body
.
CloseBraceToken
.
IsMissing
);
Assert
.
Equal
(
SyntaxKind
.
None
,
acc
.
SemicolonToken
.
Kind
());
Assert
.
Equal
(
3
,
file
.
Errors
().
Length
);
Assert
.
Equal
(
2
,
file
.
Errors
().
Length
);
Assert
.
Equal
((
int
)
ErrorCode
.
ERR_RbraceExpected
,
file
.
Errors
()[
0
].
Code
);
Assert
.
Equal
((
int
)
ErrorCode
.
ERR_GetOrSetExpected
,
file
.
Errors
()[
1
].
Code
);
Assert
.
Equal
((
int
)
ErrorCode
.
ERR_RbraceExpected
,
file
.
Errors
()[
2
].
Code
);
Assert
.
Equal
((
int
)
ErrorCode
.
ERR_RbraceExpected
,
file
.
Errors
()[
1
].
Code
);
}
[
Fact
]
...
...
src/Test/Utilities/Runtime.FX46/TestRuntime.FX46.csproj.nuget.targets
浏览文件 @
9e7362c0
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project
ToolsVersion=
"14.0"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<PropertyGroup
Condition=
"'$(NuGetPackageRoot)' == ''"
>
<NuGetPackageRoot>
C:\Users\
tomat
\.nuget\packages\
</NuGetPackageRoot>
<NuGetPackageRoot>
C:\Users\
cyrusn
\.nuget\packages\
</NuGetPackageRoot>
</PropertyGroup>
<ImportGroup>
<Import
Project=
"$(NuGetPackageRoot)\xunit.core\2.1.0-beta4-build3109\build\portable-win81+wpa81\xunit.core.targets"
Condition=
"Exists('$(NuGetPackageRoot)\xunit.core\2.1.0-beta4-build3109\build\portable-win81+wpa81\xunit.core.targets')"
/>
...
...
src/Test/Utilities/Runtime.FX46/TestRuntime.FX46.nuget.targets
浏览文件 @
9e7362c0
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project
ToolsVersion=
"14.0"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<PropertyGroup
Condition=
"'$(NuGetPackageRoot)' == ''"
>
<NuGetPackageRoot>
C:\Users\
tomat
\.nuget\packages\
</NuGetPackageRoot>
<NuGetPackageRoot>
C:\Users\
cyrusn
\.nuget\packages\
</NuGetPackageRoot>
</PropertyGroup>
<ImportGroup>
<Import
Project=
"$(NuGetPackageRoot)\xunit.core\2.1.0-beta4-build3109\build\portable-win81+wpa81\xunit.core.targets"
Condition=
"Exists('$(NuGetPackageRoot)\xunit.core\2.1.0-beta4-build3109\build\portable-win81+wpa81\xunit.core.targets')"
/>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录