提交 de4ee700 编写于 作者: K KirillOsenkov

Fix typo: triva -> trivia. Seems to be a common typo. (changeset 1395446)

上级 86c7f199
......@@ -150,7 +150,7 @@ public static TRoot InsertTokensAfter<TRoot>(this TRoot root, SyntaxToken tokenI
}
/// <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 trivia replaced with new trivia.
/// </summary>
/// <typeparam name="TRoot">The type of the root node.</typeparam>
/// <param name="root">The root of the tree of nodes.</param>
......
......@@ -451,7 +451,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Syntax.InternalSyntax
Private addDiagnosticsToFirstTokenOnly As Boolean
Private diagnosticsToAdd As IEnumerable(Of DiagnosticInfo)
' Add a trivia to the triva we are accumulating.
' Add a trivia to the trivia we are accumulating.
Private Sub AddTrivia(trivia As VisualBasicSyntaxNode)
FinishInProgressTokens()
triviaListBuilder.AddRange(trivia)
......@@ -484,7 +484,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Syntax.InternalSyntax
Me.diagnosticsToAdd = diagnosticsToAdd
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 trivia/tokens we're accumulating.
Public Sub AddToken(token As SyntaxToken, isFirst As Boolean, isLast As Boolean)
Dim isMissing As Boolean = token.IsMissing
......
......@@ -458,7 +458,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
''' Gets the DirectiveTriviaSyntax items for a specified SytaxNode with optional filtering.
''' </summary>
''' <param name="node">The source SyntaxNode.</param>
''' <param name="filter">The optional DirectiveTriva Syntax filter predicate.</param>
''' <param name="filter">The optional DirectiveTrivia Syntax filter predicate.</param>
''' <returns>A list of DirectiveTriviaSyntax items</returns>
<Extension>
Public Function GetDirectives(node As SyntaxNode, Optional filter As Func(Of DirectiveTriviaSyntax, Boolean) = Nothing) As IList(Of DirectiveTriviaSyntax)
......
......@@ -2118,7 +2118,7 @@ End Class]]>
<WorkItem(539940, "DevDiv")>
<Fact>
Public Sub TestFindTrivaNoTriviaExistsAtPosition()
Public Sub TestFindTriviaNoTriviaExistsAtPosition()
Dim code = <code>Class Foo
Sub Bar()
End Sub
......@@ -3643,7 +3643,7 @@ End Module
End Sub
<Fact>
Public Sub SyntaxWalkerMehthod_VerifySkippedTokenTriva()
Public Sub SyntaxWalkerMehthod_VerifySkippedTokenTrivia()
Dim Compilation = CreateCompilationWithMscorlibAndVBRuntime(
<compilation name="SyntaxWalkerTestTypes">
<file name="Test.vb">
......
......@@ -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.
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.
trivia-root - sets this at the root of all trivate. zero or structure must have this.
default-trailing-triva - can be "space", "newline"; indicates default trailing trivia
trivia-root - sets this at the root of all trivia. zero or structure must have this.
default-trailing-trivia - can be "space", "newline"; indicates default trailing trivia
to add for the simplified factory method.
no-factory - if true, no factory method is auto-generated.
Sub-Elements:
......
......@@ -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.
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.
trivia-root - sets this at the root of all trivate. zero or structure must have this.
default-trailing-triva - can be "space", "newline"; indicates default trailing trivia
trivia-root - sets this at the root of all trivia. zero or structure must have this.
default-trailing-trivia - can be "space", "newline"; indicates default trailing trivia
to add for the simplified factory method.
no-factory - if true, no factory method is auto-generated.
syntax-facts-internal - (boolean, default false) If true, the syntax facts method Is...
......
......@@ -97,7 +97,7 @@ Public Class ParseTree
RootToken = struct
End If
' Check for triva root.
' Check for trivia root.
If struct.IsTriviaRoot Then
If RootTrivia IsNot Nothing Then ReportError(struct.Element, "More than one trivia root specified.")
RootTrivia = struct
......
......@@ -276,7 +276,7 @@ public void AddInitialSuppressOperation(SuppressOperation operation)
{
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 trivia
// ignore the operation
if (operation.ContainsElasticTrivia(tokenStream) && !operation.Option.IsOn(SuppressOption.IgnoreElastic))
{
......
......@@ -139,7 +139,7 @@ Namespace Microsoft.CodeAnalysis.CodeCleanup.Providers
Public Overrides Function VisitInvocationExpression(node As InvocationExpressionSyntax) As SyntaxNode
Dim newNode = MyBase.VisitInvocationExpression(node)
' make sure we are not under structured triva
' make sure we are not under structured trivia
If _underStructuredTrivia Then
Return newNode
End If
......
......@@ -1600,13 +1600,13 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.CodeGeneration
Return IsChildOf(node, SyntaxKind.FieldDeclaration) OrElse IsChildOf(node, SyntaxKind.LocalDeclarationStatement)
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 preserveTrivia As Boolean = True) As SyntaxNode
Dim isolated = AsIsolatedDeclaration(declaration)
Dim result As SyntaxNode = Nothing
If preserveTriva Then
result = PreserveTrivia(isolated, editor)
If preserveTrivia Then
result = preserveTrivia(isolated, editor)
Else
result = editor(isolated)
End If
......
......@@ -116,7 +116,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Formatting
Debug.Assert(trivia.ToString() = trivia.ToFullString())
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 trivia
If text.IndexOf(vbTab) >= 0 Then
Return True
End If
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册