194 references to GetLastToken
Microsoft.CodeAnalysis.CSharp (6)
Binder\Binder_Operators.cs (1)
2422
Debug.Assert(node.Operand.SkipParens().
GetLastToken
().Kind() == SyntaxKind.ExclamationToken);
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
1048
token = containingNode.
GetLastToken
();
Symbols\Source\SourcePropertySymbol.cs (1)
494
diagnostics.Add(ErrorCode.ERR_IndexerNeedsParam, parameterSyntaxOpt.
GetLastToken
().GetLocation());
Syntax\CSharpSyntaxNode.cs (1)
176
var lastToken = this.
GetLastToken
(includeZeroWidth: true);
Syntax\LookupPosition.cs (1)
449
return localFunctionStmt.ParameterList.
GetLastToken
();
Syntax\SyntaxNormalizer.cs (1)
884
lambda.ReturnType?.
GetLastToken
() == token)
Microsoft.CodeAnalysis.CSharp.CodeStyle (40)
AnchorIndentationFormattingRule.cs (1)
44
block.
GetLastToken
(includeZeroWidth: true));
CSharpHeaderFacts.cs (2)
31
var lastToken = (node as TypeDeclarationSyntax)?.TypeParameterList?.
GetLastToken
() ?? node.Identifier;
33
lastToken = node.BaseList?.
GetLastToken
() ?? lastToken;
ElasticTriviaFormattingRule.cs (2)
80
return objectCreationNode.Type.
GetLastToken
();
85
return arrayCreationNode.Type.
GetLastToken
();
FormattingHelpers.cs (4)
163
statement.
GetLastToken
() != token)
492
return (node.GetFirstToken(includeZeroWidth: true), node.
GetLastToken
(includeZeroWidth: true));
495
var lastToken = node.
GetLastToken
(includeZeroWidth: true);
496
var lastAttributeToken = attributes.Last().
GetLastToken
(includeZeroWidth: true);
IndentBlockFormattingRule.cs (3)
115
var lastTokenOfLabel = section.Labels.Last().
GetLastToken
(includeZeroWidth: true);
125
var endToken = section.Statements.Last().
GetLastToken
(includeZeroWidth: true);
336
var lastToken = statement.
GetLastToken
(includeZeroWidth: true);
InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
180
var nextToken = expressionStatement.
GetLastToken
().GetNextToken();
QueryExpressionFormattingRule.cs (6)
47
AddSuppressWrappingIfOnSingleLineOperation(list, queryExpression.GetFirstToken(includeZeroWidth: true), queryExpression.
GetLastToken
(includeZeroWidth: true));
76
var endToken = fromClause.Expression.
GetLastToken
(includeZeroWidth: true);
100
var endToken = queryExpression.
GetLastToken
(includeZeroWidth: true);
117
AddAnchorIndentationOperation(list, firstToken, queryClause.
GetLastToken
(includeZeroWidth: true));
124
AddAnchorIndentationOperation(list, firstToken, selectOrGroupClause.
GetLastToken
(includeZeroWidth: true));
129
AddAnchorIndentationOperation(list, continuation.IntoKeyword, continuation.
GetLastToken
(includeZeroWidth: true));
StatementSyntaxExtensions.cs (1)
31
var nextToken = statement.
GetLastToken
().GetNextToken();
SuppressFormattingRule.cs (15)
39
AddSuppressWrappingIfOnSingleLineOperation(list, ifStatementNode.IfKeyword, ifStatementNode.Statement.
GetLastToken
(includeZeroWidth: true));
43
AddSuppressWrappingIfOnSingleLineOperation(list, ifStatementNode.Else.ElseKeyword, ifStatementNode.Else.Statement.
GetLastToken
(includeZeroWidth: true));
62
AddSuppressWrappingIfOnSingleLineOperation(list, openParenToken, property.
GetLastToken
());
98
AddSuppressWrappingIfOnSingleLineOperation(list, casePattern.GetFirstToken(), casePattern.
GetLastToken
());
106
AddSuppressWrappingIfOnSingleLineOperation(list, isPattern.GetFirstToken(), isPattern.
GetLastToken
());
123
AddSuppressWrappingIfOnSingleLineOperation(list, isPattern.IsKeyword, propertyPatternClause.
GetLastToken
());
143
AddSuppressWrappingIfOnSingleLineOperation(list, whileStatementNode.GetFirstToken(includeZeroWidth: true), whileStatementNode.Statement.
GetLastToken
(includeZeroWidth: true));
171
AddSuppressWrappingIfOnSingleLineOperation(list, firstToken, propertyDeclNode.AccessorList.
GetLastToken
());
179
AddSuppressWrappingIfOnSingleLineOperation(list, accessorDeclNode.Keyword, accessorDeclNode.
GetLastToken
(includeZeroWidth: true));
187
AddSuppressWrappingIfOnSingleLineOperation(list, switchSection.GetFirstToken(includeZeroWidth: true), switchSection.
GetLastToken
(includeZeroWidth: true));
197
AddSuppressWrappingIfOnSingleLineOperation(list, switchSection.Labels[i].GetFirstToken(includeZeroWidth: true), switchSection.Labels[i].
GetLastToken
(includeZeroWidth: true));
204
AddSuppressWrappingIfOnSingleLineOperation(list, switchSection.Labels[switchSection.Labels.Count - 1].GetFirstToken(includeZeroWidth: true), switchSection.
GetLastToken
(includeZeroWidth: true));
226
AddSuppressAllOperationIfOnMultipleLine(list, anchorToken, parameterNode.
GetLastToken
());
271
var lastToken = statementNode.
GetLastToken
(includeZeroWidth: true);
327
var startToken = pragmaWarningDirectiveTrivia.
GetLastToken
(includeZeroWidth: true, includeDirectives: true);
WrappingFormattingRule.cs (5)
75
return (firstToken, embeddedStatement.
GetLastToken
(includeZeroWidth: true));
85
SwitchSectionSyntax switchSection => (switchSection.GetFirstToken(includeZeroWidth: true), switchSection.
GetLastToken
(includeZeroWidth: true)),
86
AnonymousMethodExpressionSyntax anonymousMethod => (anonymousMethod.DelegateKeyword, anonymousMethod.
GetLastToken
(includeZeroWidth: true)),
108
var lastToken = statementNode.
GetLastToken
(includeZeroWidth: true);
118
var lastToken = statementNode.
GetLastToken
(includeZeroWidth: true);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (22)
ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (3)
226
(tokensForLeadingTrivia: new[] { s.Labels[0].GetFirstToken(), s.Labels[0].
GetLastToken
() },
227
tokensForTrailingTrivia: new[] { s.Statements[0].GetFirstToken(), s.Statements[0].
GetLastToken
() },
241
tokensForTrailingTrivia: new[] { nextStatement.
GetLastToken
() },
CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider.cs (1)
113
? conditional.WhenFalse.
GetLastToken
()
CSharpCodeGenerationHelpers.cs (1)
88
var lastToken = destination.
GetLastToken
();
CSharpIndentationService.cs (1)
183
var endToken = section.Statements.Last().
GetLastToken
(includeZeroWidth: true);
CSharpInlineDeclarationCodeFixProvider.cs (1)
145
if (sourceText.AreOnSameLine(statementSyntax.
GetLastToken
(), localDeclarationToken))
CSharpRemoveUnnecessaryImportsService.Rewriter.cs (2)
163
var nextToken = compilationUnit.Usings.Last().
GetLastToken
().GetNextTokenOrEndOfFile();
202
var nextToken = namespaceDeclaration.Usings.Last().
GetLastToken
().GetNextToken();
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (9)
118
statement.
GetLastToken
(includeZeroWidth: true) == token;
209
if (memberDeclaration != null && memberDeclaration.
GetLastToken
(includeZeroWidth: true) == token &&
219
if (globalStatement != null && globalStatement.
GetLastToken
(includeZeroWidth: true) == token)
228
if (memberDeclaration != null && memberDeclaration.
GetLastToken
(includeZeroWidth: true) == token &&
237
if (compUnit.Usings.Count > 0 && compUnit.Usings.Last().
GetLastToken
(includeZeroWidth: true) == token)
242
if (compUnit.Externs.Count > 0 && compUnit.Externs.Last().
GetLastToken
(includeZeroWidth: true) == token)
254
if (compUnit.AttributeLists.Count > 0 && compUnit.AttributeLists.Last().
GetLastToken
(includeZeroWidth: true) == token)
375
var lastToken = ordering.Expression.
GetLastToken
(includeSkipped: true);
416
if (targetToken == statement.
GetLastToken
(includeSkipped: true))
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (2)
1457
var lastTokenInPattern = patternSyntax.
GetLastToken
();
2950
if (block != null && token == block.
GetLastToken
(includeSkipped: true))
MultiLineConditionalExpressionFormattingRule.cs (2)
70
baseToken, conditional.QuestionToken, conditional.WhenTrue.
GetLastToken
(),
73
baseToken, conditional.ColonToken, conditional.WhenFalse.
GetLastToken
(),
Microsoft.CodeAnalysis.CSharp.EditorFeatures (3)
AutomaticCompletion\AutomaticLineEnderCommandHandler_Helpers.cs (1)
380
var nextToken = baseObjectCreationExpressionNode.
GetLastToken
(includeZeroWidth: true).GetNextToken(includeZeroWidth: true);
ConvertNamespace\ConvertNamespaceCommandHandler.cs (1)
146
if (namespaceDecl.Name.
GetLastToken
() != token)
DecompiledSource\CSharpDecompiledSourceFormattingRule.cs (1)
46
if (previousStatement.
GetLastToken
() != previousToken || nextStatement.GetFirstToken() != currentToken)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (1)
Diagnostics\GetDiagnosticsTests.cs (1)
1020
span = localDecl.
GetLastToken
().GetNextToken().Span;
Microsoft.CodeAnalysis.CSharp.Features (44)
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (1)
342
var nextToken = localDeclaration.
GetLastToken
().GetNextTokenOrEndOfFile();
Completion\CompletionProviders\CSharpSuggestionModeCompletionProvider.cs (1)
229
var lastTokenInPattern = patternSyntax.
GetLastToken
();
Completion\CompletionProviders\ExplicitInterfaceTypeCompletionProvider.cs (1)
140
return memberDeclaration?.
GetLastToken
() == tokenBeforeType &&
Completion\KeywordRecommenders\ByKeywordRecommender.cs (1)
34
var lastToken = group.GroupExpression.
GetLastToken
(includeSkipped: true);
Completion\KeywordRecommenders\ElseKeywordRecommender.cs (1)
41
if (ifStatement.Statement.
GetLastToken
(includeZeroWidth: true) == token)
Completion\KeywordRecommenders\EqualsKeywordRecommender.cs (1)
33
var lastToken = join.LeftExpression.
GetLastToken
(includeSkipped: true);
Completion\KeywordRecommenders\IntoKeywordRecommender.cs (3)
52
var lastToken = select.Expression.
GetLastToken
(includeSkipped: true);
77
var lastToken = group.ByExpression.
GetLastToken
(includeSkipped: true);
114
var lastToken = join.RightExpression.
GetLastToken
(includeSkipped: true);
Completion\KeywordRecommenders\OnKeywordRecommender.cs (1)
38
var lastToken = join.InExpression.
GetLastToken
(includeSkipped: true);
Completion\KeywordRecommenders\WhereKeywordRecommender.cs (2)
46
if (typeParameters != null && token == typeParameters.
GetLastToken
(includeSkipped: true))
86
baseList.Types.Any(t => token == t.
GetLastToken
(includeSkipped: true)))
ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (3)
226
(tokensForLeadingTrivia: new[] { s.Labels[0].GetFirstToken(), s.Labels[0].
GetLastToken
() },
227
tokensForTrailingTrivia: new[] { s.Statements[0].GetFirstToken(), s.Statements[0].
GetLastToken
() },
241
tokensForTrailingTrivia: new[] { nextStatement.
GetLastToken
() },
CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider.cs (1)
113
? conditional.WhenFalse.
GetLastToken
()
CSharpInlineDeclarationCodeFixProvider.cs (1)
145
if (sourceText.AreOnSameLine(statementSyntax.
GetLastToken
(), localDeclarationToken))
EditAndContinue\BreakpointSpans.cs (1)
556
return CreateSpan(switchStatement, (switchStatement.CloseParenToken != default) ? switchStatement.CloseParenToken : switchStatement.Expression.
GetLastToken
());
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (1)
68
var lastToken = lastStatement.
GetLastToken
(includeZeroWidth: true);
ExtractMethod\CSharpSelectionValidator.cs (5)
148
if (assign.Right.
GetLastToken
().Kind() == SyntaxKind.None)
154
.With(s => s.LastTokenInFinalSpan = assign.Right.
GetLastToken
(includeZeroWidth: true)),
386
.With(s => s.LastTokenInFinalSpan = expression.
GetLastToken
(includeZeroWidth: true));
392
.With(s => s.LastTokenInFinalSpan = statement1.
GetLastToken
(includeZeroWidth: true));
397
.With(s => s.LastTokenInFinalSpan = statement2.
GetLastToken
(includeZeroWidth: true));
GenerateType\CSharpGenerateTypeService.cs (4)
226
var token = simpleName.
GetLastToken
().GetNextToken();
246
var token = simpleName.
GetLastToken
().GetNextToken();
265
var nextToken = simpleName.
GetLastToken
().GetNextToken();
581
return (namespaceSymbol, namedTypeSymbol, enclosingNamespace.
GetLastToken
().GetLocation());
InvertIf\CSharpInvertIfCodeRefactoringProvider.cs (1)
140
var isSingleLine = sourceText.AreOnSameLine(ifNode.GetFirstToken(), ifNode.
GetLastToken
());
InvokeDelegateWithConditionalAccessAnalyzer.cs (1)
180
var nextToken = expressionStatement.
GetLastToken
().GetNextToken();
MultiLineConditionalExpressionFormattingRule.cs (2)
70
baseToken, conditional.QuestionToken, conditional.WhenTrue.
GetLastToken
(),
73
baseToken, conditional.ColonToken, conditional.WhenFalse.
GetLastToken
(),
Snippets\CSharpElseSnippetProvider.cs (1)
56
if (ifStatement.Statement.
GetLastToken
(includeZeroWidth: true) == token)
Structure\Providers\AnonymousMethodExpressionStructureProvider.cs (1)
36
? anonymousMethod.ParameterList.
GetLastToken
(includeZeroWidth: true)
Structure\Providers\ConstructorDeclarationStructureProvider.cs (1)
42
constructorDeclaration.ParameterList.
GetLastToken
(includeZeroWidth: true),
Structure\Providers\ConversionOperatorDeclarationStructureProvider.cs (1)
44
operatorDeclaration.ParameterList.
GetLastToken
(includeZeroWidth: true),
Structure\Providers\DestructorDeclarationStructureProvider.cs (1)
33
destructorDeclaration.ParameterList.
GetLastToken
(includeZeroWidth: true),
Structure\Providers\IndexerDeclarationStructureProvider.cs (1)
43
indexerDeclaration.ParameterList.
GetLastToken
(includeZeroWidth: true),
Structure\Providers\MethodDeclarationStructureProvider.cs (1)
42
methodDeclaration.ParameterList.
GetLastToken
(includeZeroWidth: true),
Structure\Providers\NamespaceDeclarationStructureProvider.cs (1)
30
namespaceDeclaration.Name.
GetLastToken
(includeZeroWidth: true),
Structure\Providers\OperatorDeclarationStructureProvider.cs (1)
42
operatorDeclaration.ParameterList.
GetLastToken
(includeZeroWidth: true),
Structure\Providers\TypeDeclarationStructureProvider.cs (1)
31
: typeDeclaration.TypeParameterList.
GetLastToken
(includeZeroWidth: true);
Wrapping\SeparatedSyntaxList\CSharpArgumentWrapper.cs (1)
91
var endToken = listSyntax.
GetLastToken
();
Wrapping\SeparatedSyntaxList\CSharpParameterWrapper.cs (1)
67
var lastToken = listSyntax.
GetLastToken
();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (11)
Parsing\ParsingErrorRecoveryTests.cs (2)
6587
Assert.Equal("foreach", srcTree.
GetLastToken
().ToString());
6590
var foreachNode = srcTree.
GetLastToken
().Parent;
Syntax\SyntaxNodeTests.cs (9)
936
var last = tree.GetCompilationUnitRoot().
GetLastToken
();
944
var last = tree.GetCompilationUnitRoot().
GetLastToken
(includeZeroWidth: true);
947
last = tree.GetCompilationUnitRoot().Members[0].
GetLastToken
(includeZeroWidth: true);
1082
var token = tree.GetCompilationUnitRoot().
GetLastToken
(); // skip EOF
1113
var token = tree.GetCompilationUnitRoot().
GetLastToken
(includeSkipped: true);
1142
var token = tree.GetCompilationUnitRoot().
GetLastToken
(includeSkipped: false);
1321
var closeBraceChild = member.
GetLastToken
();
2053
var triviaLocation = method.ReturnType.
GetLastToken
().TrailingTrivia[0].GetLocation();
2056
Assert.Equal(method.ReturnType.
GetLastToken
().TrailingTrivia[0].Span, triviaLocation.SourceSpan);
Microsoft.CodeAnalysis.CSharp.Workspaces (58)
AnchorIndentationFormattingRule.cs (1)
44
block.
GetLastToken
(includeZeroWidth: true));
CSharpCodeGenerationHelpers.cs (1)
88
var lastToken = destination.
GetLastToken
();
CSharpHeaderFacts.cs (2)
31
var lastToken = (node as TypeDeclarationSyntax)?.TypeParameterList?.
GetLastToken
() ?? node.Identifier;
33
lastToken = node.BaseList?.
GetLastToken
() ?? lastToken;
CSharpIndentationService.cs (1)
183
var endToken = section.Statements.Last().
GetLastToken
(includeZeroWidth: true);
CSharpRemoveUnnecessaryImportsService.Rewriter.cs (2)
163
var nextToken = compilationUnit.Usings.Last().
GetLastToken
().GetNextTokenOrEndOfFile();
202
var nextToken = namespaceDeclaration.Usings.Last().
GetLastToken
().GetNextToken();
ElasticTriviaFormattingRule.cs (2)
80
return objectCreationNode.Type.
GetLastToken
();
85
return arrayCreationNode.Type.
GetLastToken
();
Formatting\TypingFormattingRule.cs (1)
86
endToken = firstStatement.
GetLastToken
();
FormattingHelpers.cs (4)
163
statement.
GetLastToken
() != token)
492
return (node.GetFirstToken(includeZeroWidth: true), node.
GetLastToken
(includeZeroWidth: true));
495
var lastToken = node.
GetLastToken
(includeZeroWidth: true);
496
var lastAttributeToken = attributes.Last().
GetLastToken
(includeZeroWidth: true);
IndentBlockFormattingRule.cs (3)
115
var lastTokenOfLabel = section.Labels.Last().
GetLastToken
(includeZeroWidth: true);
125
var endToken = section.Statements.Last().
GetLastToken
(includeZeroWidth: true);
336
var lastToken = statement.
GetLastToken
(includeZeroWidth: true);
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (9)
118
statement.
GetLastToken
(includeZeroWidth: true) == token;
209
if (memberDeclaration != null && memberDeclaration.
GetLastToken
(includeZeroWidth: true) == token &&
219
if (globalStatement != null && globalStatement.
GetLastToken
(includeZeroWidth: true) == token)
228
if (memberDeclaration != null && memberDeclaration.
GetLastToken
(includeZeroWidth: true) == token &&
237
if (compUnit.Usings.Count > 0 && compUnit.Usings.Last().
GetLastToken
(includeZeroWidth: true) == token)
242
if (compUnit.Externs.Count > 0 && compUnit.Externs.Last().
GetLastToken
(includeZeroWidth: true) == token)
254
if (compUnit.AttributeLists.Count > 0 && compUnit.AttributeLists.Last().
GetLastToken
(includeZeroWidth: true) == token)
375
var lastToken = ordering.Expression.
GetLastToken
(includeSkipped: true);
416
if (targetToken == statement.
GetLastToken
(includeSkipped: true))
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (2)
1457
var lastTokenInPattern = patternSyntax.
GetLastToken
();
2950
if (block != null && token == block.
GetLastToken
(includeSkipped: true))
QueryExpressionFormattingRule.cs (6)
47
AddSuppressWrappingIfOnSingleLineOperation(list, queryExpression.GetFirstToken(includeZeroWidth: true), queryExpression.
GetLastToken
(includeZeroWidth: true));
76
var endToken = fromClause.Expression.
GetLastToken
(includeZeroWidth: true);
100
var endToken = queryExpression.
GetLastToken
(includeZeroWidth: true);
117
AddAnchorIndentationOperation(list, firstToken, queryClause.
GetLastToken
(includeZeroWidth: true));
124
AddAnchorIndentationOperation(list, firstToken, selectOrGroupClause.
GetLastToken
(includeZeroWidth: true));
129
AddAnchorIndentationOperation(list, continuation.IntoKeyword, continuation.
GetLastToken
(includeZeroWidth: true));
Simplification\CSharpSimplificationService.Expander.cs (2)
791
if (invocationExpression != null && invocationExpression.Expression.
GetLastToken
() == originalSimpleName.
GetLastToken
())
Simplification\Reducers\CSharpMiscellaneousReducer.cs (1)
156
if (!FormattingRangeHelper.AreTwoTokensOnSameLine(node.Statements[0].GetFirstToken(), node.Statements[0].
GetLastToken
()))
StatementSyntaxExtensions.cs (1)
31
var nextToken = statement.
GetLastToken
().GetNextToken();
SuppressFormattingRule.cs (15)
39
AddSuppressWrappingIfOnSingleLineOperation(list, ifStatementNode.IfKeyword, ifStatementNode.Statement.
GetLastToken
(includeZeroWidth: true));
43
AddSuppressWrappingIfOnSingleLineOperation(list, ifStatementNode.Else.ElseKeyword, ifStatementNode.Else.Statement.
GetLastToken
(includeZeroWidth: true));
62
AddSuppressWrappingIfOnSingleLineOperation(list, openParenToken, property.
GetLastToken
());
98
AddSuppressWrappingIfOnSingleLineOperation(list, casePattern.GetFirstToken(), casePattern.
GetLastToken
());
106
AddSuppressWrappingIfOnSingleLineOperation(list, isPattern.GetFirstToken(), isPattern.
GetLastToken
());
123
AddSuppressWrappingIfOnSingleLineOperation(list, isPattern.IsKeyword, propertyPatternClause.
GetLastToken
());
143
AddSuppressWrappingIfOnSingleLineOperation(list, whileStatementNode.GetFirstToken(includeZeroWidth: true), whileStatementNode.Statement.
GetLastToken
(includeZeroWidth: true));
171
AddSuppressWrappingIfOnSingleLineOperation(list, firstToken, propertyDeclNode.AccessorList.
GetLastToken
());
179
AddSuppressWrappingIfOnSingleLineOperation(list, accessorDeclNode.Keyword, accessorDeclNode.
GetLastToken
(includeZeroWidth: true));
187
AddSuppressWrappingIfOnSingleLineOperation(list, switchSection.GetFirstToken(includeZeroWidth: true), switchSection.
GetLastToken
(includeZeroWidth: true));
197
AddSuppressWrappingIfOnSingleLineOperation(list, switchSection.Labels[i].GetFirstToken(includeZeroWidth: true), switchSection.Labels[i].
GetLastToken
(includeZeroWidth: true));
204
AddSuppressWrappingIfOnSingleLineOperation(list, switchSection.Labels[switchSection.Labels.Count - 1].GetFirstToken(includeZeroWidth: true), switchSection.
GetLastToken
(includeZeroWidth: true));
226
AddSuppressAllOperationIfOnMultipleLine(list, anchorToken, parameterNode.
GetLastToken
());
271
var lastToken = statementNode.
GetLastToken
(includeZeroWidth: true);
327
var startToken = pragmaWarningDirectiveTrivia.
GetLastToken
(includeZeroWidth: true, includeDirectives: true);
WrappingFormattingRule.cs (5)
75
return (firstToken, embeddedStatement.
GetLastToken
(includeZeroWidth: true));
85
SwitchSectionSyntax switchSection => (switchSection.GetFirstToken(includeZeroWidth: true), switchSection.
GetLastToken
(includeZeroWidth: true)),
86
AnonymousMethodExpressionSyntax anonymousMethod => (anonymousMethod.DelegateKeyword, anonymousMethod.
GetLastToken
(includeZeroWidth: true)),
108
var lastToken = statementNode.
GetLastToken
(includeZeroWidth: true);
118
var lastToken = statementNode.
GetLastToken
(includeZeroWidth: true);
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Diagnostics\DiagnosticServiceTests.vb (1)
2234
span = localDecl.
GetLastToken
().GetNextToken().GetNextToken().Span
Microsoft.CodeAnalysis.UnitTests (1)
CommonSyntaxTests.cs (1)
112
var csharpToken = CSharp.SyntaxFactory.ParseExpression("1 + 123 /*hello*/").
GetLastToken
();
Microsoft.VisualStudio.LanguageServices.CSharp (7)
CodeModel\CSharpCodeModelService.cs (1)
3293
var lastToken = newMember.
GetLastToken
();
CodeModel\CSharpCodeModelService.NodeLocator.cs (5)
901
endPosition = node.AttributeLists.Last().
GetLastToken
().Span.End;
942
endPosition = node.AttributeLists.Last().
GetLastToken
().Span.End;
1238
endPosition = node.AttributeLists.Last().
GetLastToken
().Span.End;
1280
endPosition = field.AttributeLists.Last().
GetLastToken
().Span.End;
1321
endPosition = node.AttributeLists.Last().
GetLastToken
().Span.End;
CodeModel\SyntaxNodeExtensions.cs (1)
65
return attributeLists.Last().
GetLastToken
().GetNextToken();