1 write to Token
Microsoft.CodeAnalysis (1)
Syntax\SyntaxTrivia.cs (1)
28Token = token;
83 references to Token
Microsoft.AspNetCore.App.Analyzers (1)
RouteEmbeddedLanguage\Infrastructure\SyntaxNodeExtensions.cs (1)
30parent = structuredTrivia.ParentTrivia.Token.Parent;
Microsoft.CodeAnalysis (19)
Syntax\SyntaxNavigator.cs (10)
319var token = GetNextToken(current, current.Token.LeadingTrivia, predicate, stepInto, ref returnNext); 326if (returnNext && (predicate == null || predicate == SyntaxToken.Any || predicate(current.Token))) 328return current.Token; 332token = GetNextToken(current, current.Token.TrailingTrivia, predicate, stepInto, ref returnNext); 340return GetNextToken(current.Token, predicate, false, stepInto); 351var token = GetPreviousToken(current, current.Token.TrailingTrivia, predicate, stepInto, ref returnPrevious); 358if (returnPrevious && Matches(predicate, current.Token)) 360return current.Token; 364token = GetPreviousToken(current, current.Token.LeadingTrivia, predicate, stepInto, ref returnPrevious); 372return GetPreviousToken(current.Token, predicate, false, stepInto);
Syntax\SyntaxNode.cs (2)
547node = ((IStructuredTriviaSyntax)node).ParentTrivia.Token.Parent; 825parent = structuredTrivia.ParentTrivia.Token.Parent;
Syntax\SyntaxNodeExtensions_Tracking.cs (2)
160node = ((IStructuredTriviaSyntax)node).ParentTrivia.Token.Parent!; 185node = ((IStructuredTriviaSyntax)node).ParentTrivia.Token.Parent!;
Syntax\SyntaxTrivia.cs (5)
142return Token.Parent?.IsPartOfStructuredTrivia() ?? false; 270return Token == other.Token && UnderlyingNode == other.UnderlyingNode && Position == other.Position && Index == other.Index; 287return Hash.Combine(Token.GetHashCode(), Hash.Combine(UnderlyingNode, Hash.Combine(Position, Index))); 402return Token.SyntaxTree;
Microsoft.CodeAnalysis.CodeStyle (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
799parent = structuredTrivia.ParentTrivia.Token.Parent;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (1)
238current = ((IStructuredTriviaSyntax)current).ParentTrivia.Token.Parent;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.StructuredTrivia.cs (1)
56var parent = _trivia.Token.Parent;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
272var tokens = node.GetAnnotatedTrivia(SyntaxAnnotation.ElasticAnnotation).Select(tr => tr.Token).Distinct();
Microsoft.CodeAnalysis.CSharp (6)
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
1420SyntaxToken associatedToken = containingTrivia.Token;
Syntax\InternalSyntax\CSharpSyntaxNode.cs (1)
274var parent = trivia.Token.Parent;
Syntax\StructuredTriviaSyntax.cs (1)
25var parent = trivia.Token.Parent;
Syntax\SyntaxNodeRemover.cs (1)
487var parentToken = trivia.Token;
Syntax\SyntaxNormalizer.cs (2)
67GetDeclarationDepth((SyntaxToken)trivia.ElementAt(0).Token), 1304return GetDeclarationDepth((SyntaxToken)trivia.Token);
Microsoft.CodeAnalysis.CSharp.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (1)
86var parentToken = parentTrivia.Token;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\DirectiveSyntaxExtensions.cs (1)
23node = node.Parent ?? node.ParentTrivia.Token.GetRequiredParent();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.DocumentationCommentExteriorCommentRewriter.cs (1)
68var currentParent = trivia.Token.Parent;
Microsoft.CodeAnalysis.CSharp.Features (4)
BraceCompletion\AbstractCurlyBraceOrBracketCompletionService.cs (1)
128closingPoint = annotatedNewline.Token.Span.End;
CodeLens\CSharpCodeLensDisplayInfoService.cs (1)
68node = structuredTriviaSyntax.ParentTrivia.Token.Parent;
Structure\Providers\DisabledTextTriviaStructureProvider.cs (2)
32var parentTriviaList = trivia.Token.LeadingTrivia; 40parentTriviaList = trivia.Token.TrailingTrivia;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
DocumentationComments\CrefTests.cs (1)
4559Assert.Equal(SyntaxKind.EndOfFileToken, crefSyntax.Ancestors().First(n => n.IsStructuredTrivia).ParentTrivia.Token.Kind());
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (5)
ParentChecker.cs (2)
28var parentToken = trivia.Token; 41var parentToken = trivia.Token;
Syntax\StructuredTriviaTests.cs (2)
168Assert.Equal(SyntaxKind.StaticKeyword, trivia.Token.Kind()); 184Assert.Equal(SyntaxKind.StaticKeyword, trivia.Token.Kind());
Syntax\SyntaxNodeTests.cs (1)
1394Assert.Equal(token, tokenStructuredParentTrivia.Token);
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (1)
86var parentToken = parentTrivia.Token;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\DirectiveSyntaxExtensions.cs (1)
23node = node.Parent ?? node.ParentTrivia.Token.GetRequiredParent();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.DocumentationCommentExteriorCommentRewriter.cs (1)
68var currentParent = trivia.Token.Parent;
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (1)
EmbeddedLanguages\VirtualChars\CSharpVirtualCharServiceTests.cs (1)
125var virtualChars = CSharpVirtualCharService.Instance.TryConvertToVirtualChars(skippedTrivia.Token);
Microsoft.CodeAnalysis.Features (2)
CodeLens\CodeLensReferencesService.cs (1)
183node = parentTrivia.Token.Parent;
DocumentationComments\AbstractDocumentationCommentSnippetService.cs (1)
225var targetMember = documentationComment.ParentTrivia.Token.GetAncestor<TMemberNode>();
Microsoft.CodeAnalysis.Test.Utilities (1)
Syntax\NodeHelpers.cs (1)
120SyntaxNode retVal = node.Token.Parent;
Microsoft.CodeAnalysis.VisualBasic (13)
Binding\BinderFactory.vb (1)
454Dim token As SyntaxToken = CType(trivia.Token, SyntaxToken)
Binding\MemberSemanticModel.vb (4)
1273Debug.Assert(trivia.Token.Kind <> SyntaxKind.None) 1274Return GetEnclosingBinderInternal(memberBinder, binderRoot, DirectCast(trivia.Token.Parent, VisualBasicSyntaxNode), position) 1985Debug.Assert(trivia.Token.Kind <> SyntaxKind.None) 1986node = DirectCast(trivia.Token.Parent, VisualBasicSyntaxNode)
Compilation\DocumentationComments\UnprocessedDocumentationCommentFinder.vb (1)
140Dim parent As VisualBasicSyntaxNode = DirectCast(trivia.Token.Parent, VisualBasicSyntaxNode)
Compilation\SyntaxTreeSemanticModel.vb (1)
592Dim token As SyntaxToken = CType(trivia.Token, SyntaxToken)
Syntax\StructuredTriviaSyntax.vb (1)
25Dim parent = DirectCast(trivia.Token.Parent, VisualBasicSyntaxNode)
Syntax\SyntaxNodePartials.vb (2)
28Dim token = CType(MyBase.ParentTrivia.Token, SyntaxToken) 53Dim token As SyntaxToken = CType(MyBase.ParentTrivia.Token, SyntaxToken)
Syntax\SyntaxNodeRemover.vb (1)
341Dim parentToken = trivia.Token
Syntax\SyntaxNormalizer.vb (1)
210Dim tokenParent = trivia.Token.Parent
Syntax\VisualBasicSyntaxTree.vb (1)
411Return InDocumentationComment(CType(trivia.Token, SyntaxToken))
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\DirectiveSyntaxExtensions.vb (1)
30node = node.ParentTrivia.Token.Parent
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Indentation\VisualBasicIndentationService.Indenter.vb (2)
85If trivia.Kind = SyntaxKind.SkippedTokensTrivia AndAlso trivia.Token.IsLastTokenOfStatement() Then 102Dim token = trivia.Token
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (4)
LineCommit\ContainingStatementInfo.vb (4)
80trivia.Token.GetAncestor(Of StatementSyntax)() IsNot Nothing Then 81Return New ContainingStatementInfo(trivia.Token.GetAncestor(Of StatementSyntax)()) 132Dim triviaStatement = trivia.Token.GetAncestor(Of StatementSyntax)() 136If triviaStatement Is Nothing OrElse snapshot.GetLineNumberFromPosition(trivia.Token.SpanStart) <> pointLineNumber Then
Microsoft.CodeAnalysis.VisualBasic.Features (3)
BraceCompletion\BracketBraceCompletionService.vb (1)
76Return skippedToken.ParentTrivia.Token.Kind = SyntaxKind.GreaterThanToken
BraceCompletion\ParenthesisBraceCompletionService.vb (1)
44Dim skippedToken = skippedTriviaNode.ParentTrivia.Token
CodeLens\VisualBasicDisplayInfoService.vb (1)
57Return GetDisplayNode(structuredTriviaSyntax.ParentTrivia.Token.Parent)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (2)
ParserTestUtilities.vb (2)
131Dim parentToken = trivia.Token 147Dim parentToken = trivia.Token
Microsoft.CodeAnalysis.VisualBasic.Workspaces (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\DirectiveSyntaxExtensions.vb (1)
30node = node.ParentTrivia.Token.Parent
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Indentation\VisualBasicIndentationService.Indenter.vb (2)
85If trivia.Kind = SyntaxKind.SkippedTokensTrivia AndAlso trivia.Token.IsLastTokenOfStatement() Then 102Dim token = trivia.Token
Microsoft.CodeAnalysis.Workspaces (5)
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
390.Select(t => Tuple.Create(t.ToString(), t.Span.Start, t.Token.Span));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (1)
799parent = structuredTrivia.ParentTrivia.Token.Parent;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (1)
238current = ((IStructuredTriviaSyntax)current).ParentTrivia.Token.Parent;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.StructuredTrivia.cs (1)
56var parent = _trivia.Token.Parent;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (1)
272var tokens = node.GetAnnotatedTrivia(SyntaxAnnotation.ElasticAnnotation).Select(tr => tr.Token).Distinct();