Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
de4ee700
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,发现更多精彩内容 >>
提交
de4ee700
编写于
1月 09, 2015
作者:
K
KirillOsenkov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix typo: triva -> trivia. Seems to be a common typo. (changeset 1395446)
上级
86c7f199
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
17 addition
and
17 deletion
+17
-17
Src/Compilers/Core/Portable/Syntax/SyntaxNodeExtensions.cs
Src/Compilers/Core/Portable/Syntax/SyntaxNodeExtensions.cs
+1
-1
Src/Compilers/VisualBasic/Portable/Syntax/InternalSyntax/SyntaxNodeExtensions.vb
...ic/Portable/Syntax/InternalSyntax/SyntaxNodeExtensions.vb
+2
-2
Src/Compilers/VisualBasic/Portable/VisualBasicExtensions.vb
Src/Compilers/VisualBasic/Portable/VisualBasicExtensions.vb
+1
-1
Src/Compilers/VisualBasic/Test/Syntax/TestSyntaxNodes.vb
Src/Compilers/VisualBasic/Test/Syntax/TestSyntaxNodes.vb
+2
-2
Src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicSyntaxGenerator/SDML.xsd
...GeneratorTools/Source/VisualBasicSyntaxGenerator/SDML.xsd
+2
-2
Src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicSyntaxGenerator/VBSyntaxModelSchema.xsd
...Source/VisualBasicSyntaxGenerator/VBSyntaxModelSchema.xsd
+2
-2
Src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicSyntaxGenerator/XML/ParseTreeDescription.vb
...ce/VisualBasicSyntaxGenerator/XML/ParseTreeDescription.vb
+1
-1
Src/Workspaces/Core/Portable/Formatting/Context/FormattingContext.cs
...ces/Core/Portable/Formatting/Context/FormattingContext.cs
+1
-1
Src/Workspaces/VisualBasic/Portable/CodeCleanup/Providers/AddMissingTokensCodeCleanupProvider.vb
...eCleanup/Providers/AddMissingTokensCodeCleanupProvider.vb
+1
-1
Src/Workspaces/VisualBasic/Portable/CodeGeneration/VisualBasicSyntaxGenerator.vb
...sic/Portable/CodeGeneration/VisualBasicSyntaxGenerator.vb
+3
-3
Src/Workspaces/VisualBasic/Portable/Formatting/Engine/Trivia/TriviaDataFactory.CodeShapeAnalyzer.vb
...ting/Engine/Trivia/TriviaDataFactory.CodeShapeAnalyzer.vb
+1
-1
未找到文件。
Src/Compilers/Core/Portable/Syntax/SyntaxNodeExtensions.cs
浏览文件 @
de4ee700
...
@@ -150,7 +150,7 @@ public static TRoot InsertTokensAfter<TRoot>(this TRoot root, SyntaxToken tokenI
...
@@ -150,7 +150,7 @@ public static TRoot InsertTokensAfter<TRoot>(this TRoot root, SyntaxToken tokenI
}
}
/// <summary>
/// <summary>
/// Creates a new tree of nodes with the specified old triva replaced with new trivia.
/// Creates a new tree of nodes with the specified old triv
i
a replaced with new trivia.
/// </summary>
/// </summary>
/// <typeparam name="TRoot">The type of the root node.</typeparam>
/// <typeparam name="TRoot">The type of the root node.</typeparam>
/// <param name="root">The root of the tree of nodes.</param>
/// <param name="root">The root of the tree of nodes.</param>
...
...
Src/Compilers/VisualBasic/Portable/Syntax/InternalSyntax/SyntaxNodeExtensions.vb
浏览文件 @
de4ee700
...
@@ -451,7 +451,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Syntax.InternalSyntax
...
@@ -451,7 +451,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Syntax.InternalSyntax
Private
addDiagnosticsToFirstTokenOnly
As
Boolean
Private
addDiagnosticsToFirstTokenOnly
As
Boolean
Private
diagnosticsToAdd
As
IEnumerable
(
Of
DiagnosticInfo
)
Private
diagnosticsToAdd
As
IEnumerable
(
Of
DiagnosticInfo
)
' Add a trivia to the triva we are accumulating.
' Add a trivia to the triv
i
a we are accumulating.
Private
Sub
AddTrivia
(
trivia
As
VisualBasicSyntaxNode
)
Private
Sub
AddTrivia
(
trivia
As
VisualBasicSyntaxNode
)
FinishInProgressTokens
()
FinishInProgressTokens
()
triviaListBuilder
.
AddRange
(
trivia
)
triviaListBuilder
.
AddRange
(
trivia
)
...
@@ -484,7 +484,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Syntax.InternalSyntax
...
@@ -484,7 +484,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Syntax.InternalSyntax
Me
.
diagnosticsToAdd
=
diagnosticsToAdd
Me
.
diagnosticsToAdd
=
diagnosticsToAdd
End
Sub
End
Sub
' Process a token. and add to the list of triva/tokens we're accumulating.
' Process a token. and add to the list of triv
i
a/tokens we're accumulating.
Public
Sub
AddToken
(
token
As
SyntaxToken
,
isFirst
As
Boolean
,
isLast
As
Boolean
)
Public
Sub
AddToken
(
token
As
SyntaxToken
,
isFirst
As
Boolean
,
isLast
As
Boolean
)
Dim
isMissing
As
Boolean
=
token
.
IsMissing
Dim
isMissing
As
Boolean
=
token
.
IsMissing
...
...
Src/Compilers/VisualBasic/Portable/VisualBasicExtensions.vb
浏览文件 @
de4ee700
...
@@ -458,7 +458,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
...
@@ -458,7 +458,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
''' Gets the DirectiveTriviaSyntax items for a specified SytaxNode with optional filtering.
''' Gets the DirectiveTriviaSyntax items for a specified SytaxNode with optional filtering.
''' </summary>
''' </summary>
''' <param name="node">The source SyntaxNode.</param>
''' <param name="node">The source SyntaxNode.</param>
''' <param name="filter">The optional DirectiveTriva Syntax filter predicate.</param>
''' <param name="filter">The optional DirectiveTriv
i
a Syntax filter predicate.</param>
''' <returns>A list of DirectiveTriviaSyntax items</returns>
''' <returns>A list of DirectiveTriviaSyntax items</returns>
<
Extension
>
<
Extension
>
Public
Function
GetDirectives
(
node
As
SyntaxNode
,
Optional
filter
As
Func
(
Of
DirectiveTriviaSyntax
,
Boolean
)
=
Nothing
)
As
IList
(
Of
DirectiveTriviaSyntax
)
Public
Function
GetDirectives
(
node
As
SyntaxNode
,
Optional
filter
As
Func
(
Of
DirectiveTriviaSyntax
,
Boolean
)
=
Nothing
)
As
IList
(
Of
DirectiveTriviaSyntax
)
...
...
Src/Compilers/VisualBasic/Test/Syntax/TestSyntaxNodes.vb
浏览文件 @
de4ee700
...
@@ -2118,7 +2118,7 @@ End Class]]>
...
@@ -2118,7 +2118,7 @@ End Class]]>
<
WorkItem
(
539940
,
"DevDiv"
)
>
<
WorkItem
(
539940
,
"DevDiv"
)
>
<
Fact
>
<
Fact
>
Public
Sub
TestFindTrivaNoTriviaExistsAtPosition
()
Public
Sub
TestFindTriv
i
aNoTriviaExistsAtPosition
()
Dim
code
=
<
code
>
Class
Foo
Dim
code
=
<
code
>
Class
Foo
Sub
Bar
()
Sub
Bar
()
End
Sub
End
Sub
...
@@ -3643,7 +3643,7 @@ End Module
...
@@ -3643,7 +3643,7 @@ End Module
End
Sub
End
Sub
<
Fact
>
<
Fact
>
Public
Sub
SyntaxWalkerMehthod_VerifySkippedTokenTriva
()
Public
Sub
SyntaxWalkerMehthod_VerifySkippedTokenTriv
i
a
()
Dim
Compilation
=
CreateCompilationWithMscorlibAndVBRuntime
(
Dim
Compilation
=
CreateCompilationWithMscorlibAndVBRuntime
(
<
compilation
name
=
"SyntaxWalkerTestTypes"
>
<
compilation
name
=
"SyntaxWalkerTestTypes"
>
<
file
name
=
"Test.vb"
>
<
file
name
=
"Test.vb"
>
...
...
Src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicSyntaxGenerator/SDML.xsd
浏览文件 @
de4ee700
...
@@ -56,8 +56,8 @@ the definition of VB parse tree nodes. -->
...
@@ -56,8 +56,8 @@ the definition of VB parse tree nodes. -->
abstract - if true, this is an abstract class that is never instantiated, only used as a base class.
abstract - if true, this is an abstract class that is never instantiated, only used as a base class.
partial - if true, make this a partial class [optional]
partial - if true, make this a partial class [optional]
token-root - sets this at the root of all tokens. Exactly one structure must have this.
token-root - sets this at the root of all tokens. Exactly one structure must have this.
trivia-root - sets this at the root of all triv
ate
. zero or structure must have this.
trivia-root - sets this at the root of all triv
ia
. zero or structure must have this.
default-trailing-triva - can be "space", "newline"; indicates default trailing trivia
default-trailing-triv
i
a - can be "space", "newline"; indicates default trailing trivia
to add for the simplified factory method.
to add for the simplified factory method.
no-factory - if true, no factory method is auto-generated.
no-factory - if true, no factory method is auto-generated.
Sub-Elements:
Sub-Elements:
...
...
Src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicSyntaxGenerator/VBSyntaxModelSchema.xsd
浏览文件 @
de4ee700
...
@@ -57,8 +57,8 @@ the definition of VB parse tree nodes. -->
...
@@ -57,8 +57,8 @@ the definition of VB parse tree nodes. -->
abstract - if true, this is an abstract class that is never instantiated, only used as a base class.
abstract - if true, this is an abstract class that is never instantiated, only used as a base class.
partial - if true, make this a partial class [optional]
partial - if true, make this a partial class [optional]
token-root - sets this at the root of all tokens. Exactly one structure must have this.
token-root - sets this at the root of all tokens. Exactly one structure must have this.
trivia-root - sets this at the root of all triv
ate
. zero or structure must have this.
trivia-root - sets this at the root of all triv
ia
. zero or structure must have this.
default-trailing-triva - can be "space", "newline"; indicates default trailing trivia
default-trailing-triv
i
a - can be "space", "newline"; indicates default trailing trivia
to add for the simplified factory method.
to add for the simplified factory method.
no-factory - if true, no factory method is auto-generated.
no-factory - if true, no factory method is auto-generated.
syntax-facts-internal - (boolean, default false) If true, the syntax facts method Is...
syntax-facts-internal - (boolean, default false) If true, the syntax facts method Is...
...
...
Src/Tools/Source/CompilerGeneratorTools/Source/VisualBasicSyntaxGenerator/XML/ParseTreeDescription.vb
浏览文件 @
de4ee700
...
@@ -97,7 +97,7 @@ Public Class ParseTree
...
@@ -97,7 +97,7 @@ Public Class ParseTree
RootToken
=
struct
RootToken
=
struct
End
If
End
If
' Check for triva root.
' Check for triv
i
a root.
If
struct
.
IsTriviaRoot
Then
If
struct
.
IsTriviaRoot
Then
If
RootTrivia
IsNot
Nothing
Then
ReportError
(
struct
.
Element
,
"More than one trivia root specified."
)
If
RootTrivia
IsNot
Nothing
Then
ReportError
(
struct
.
Element
,
"More than one trivia root specified."
)
RootTrivia
=
struct
RootTrivia
=
struct
...
...
Src/Workspaces/Core/Portable/Formatting/Context/FormattingContext.cs
浏览文件 @
de4ee700
...
@@ -276,7 +276,7 @@ public void AddInitialSuppressOperation(SuppressOperation operation)
...
@@ -276,7 +276,7 @@ public void AddInitialSuppressOperation(SuppressOperation operation)
{
{
var
operation
=
operations
[
i
];
var
operation
=
operations
[
i
];
// if an operation contains elastic trivia itself and the operation is not marked to ignore the elastic triva
// if an operation contains elastic trivia itself and the operation is not marked to ignore the elastic triv
i
a
// ignore the operation
// ignore the operation
if
(
operation
.
ContainsElasticTrivia
(
tokenStream
)
&&
!
operation
.
Option
.
IsOn
(
SuppressOption
.
IgnoreElastic
))
if
(
operation
.
ContainsElasticTrivia
(
tokenStream
)
&&
!
operation
.
Option
.
IsOn
(
SuppressOption
.
IgnoreElastic
))
{
{
...
...
Src/Workspaces/VisualBasic/Portable/CodeCleanup/Providers/AddMissingTokensCodeCleanupProvider.vb
浏览文件 @
de4ee700
...
@@ -139,7 +139,7 @@ Namespace Microsoft.CodeAnalysis.CodeCleanup.Providers
...
@@ -139,7 +139,7 @@ Namespace Microsoft.CodeAnalysis.CodeCleanup.Providers
Public
Overrides
Function
VisitInvocationExpression
(
node
As
InvocationExpressionSyntax
)
As
SyntaxNode
Public
Overrides
Function
VisitInvocationExpression
(
node
As
InvocationExpressionSyntax
)
As
SyntaxNode
Dim
newNode
=
MyBase
.
VisitInvocationExpression
(
node
)
Dim
newNode
=
MyBase
.
VisitInvocationExpression
(
node
)
' make sure we are not under structured triva
' make sure we are not under structured triv
i
a
If
_underStructuredTrivia
Then
If
_underStructuredTrivia
Then
Return
newNode
Return
newNode
End
If
End
If
...
...
Src/Workspaces/VisualBasic/Portable/CodeGeneration/VisualBasicSyntaxGenerator.vb
浏览文件 @
de4ee700
...
@@ -1600,13 +1600,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.CodeGeneration
...
@@ -1600,13 +1600,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.CodeGeneration
Return
IsChildOf
(
node
,
SyntaxKind
.
FieldDeclaration
)
OrElse
IsChildOf
(
node
,
SyntaxKind
.
LocalDeclarationStatement
)
Return
IsChildOf
(
node
,
SyntaxKind
.
FieldDeclaration
)
OrElse
IsChildOf
(
node
,
SyntaxKind
.
LocalDeclarationStatement
)
End
Function
End
Function
Private
Function
Isolate
(
declaration
As
SyntaxNode
,
editor
As
Func
(
Of
SyntaxNode
,
SyntaxNode
),
Optional
preserveTriva
As
Boolean
=
True
)
As
SyntaxNode
Private
Function
Isolate
(
declaration
As
SyntaxNode
,
editor
As
Func
(
Of
SyntaxNode
,
SyntaxNode
),
Optional
preserveTriv
i
a
As
Boolean
=
True
)
As
SyntaxNode
Dim
isolated
=
AsIsolatedDeclaration
(
declaration
)
Dim
isolated
=
AsIsolatedDeclaration
(
declaration
)
Dim
result
As
SyntaxNode
=
Nothing
Dim
result
As
SyntaxNode
=
Nothing
If
preserveTriva
Then
If
preserveTriv
i
a
Then
result
=
P
reserveTrivia
(
isolated
,
editor
)
result
=
p
reserveTrivia
(
isolated
,
editor
)
Else
Else
result
=
editor
(
isolated
)
result
=
editor
(
isolated
)
End
If
End
If
...
...
Src/Workspaces/VisualBasic/Portable/Formatting/Engine/Trivia/TriviaDataFactory.CodeShapeAnalyzer.vb
浏览文件 @
de4ee700
...
@@ -116,7 +116,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Formatting
...
@@ -116,7 +116,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Formatting
Debug
.
Assert
(
trivia
.
ToString
()
=
trivia
.
ToFullString
())
Debug
.
Assert
(
trivia
.
ToString
()
=
trivia
.
ToFullString
())
Dim
text
=
trivia
.
ToString
()
Dim
text
=
trivia
.
ToString
()
' if text contains tab, we will give up perf optimization and use more expensive one to see whether we need to format this triva
' if text contains tab, we will give up perf optimization and use more expensive one to see whether we need to format this triv
i
a
If
text
.
IndexOf
(
vbTab
)
>=
0
Then
If
text
.
IndexOf
(
vbTab
)
>=
0
Then
Return
True
Return
True
End
If
End
If
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录