23 instantiations of SyntaxToken
Microsoft.CodeAnalysis (12)
Syntax\SeparatedSyntaxList.cs (1)
154return new SyntaxToken(node.Parent, green, node.GetChildPosition(index), _list.index + index);
Syntax\SyntaxNodeOrToken.cs (1)
162return new SyntaxToken(_nodeOrParent, _token, this.Position, _tokenIndex);
Syntax\SyntaxNodeOrTokenList.cs (1)
152return new SyntaxToken(this.Parent, green, _node.GetChildPosition(index), this.index + index);
Syntax\SyntaxToken.cs (5)
311return new SyntaxToken( 341return new SyntaxToken( 390return new SyntaxToken( 479? new SyntaxToken(null, Node.WithLeadingTrivia(GreenNode.CreateList(trivia, static t => t.RequiredUnderlyingNode)), position: 0, index: 0) 505? new SyntaxToken(null, Node.WithTrailingTrivia(GreenNode.CreateList(trivia, static t => t.RequiredUnderlyingNode)), position: 0, index: 0)
Syntax\SyntaxTokenList.cs (2)
135return new SyntaxToken(_parent, Node.GetSlot(index), Position + Node.GetSlotOffset(index), _index + index); 140return new SyntaxToken(_parent, Node, Position, _index);
Syntax\SyntaxTokenList.Enumerator.cs (1)
116return new SyntaxToken(_parent, _current, _position, _baseIndex + _index);
Syntax\SyntaxTokenList.Reversed.cs (1)
127return new SyntaxToken(_parent, _current, _position, _baseIndex + _index);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ConversionGenerator.cs (1)
78semicolonToken: hasNoBody ? SemicolonToken : new SyntaxToken());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\OperatorGenerator.cs (1)
103semicolonToken: hasNoBody ? SemicolonToken : new SyntaxToken());
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ConversionGenerator.cs (1)
78semicolonToken: hasNoBody ? SemicolonToken : new SyntaxToken());
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\OperatorGenerator.cs (1)
103semicolonToken: hasNoBody ? SemicolonToken : new SyntaxToken());
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (5)
AutomaticEndConstructCorrection\AutomaticEndConstructCorrector.vb (5)
201Return New SyntaxToken() 213Return New SyntaxToken() 236Return New SyntaxToken() 245Function(dontCare As SyntaxNode) New SyntaxToken()) 284Function(dontCare As SyntaxNode) New SyntaxToken())
Microsoft.CodeAnalysis.VisualBasic.Features (1)
Completion\CompletionProviders\OverrideCompletionProvider.vb (1)
79Dim overridesToken = New SyntaxToken()
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (1)
Syntax\SyntaxFactsTest.vb (1)
819Dim VB1 As New SyntaxToken
10566 references to SyntaxToken
Aspire.Hosting.Analyzers (5)
AppHostAnalyzer.cs (4)
67if (TryGetStringToken(invocation, modelNameParameter, out var token)) 119private static bool TryGetStringToken(IInvocationOperation invocation, IParameterSymbol modelNameParameter, out SyntaxToken token) 142private record struct ModelNameOperation(IInvocationOperation Operation, ModelType[] ModelTypes, SyntaxToken ModelNameToken) 144public static ModelNameOperation Create(IInvocationOperation operation, ModelType[] modelTypes, SyntaxToken modelNameToken)
AppHostAnalyzer.DetectInvalidModelNames.cs (1)
23var token = operation.Key.ModelNameToken;
Microsoft.Analyzers.Local (1)
InternalReferencedInPublicDocAnalyzer.cs (1)
65foreach (var modifier in node.Modifiers)
Microsoft.AspNetCore.App.Analyzers (57)
Infrastructure\RouteUsageCache.cs (3)
21private readonly ConcurrentDictionary<SyntaxToken, RouteUsageModel?> _lazyRoutePatterns; 30public RouteUsageModel? Get(SyntaxToken syntaxToken, CancellationToken cancellationToken) 40private RouteUsageModel? GetAndCache(SyntaxToken syntaxToken, CancellationToken cancellationToken)
Infrastructure\VirtualChars\AbstractVirtualCharService.cs (5)
18protected abstract VirtualCharSequence TryConvertToVirtualCharsWorker(SyntaxToken token); 19protected abstract bool IsMultiLineRawStringToken(SyntaxToken token); 45public VirtualCharSequence TryConvertToVirtualChars(SyntaxToken token) 62private void CheckInvariants(SyntaxToken token, VirtualCharSequence result) 130SyntaxToken token, string startDelimiter, string endDelimiter, bool escapeBraces)
Infrastructure\VirtualChars\CSharpVirtualCharService.cs (6)
28protected override bool IsMultiLineRawStringToken(SyntaxToken token) 41protected override VirtualCharSequence TryConvertToVirtualCharsWorker(SyntaxToken token) 129private static VirtualCharSequence TryConvertVerbatimStringToVirtualChars(SyntaxToken token, string startDelimiter, string endDelimiter, bool escapeBraces) 132private static VirtualCharSequence TryConvertSingleLineRawStringToVirtualChars(SyntaxToken token) 184SyntaxToken token, ExpressionSyntax parentExpression, bool tokenIncludeDelimiters) 245SyntaxToken token, string startDelimiter, string endDelimiter, bool escapeBraces)
Infrastructure\VirtualChars\IVirtualCharService.cs (5)
30/// char of the tokens <see cref="SyntaxToken.ValueText"/>. In other words, for each char 53/// cref="SyntaxToken.Text"/> 58/// cref="SyntaxToken.Text"/> of the token between the quotes maps to each character in the 59/// token's <see cref="SyntaxToken.ValueText"/>. 62VirtualCharSequence TryConvertToVirtualChars(SyntaxToken token);
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (11)
102SyntaxToken? parentOpt = null; 104var token = root.FindTokenOnLeftOfPosition(position); 147SyntaxToken routeStringToken; 164var previous = token.GetPreviousToken(); 288private static bool IsArgumentTypeToken(SyntaxToken token) 293private static SyntaxToken? TryGetMvcActionRouteToken(CompletionContext context, SemanticModel semanticModel, MethodDeclarationSyntax method) 356private static bool HasNonRouteAttribute(SyntaxToken token, SemanticModel semanticModel, WellKnownTypes wellKnownTypes, CancellationToken cancellationToken) 386private static bool IsCurrentParameterBindable(SyntaxToken token, SemanticModel semanticModel, WellKnownTypes wellKnownTypes, CancellationToken cancellationToken) 450private static void ProvideCompletions(EmbeddedCompletionContext context, SyntaxToken? parentOpt) 512SyntaxToken? parentOpt, int? positionOffset = null, string? insertionText = null) 541public static string EscapeText(string text, SyntaxToken token)
RouteEmbeddedLanguage\Infrastructure\RouteStringSyntaxDetector.cs (5)
19public static bool IsRouteStringSyntaxToken(SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken, out RouteOptions options) 57SyntaxToken token, 143SyntaxToken token, 236private static SyntaxToken GetIdentifierOfVariableDeclarator(SyntaxNode node) 257SyntaxNode statement, out SyntaxNode left, out SyntaxToken operatorToken, out SyntaxNode right)
RouteEmbeddedLanguage\Infrastructure\RouteUsageDetector.cs (2)
34SyntaxToken RouteToken, 57public static RouteUsageContext BuildContext(RouteOptions routeOptions, SyntaxToken token, SemanticModel semanticModel, WellKnownTypes wellKnownTypes, CancellationToken cancellationToken)
RouteEmbeddedLanguage\Infrastructure\SyntaxNodeExtensions.cs (8)
18private static readonly Func<SyntaxTriviaList, int, SyntaxToken> FindSkippedTokenBackwardFunc = FindSkippedTokenBackward; 76public static SyntaxToken FindTokenOnLeftOfPosition( 85var token = GetInitialToken(root, position, includeSkipped, includeDirectives, includeDocumentationComments); 91var skippedToken = findSkippedToken(token.LeadingTrivia, position); 100var skippedToken = findSkippedToken(token.TrailingTrivia, position); 112private static SyntaxToken GetInitialToken( 128private static SyntaxToken FindSkippedTokenBackward(SyntaxTriviaList triviaList, int position) 136foreach (var token in skippedTokensTrivia.Tokens)
RouteEmbeddedLanguage\Infrastructure\SyntaxTokenExtensions.cs (2)
11public static SyntaxNode? TryFindContainer(this SyntaxToken token) 24public static SyntaxNode GetRequiredParent(this SyntaxToken token)
RouteEmbeddedLanguage\RoutePatternAnalyzer.cs (2)
37foreach (var item in root.DescendantTokens()) 45private static void AnalyzeToken(SemanticModelAnalysisContext context, RouteUsageCache routeUsageCache, SyntaxToken token, CancellationToken cancellationToken)
RouteEmbeddedLanguage\RoutePatternBraceMatcher.cs (1)
19public AspNetCoreBraceMatchingResult? FindBraces(SemanticModel semanticModel, SyntaxToken token, int position, CancellationToken cancellationToken)
RouteEmbeddedLanguage\RoutePatternCompletionProvider.cs (4)
101var stringToken = root.FindToken(context.Position); 331public readonly SyntaxToken StringToken; 346SyntaxToken stringToken) 393public static string EscapeText(string text, SyntaxToken token)
RouteEmbeddedLanguage\RoutePatternHighlighter.cs (1)
22SemanticModel semanticModel, SyntaxToken token, int position, CancellationToken cancellationToken)
RouteHandlers\RouteHandlerAnalyzer.cs (2)
92if (!TryGetStringToken(invocation, out var token)) 173private static bool TryGetStringToken(IInvocationOperation invocation, out SyntaxToken token)
Microsoft.AspNetCore.App.Analyzers.Test (9)
Infrastructure\AmbiguousRoutePatternComparerTests.cs (3)
77private static SyntaxToken GetStringToken(string text) 82var token = parsedStatement.DescendantTokens().ToArray()[3]; 89var token = GetStringToken(text);
RouteEmbeddedLanguage\RoutePatternParserTests.cs (4)
32private static SyntaxToken GetStringToken(string text) 36var token = parsedStatement.DescendantTokens().ToArray()[3]; 119private (SyntaxToken, RoutePatternTree, VirtualCharSequence) JustParseTree( 122var token = GetStringToken(stringText);
TestDiagnosticAnalyzer.cs (2)
68private async Task<(SyntaxToken token, SemanticModel model)> TryGetStringSyntaxTokenAtPositionAsync(int caretPosition, params string[] sources) 85var stringToken = root.FindToken(caretPosition);
Microsoft.AspNetCore.App.CodeFixes (3)
Dependencies\ExtensionMethodsCompletionProvider.cs (2)
41var token = root.FindToken(span.Start); 104SyntaxToken token)
RouteParameterUnusedParameterFixer.cs (1)
62var token = param.GetFirstToken();
Microsoft.AspNetCore.Components.Analyzers (2)
ComponentParametersShouldBePublicCodeFixProvider.cs (2)
71var modifier = node.Modifiers[i]; 83var publicModifier = SyntaxFactory.Token(SyntaxKind.PublicKeyword);
Microsoft.AspNetCore.Components.SdkAnalyzers (2)
ComponentParametersShouldBePublicCodeFixProvider.cs (2)
71var modifier = node.Modifiers[i]; 83var publicModifier = SyntaxFactory.Token(SyntaxKind.PublicKeyword);
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
StaticRouteHandlerModel\Endpoint.cs (1)
176var identifier = name.Identifier;
Microsoft.AspNetCore.SignalR.Client.SourceGenerator (2)
HubClientProxyGenerator.Parser.cs (1)
122foreach (var modifier in syntax.Modifiers)
HubServerProxyGenerator.Parser.cs (1)
112foreach (var modifier in syntax.Modifiers)
Microsoft.CodeAnalysis (289)
Binding\BindingDiagnosticBag.cs (2)
214internal bool Add(SyntaxToken token, CompoundUseSiteInfo<TAssemblySymbol> useSiteInfo) 279internal bool Add(UseSiteInfo<TAssemblySymbol> useSiteInfo, SyntaxToken token)
Diagnostic\SourceLocation.cs (1)
31public SourceLocation(in SyntaxToken token)
DiagnosticAnalyzer\AnalysisContextInfo.cs (1)
127foreach (var token in node.DescendantTokens(descendIntoTrivia: false))
Syntax\GreenNode.cs (1)
892public abstract SyntaxToken CreateSeparator(SyntaxNode element);
Syntax\ICompilationUnitSyntax.cs (3)
17/// that is not owned by any other <see cref="SyntaxToken"/>. 22/// Represents the end of the source file. This <see cref="SyntaxToken"/> may have 25SyntaxToken EndOfFileToken { get; }
Syntax\InternalSyntax\SyntaxList.cs (1)
165public sealed override SyntaxToken CreateSeparator(SyntaxNode element)
Syntax\SeparatedSyntaxList.cs (6)
31var separator = nodes[0].Green.CreateSeparator(nodes[0]); 143public SyntaxToken GetSeparator(int index) 164public IEnumerable<SyntaxToken> GetSeparators() 449private static bool KeepSeparatorWithPreviousNode(in SyntaxToken separator) 569public SeparatedSyntaxList<TNode> ReplaceSeparator(SyntaxToken separatorToken, SyntaxToken newSeparator)
Syntax\SeparatedSyntaxListBuilder.cs (1)
76public SeparatedSyntaxListBuilder<TNode> AddSeparator(in SyntaxToken separatorToken)
Syntax\SyntaxList.cs (8)
29protected internal override SyntaxNode ReplaceCore<TNode>(IEnumerable<TNode>? nodes = null, Func<TNode, TNode, SyntaxNode>? computeReplacementNode = null, IEnumerable<SyntaxToken>? tokens = null, Func<SyntaxToken, SyntaxToken, SyntaxToken>? computeReplacementToken = null, IEnumerable<SyntaxTrivia>? trivia = null, Func<SyntaxTrivia, SyntaxTrivia, SyntaxTrivia>? computeReplacementTrivia = null) 44protected internal override SyntaxNode ReplaceTokenInListCore(SyntaxToken originalToken, IEnumerable<SyntaxToken> newTokens) 49protected internal override SyntaxNode InsertTokensInListCore(SyntaxToken originalToken, IEnumerable<SyntaxToken> newTokens, bool insertBefore)
Syntax\SyntaxNavigator.cs (75)
52private static Func<SyntaxToken, bool> GetPredicateFunction(bool includeZeroWidth) 54return includeZeroWidth ? SyntaxToken.Any : SyntaxToken.NonZeroWidth; 57private static bool Matches(Func<SyntaxToken, bool>? predicate, SyntaxToken token) 59return predicate == null || ReferenceEquals(predicate, SyntaxToken.Any) || predicate(token); 62internal SyntaxToken GetFirstToken(in SyntaxNode current, bool includeZeroWidth, bool includeSkipped, bool includeDirectives, bool includeDocumentationComments) 67internal SyntaxToken GetLastToken(in SyntaxNode current, bool includeZeroWidth, bool includeSkipped, bool includeDirectives, bool includeDocumentationComments) 72internal SyntaxToken GetPreviousToken(in SyntaxToken current, bool includeZeroWidth, bool includeSkipped, bool includeDirectives, bool includeDocumentationComments) 77internal SyntaxToken GetNextToken(in SyntaxToken current, bool includeZeroWidth, bool includeSkipped, bool includeDirectives, bool includeDocumentationComments) 82internal SyntaxToken GetPreviousToken(in SyntaxToken current, Func<SyntaxToken, bool> predicate, Func<SyntaxTrivia, bool>? stepInto) 87internal SyntaxToken GetNextToken(in SyntaxToken current, Func<SyntaxToken, bool> predicate, Func<SyntaxTrivia, bool>? stepInto) 95internal SyntaxToken GetFirstToken(SyntaxNode current, Func<SyntaxToken, bool>? predicate, Func<SyntaxTrivia, bool>? stepInto) 111var token = GetFirstToken(child.AsToken(), predicate, stepInto); 141internal SyntaxToken GetLastToken(SyntaxNode current, Func<SyntaxToken, bool> predicate, Func<SyntaxTrivia, bool>? stepInto) 158var token = GetLastToken(child.AsToken(), predicate, stepInto); 185private SyntaxToken GetFirstToken( 187Func<SyntaxToken, bool>? predicate, 195var token = GetFirstToken(structure, predicate, stepInto); 206private SyntaxToken GetLastToken( 208Func<SyntaxToken, bool> predicate, 215SyntaxToken token; 227Func<SyntaxToken, bool> predicate, 229out SyntaxToken token) 243private SyntaxToken GetFirstToken( 244SyntaxToken token, 245Func<SyntaxToken, bool>? predicate, 252var firstToken = GetFirstToken(token.LeadingTrivia, predicate, stepInto); 267var firstToken = GetFirstToken(token.TrailingTrivia, predicate, stepInto); 277private SyntaxToken GetLastToken( 278SyntaxToken token, 279Func<SyntaxToken, bool> predicate, 286var lastToken = GetLastToken(token.TrailingTrivia, predicate, stepInto); 301var lastToken = GetLastToken(token.LeadingTrivia, predicate, stepInto); 311internal SyntaxToken GetNextToken( 313Func<SyntaxToken, bool>? predicate, 319var token = GetNextToken(current, current.Token.LeadingTrivia, predicate, stepInto, ref returnNext); 326if (returnNext && (predicate == null || predicate == SyntaxToken.Any || predicate(current.Token))) 343internal SyntaxToken GetPreviousToken( 345Func<SyntaxToken, bool> predicate, 351var token = GetPreviousToken(current, current.Token.TrailingTrivia, predicate, stepInto, ref returnPrevious); 375private SyntaxToken GetNextToken( 378Func<SyntaxToken, bool>? predicate, 388var token = GetFirstToken(structure!, predicate, stepInto); 404private SyntaxToken GetPreviousToken( 407Func<SyntaxToken, bool> predicate, 415SyntaxToken token; 430internal SyntaxToken GetNextToken( 432Func<SyntaxToken, bool>? predicate, 446var token = GetFirstToken(child.AsToken(), predicate, stepInto); 455var token = GetFirstToken(child.AsNode()!, predicate, stepInto); 480internal SyntaxToken GetPreviousToken( 482Func<SyntaxToken, bool> predicate, 496var token = GetLastToken(child.AsToken(), predicate, stepInto); 505var token = GetLastToken(child.AsNode()!, predicate, stepInto); 530internal SyntaxToken GetNextToken(in SyntaxToken current, Func<SyntaxToken, bool>? predicate, bool searchInsideCurrentTokenTrailingTrivia, Func<SyntaxTrivia, bool>? stepInto) 538var firstToken = GetFirstToken(current.TrailingTrivia, predicate, stepInto!); 554var token = GetFirstToken(child.AsToken(), predicate, stepInto); 563var token = GetFirstToken(child.AsNode()!, predicate, stepInto); 583internal SyntaxToken GetPreviousToken(in SyntaxToken current, Func<SyntaxToken, bool> predicate, bool searchInsideCurrentTokenLeadingTrivia, 592var lastToken = GetLastToken(current.LeadingTrivia, predicate, stepInto!); 608var token = GetLastToken(child.AsToken(), predicate, stepInto); 617var token = GetLastToken(child.AsNode()!, predicate, stepInto);
Syntax\SyntaxNode.cs (26)
1004public SyntaxToken FindToken(int position, bool findInsideTrivia = false) 1013public SyntaxToken GetFirstToken(bool includeZeroWidth = false, bool includeSkipped = false, bool includeDirectives = false, bool includeDocumentationComments = false) 1022public SyntaxToken GetLastToken(bool includeZeroWidth = false, bool includeSkipped = false, bool includeDirectives = false, bool includeDocumentationComments = false) 1030public IEnumerable<SyntaxToken> ChildTokens() 1044public IEnumerable<SyntaxToken> DescendantTokens(Func<SyntaxNode, bool>? descendIntoChildren = null, bool descendIntoTrivia = false) 1052public IEnumerable<SyntaxToken> DescendantTokens(TextSpan span, Func<SyntaxNode, bool>? descendIntoChildren = null, bool descendIntoTrivia = false) 1127var token = element.AsToken(); 1299public IEnumerable<SyntaxToken> GetAnnotatedTokens(SyntaxAnnotation syntaxAnnotation) 1307public IEnumerable<SyntaxToken> GetAnnotatedTokens(string annotationKind) 1439protected virtual SyntaxToken FindTokenCore(int position, bool findInsideTrivia) 1446SyntaxToken EoF; 1460private bool TryGetEofAt(int position, out SyntaxToken Eof) 1473Eof = default(SyntaxToken); 1477internal SyntaxToken FindTokenInternal(int position) 1502private SyntaxToken FindToken(int position, Func<SyntaxTrivia, bool> findInsideTrivia) 1515protected virtual SyntaxToken FindTokenCore(int position, Func<SyntaxTrivia, bool> stepInto) 1517var token = this.FindToken(position, findInsideTrivia: false); 1531internal static SyntaxTrivia GetTriviaFromSyntaxToken(int position, in SyntaxToken token) 1581IEnumerable<SyntaxToken>? tokens = null, 1582Func<SyntaxToken, SyntaxToken, SyntaxToken>? computeReplacementToken = null, 1589protected internal abstract SyntaxNode ReplaceTokenInListCore(SyntaxToken originalToken, IEnumerable<SyntaxToken> newTokens); 1590protected internal abstract SyntaxNode InsertTokensInListCore(SyntaxToken originalToken, IEnumerable<SyntaxToken> newTokens, bool insertBefore);
Syntax\SyntaxNode.Iterators.cs (9)
149public void PushLeadingTrivia(in SyntaxToken token) 155public void PushTrailingTrivia(in SyntaxToken token) 256public void PushLeadingTrivia(in SyntaxToken token) 263public void PushTrailingTrivia(in SyntaxToken token) 359public void PushLeadingTrivia(in SyntaxToken token) 366public void PushTrailingTrivia(in SyntaxToken token) 471var token = value.AsToken(); 547var token = value.AsToken(); 588var token = value.AsToken();
Syntax\SyntaxNodeExtensions.cs (26)
34IEnumerable<SyntaxToken>? tokens, 35Func<SyntaxToken, SyntaxToken, SyntaxToken>? computeReplacementToken, 127public static TRoot ReplaceToken<TRoot>(this TRoot root, SyntaxToken tokenInList, IEnumerable<SyntaxToken> newTokens) 140public static TRoot InsertTokensBefore<TRoot>(this TRoot root, SyntaxToken tokenInList, IEnumerable<SyntaxToken> newTokens) 153public static TRoot InsertTokensAfter<TRoot>(this TRoot root, SyntaxToken tokenInList, IEnumerable<SyntaxToken> newTokens) 207public static TRoot ReplaceTokens<TRoot>(this TRoot root, IEnumerable<SyntaxToken> tokens, Func<SyntaxToken, SyntaxToken, SyntaxToken> computeReplacementToken) 221public static TRoot ReplaceToken<TRoot>(this TRoot root, SyntaxToken oldToken, SyntaxToken newToken) 340public static SyntaxToken WithoutTrivia(this SyntaxToken token) 351var first = node.GetFirstToken(includeZeroWidth: true); 352var newFirst = first.WithLeadingTrivia(trivia); 363var first = node.GetFirstToken(includeZeroWidth: true); 364var newFirst = first.WithLeadingTrivia(trivia); 395var last = node.GetLastToken(includeZeroWidth: true); 396var newLast = last.WithTrailingTrivia(trivia); 407var last = node.GetLastToken(includeZeroWidth: true); 408var newLast = last.WithTrailingTrivia(trivia);
Syntax\SyntaxNodeOrToken.cs (8)
17/// cref="SyntaxToken"/>). 158public SyntaxToken AsToken() 165return default(SyntaxToken); 168internal bool AsToken(out SyntaxToken token) 761/// See <see cref="SyntaxNode.IsIncrementallyIdenticalTo"/> and <see cref="SyntaxToken.IsIncrementallyIdenticalTo"/>. 773public static implicit operator SyntaxNodeOrToken(SyntaxToken token) 787public static explicit operator SyntaxToken(SyntaxNodeOrToken nodeOrToken) 830if (AsToken(out var token))
Syntax\SyntaxNodeOrTokenListBuilder.cs (1)
75public void Add(in SyntaxToken item)
Syntax\SyntaxToken.cs (49)
21public readonly struct SyntaxToken : IEquatable<SyntaxToken> 25internal static readonly Func<SyntaxToken, bool> NonZeroWidth = t => t.Width > 0; 26internal static readonly Func<SyntaxToken, bool> Any = t => true; 293public SyntaxToken WithAdditionalAnnotations(params SyntaxAnnotation[] annotations) 302public SyntaxToken WithAdditionalAnnotations(IEnumerable<SyntaxAnnotation> annotations) 318return default(SyntaxToken); 324public SyntaxToken WithoutAnnotations(params SyntaxAnnotation[] annotations) 332public SyntaxToken WithoutAnnotations(IEnumerable<SyntaxAnnotation> annotations) 348return default(SyntaxToken); 354public SyntaxToken WithoutAnnotations(string annotationKind) 375public SyntaxToken CopyAnnotationsTo(SyntaxToken token) 379return default(SyntaxToken); 452public SyntaxToken WithTriviaFrom(SyntaxToken token) 460public SyntaxToken WithLeadingTrivia(SyntaxTriviaList trivia) 468public SyntaxToken WithLeadingTrivia(params SyntaxTrivia[]? trivia) 476public SyntaxToken WithLeadingTrivia(IEnumerable<SyntaxTrivia>? trivia) 480: default(SyntaxToken); 486public SyntaxToken WithTrailingTrivia(SyntaxTriviaList trivia) 494public SyntaxToken WithTrailingTrivia(params SyntaxTrivia[]? trivia) 502public SyntaxToken WithTrailingTrivia(IEnumerable<SyntaxTrivia>? trivia) 506: default(SyntaxToken); 533/// Determines whether two <see cref="SyntaxToken"/>s are equal. 535public static bool operator ==(SyntaxToken left, SyntaxToken right) 541/// Determines whether two <see cref="SyntaxToken"/>s are unequal. 543public static bool operator !=(SyntaxToken left, SyntaxToken right) 549/// Determines whether the supplied <see cref="SyntaxToken"/> is equal to this 550/// <see cref="SyntaxToken"/>. 552public bool Equals(SyntaxToken other) 561/// Determines whether the supplied <see cref="SyntaxToken"/> is equal to this 562/// <see cref="SyntaxToken"/>. 566return obj is SyntaxToken && Equals((SyntaxToken)obj); 570/// Serves as hash function for <see cref="SyntaxToken"/>. 581public SyntaxToken GetNextToken(bool includeZeroWidth = false, bool includeSkipped = false, bool includeDirectives = false, bool includeDocumentationComments = false) 585return default(SyntaxToken); 598internal SyntaxToken GetNextToken(Func<SyntaxToken, bool> predicate, Func<SyntaxTrivia, bool>? stepInto = null) 602return default(SyntaxToken); 612public SyntaxToken GetPreviousToken(bool includeZeroWidth = false, bool includeSkipped = false, bool includeDirectives = false, bool includeDocumentationComments = false) 616return default(SyntaxToken); 629internal SyntaxToken GetPreviousToken(Func<SyntaxToken, bool> predicate, Func<SyntaxTrivia, bool>? stepInto = null) 680public bool IsEquivalentTo(SyntaxToken token) 691/// new tree. In this case, the <see cref="SyntaxToken.ToFullString()"/> of each token will be the same, though 701public bool IsIncrementallyIdenticalTo(SyntaxToken token)
Syntax\SyntaxTokenList.cs (31)
19/// Represents a read-only list of <see cref="SyntaxToken"/>. 23public readonly partial struct SyntaxTokenList : IEquatable<SyntaxTokenList>, IReadOnlyList<SyntaxToken> 39public SyntaxTokenList(SyntaxToken token) 51public SyntaxTokenList(params SyntaxToken[] tokens) 59public SyntaxTokenList(IEnumerable<SyntaxToken> tokens) 64public static SyntaxTokenList Create(ReadOnlySpan<SyntaxToken> tokens) 72private static GreenNode? CreateNodeFromSpan(ReadOnlySpan<SyntaxToken> tokens) 92private static GreenNode? CreateNode(IEnumerable<SyntaxToken> tokens) 100foreach (var token in tokens) 125public SyntaxToken this[int index] 212public SyntaxToken First() 227public SyntaxToken Last() 283public int IndexOf(SyntaxToken tokenInList) 287var token = this[i]; 314public SyntaxTokenList Add(SyntaxToken token) 323public SyntaxTokenList AddRange(IEnumerable<SyntaxToken> tokens) 333public SyntaxTokenList Insert(int index, SyntaxToken token) 335if (token == default(SyntaxToken)) 348public SyntaxTokenList InsertRange(int index, IEnumerable<SyntaxToken> tokens) 397public SyntaxTokenList Remove(SyntaxToken tokenInList) 413public SyntaxTokenList Replace(SyntaxToken tokenInList, SyntaxToken newToken) 415if (newToken == default(SyntaxToken)) 428public SyntaxTokenList ReplaceRange(SyntaxToken tokenInList, IEnumerable<SyntaxToken> newTokens) 443private SyntaxToken[] Nodes => this.ToArray(); 453IEnumerator<SyntaxToken> IEnumerable<SyntaxToken>.GetEnumerator() 457return SpecializedCollections.EmptyEnumerator<SyntaxToken>(); 467return SpecializedCollections.EmptyEnumerator<SyntaxToken>(); 522public static SyntaxTokenList Create(SyntaxToken token)
Syntax\SyntaxTokenList.Enumerator.cs (4)
15/// Represents a read-only list of <see cref="SyntaxToken"/>s. 104public SyntaxToken Current 131private class EnumeratorImpl : IEnumerator<SyntaxToken> 141public SyntaxToken Current => _enumerator.Current;
Syntax\SyntaxTokenList.Reversed.cs (9)
20public readonly struct Reversed : IEnumerable<SyntaxToken>, IEquatable<Reversed> 34IEnumerator<SyntaxToken> IEnumerable<SyntaxToken>.GetEnumerator() 38return SpecializedCollections.EmptyEnumerator<SyntaxToken>(); 48return SpecializedCollections.EmptyEnumerator<SyntaxToken>(); 95var last = list.Last(); 118public SyntaxToken Current 142private class EnumeratorImpl : IEnumerator<SyntaxToken> 152public SyntaxToken Current => _enumerator.Current;
Syntax\SyntaxTokenListBuilder.cs (3)
34public void Add(SyntaxToken item) 58public void Add(SyntaxToken[] list) 63public void Add(SyntaxToken[] list, int offset, int length)
Syntax\SyntaxTree.cs (1)
192public abstract IEnumerable<Diagnostic> GetDiagnostics(SyntaxToken token);
Syntax\SyntaxTrivia.cs (5)
26internal SyntaxTrivia(in SyntaxToken token, GreenNode? triviaNode, int position, int index) 54public SyntaxToken Token { get; } 312token: default(SyntaxToken), 341token: default(SyntaxToken), 389token: default(SyntaxToken),
Syntax\SyntaxTriviaList.cs (6)
28internal SyntaxTriviaList(in SyntaxToken token, GreenNode? node, int position, int index = 0) 36internal SyntaxTriviaList(in SyntaxToken token, GreenNode? node) 46Token = default(SyntaxToken); 98internal SyntaxToken Token { get; } 372return new SyntaxTriviaList(default(SyntaxToken), GreenNode.CreateList(list, static n => n.RequiredUnderlyingNode), 0, 0); 418return new SyntaxTriviaList(default(SyntaxToken), GreenNode.CreateList(list, static n => n.RequiredUnderlyingNode), 0, 0);
Syntax\SyntaxTriviaList.Enumerator.cs (4)
18private SyntaxToken _token; 40private void InitializeFrom(in SyntaxToken token, GreenNode greenNode, int index, int position) 55internal void InitializeFromLeadingTrivia(in SyntaxToken token) 66internal void InitializeFromTrailingTrivia(in SyntaxToken token)
Syntax\SyntaxTriviaList.Reversed.cs (1)
72private readonly SyntaxToken _token;
Syntax\SyntaxTriviaListBuilder.cs (4)
140return new SyntaxTriviaList(default(SyntaxToken), _nodes[0].UnderlyingNode, position: 0, index: 0); 142return new SyntaxTriviaList(default(SyntaxToken), 147return new SyntaxTriviaList(default(SyntaxToken), 161return new SyntaxTriviaList(default(SyntaxToken),
Syntax\SyntaxWalker.cs (3)
61protected virtual void VisitToken(SyntaxToken token) 70private void VisitLeadingTrivia(in SyntaxToken token) 81private void VisitTrailingTrivia(in SyntaxToken token)
Microsoft.CodeAnalysis.CodeStyle (532)
src\Analyzers\Core\Analyzers\AddAccessibilityModifiers\AbstractAddAccessibilityModifiers.cs (2)
17out SyntaxToken name, 30out SyntaxToken name,
src\Analyzers\Core\Analyzers\AddAccessibilityModifiers\IAddAccessibilityModifiersService.cs (1)
21out SyntaxToken name,
src\Analyzers\Core\Analyzers\AddRequiredParentheses\AbstractAddRequiredParenthesesDiagnosticAnalyzer.cs (1)
67protected abstract (TExpressionSyntax, SyntaxToken, TExpressionSyntax) GetPartsOfBinaryLike(TBinaryLikeExpressionSyntax binaryLike);
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderHelper.cs (1)
43var firstToken = root.GetFirstToken(includeZeroWidth: true);
src\Analyzers\Core\Analyzers\NewLines\ConsecutiveStatementPlacement\AbstractConsecutiveStatementPlacementDiagnosticAnalyzer.cs (2)
71var endToken = block.GetLastToken(); 84var nextToken = endToken.GetNextToken();
src\Analyzers\Core\Analyzers\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesDiagnosticAnalyzer.cs (2)
69private void CheckToken(SyntaxTreeAnalysisContext context, NotificationOption2 notificationOption, SyntaxToken token) 86private bool ContainsMultipleBlankLines(SyntaxToken token, out SyntaxTrivia firstBadTrivia)
src\Analyzers\Core\Analyzers\OrderModifiers\OrderModifiersHelpers.cs (1)
28foreach (var modifier in modifiers)
src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (1)
83SyntaxToken operatorToken)
src\Analyzers\Core\Analyzers\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer.cs (2)
74protected abstract SyntaxToken? TryGetLastToken(SyntaxNode node); 157var lastToken = TryGetLastToken(previous.Value.node) ?? previous.Value.node.GetLastToken();
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
675var firstToken = memberDeclaration.GetFirstToken();
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (1)
183private static TextSpan GetSpanWithinLiteralQuotes(IVirtualCharService virtualCharService, SyntaxToken formatToken)
src\Analyzers\Core\Analyzers\UseAutoProperty\AbstractUseAutoPropertyAnalyzer.cs (1)
239var identifier = syntaxFacts.GetIdentifierOfIdentifierName(identifierName);
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractObjectCreationExpressionAnalyzer.cs (1)
137var valuePattern = syntaxFacts.GetIdentifierOfVariableDeclarator(variableDeclarator);
src\Analyzers\Core\Analyzers\UseCollectionInitializer\IUpdateExpressionSyntaxHelper.cs (2)
15void GetPartsOfForeachStatement(TStatementSyntax statement, out SyntaxToken awaitKeyword, out SyntaxToken identifier, out TExpressionSyntax expression, out IEnumerable<TStatementSyntax> statements);
src\Analyzers\Core\Analyzers\UseCollectionInitializer\UpdateExpressionState.cs (2)
375syntaxHelper.GetPartsOfForeachStatement(foreachStatement, out var awaitKeyword, out var identifier, out _, out var foreachStatements);
src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (1)
88out var assignmentLeft, out var assignmentToken, out var assignmentRight);
src\Analyzers\Core\Analyzers\UseObjectInitializer\UseNamedMemberInitializerAnalyzer.cs (1)
163var identifier = this.SyntaxFacts.GetIdentifierOfSimpleName(name);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\AbstractVirtualCharService.cs (5)
21protected abstract VirtualCharSequence TryConvertToVirtualCharsWorker(SyntaxToken token); 22protected abstract bool IsMultiLineRawStringToken(SyntaxToken token); 48public VirtualCharSequence TryConvertToVirtualChars(SyntaxToken token) 65private void CheckInvariants(SyntaxToken token, VirtualCharSequence result) 134SyntaxToken token, string startDelimiter, string endDelimiter, bool escapeBraces)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\IVirtualCharService.cs (5)
30/// char of the tokens <see cref="SyntaxToken.ValueText"/>. In other words, for each char 53/// cref="SyntaxToken.Text"/> 58/// cref="SyntaxToken.Text"/> of the token between the quotes maps to each character in the 59/// token's <see cref="SyntaxToken.ValueText"/>. 62VirtualCharSequence TryConvertToVirtualChars(SyntaxToken token);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\LocationExtensions.cs (1)
19public static SyntaxToken FindToken(this Location location, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
32public static SymbolInfo GetSymbolInfo(this SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SourceTextExtensions_SharedWithCodeStyle.cs (2)
83public static bool AreOnSameLine(this SourceText text, SyntaxToken token1, SyntaxToken token2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (32)
363IEnumerable<SyntaxToken> tokens, 364Func<SyntaxToken, SyntaxToken, CancellationToken, Task<SyntaxToken>> computeReplacementAsync, 391IEnumerable<SyntaxToken>? tokens, 392Func<SyntaxToken, SyntaxToken, CancellationToken, Task<SyntaxToken>>? computeReplacementTokenAsync, 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 447var original = (SyntaxToken?)retryAnnotations.GetAnnotations(currentToken).SingleOrDefault() ?? currentToken; 485if (rewritten != original || !tokenReplacements.TryGetValue(original, out var replaced)) 540private static readonly Func<SyntaxTriviaList, int, SyntaxToken> s_findSkippedTokenForward = FindSkippedTokenForward; 545private static SyntaxToken FindSkippedTokenForward(SyntaxTriviaList triviaList, int position) 553foreach (var token in skippedTokensTrivia.Tokens) 570private static readonly Func<SyntaxTriviaList, int, SyntaxToken> s_findSkippedTokenBackward = FindSkippedTokenBackward; 575private static SyntaxToken FindSkippedTokenBackward(SyntaxTriviaList triviaList, int position) 583foreach (var token in skippedTokensTrivia.Tokens) 597private static SyntaxToken GetInitialToken( 613public static SyntaxToken FindTokenOnRightOfPosition( 622var token = GetInitialToken(root, position, includeSkipped, includeDirectives, includeDocumentationComments); 626var skippedToken = findSkippedToken(token.LeadingTrivia, position); 633var skippedToken = findSkippedToken(token.TrailingTrivia, position); 652public static SyntaxToken FindTokenOnLeftOfPosition( 661var token = GetInitialToken(root, position, includeSkipped, includeDirectives, includeDocumentationComments); 667var skippedToken = findSkippedToken(token.LeadingTrivia, position); 676var skippedToken = findSkippedToken(token.TrailingTrivia, position); 767public static SyntaxToken WithoutLeadingTrivia(this SyntaxToken token) 775public static SyntaxToken WithoutTrailingTrivia(this SyntaxToken token) 867foreach (var token in root.DescendantTokens(descendIntoChildren: static node => node.ContainsDirectives))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (32)
15public static SyntaxNode? GetAncestor(this SyntaxToken token, Func<SyntaxNode, bool>? predicate) 18public static T? GetAncestor<T>(this SyntaxToken token, Func<T, bool>? predicate = null) where T : SyntaxNode 21public static T GetRequiredAncestor<T>(this SyntaxToken token, Func<T, bool>? predicate = null) where T : SyntaxNode 24public static IEnumerable<T> GetAncestors<T>(this SyntaxToken token) 32public static IEnumerable<SyntaxNode> GetAncestors(this SyntaxToken token, Func<SyntaxNode, bool> predicate) 39public static SyntaxNode? GetCommonRoot(this SyntaxToken token1, SyntaxToken token2) 53public static bool CheckParent<T>(this SyntaxToken token, Func<T, bool> valueChecker) where T : SyntaxNode 63public static int Width(this SyntaxToken token) 66public static int FullWidth(this SyntaxToken token) 69public static SyntaxToken FindTokenFromEnd(this SyntaxNode root, int position, bool includeZeroWidth = true, bool findInsideTrivia = false) 71var token = root.FindToken(position, findInsideTrivia); 72var previousToken = token.GetPreviousToken( 85public static SyntaxToken GetNextTokenOrEndOfFile( 86this SyntaxToken token, 92var nextToken = token.GetNextToken(includeZeroWidth, includeSkipped, includeDirectives, includeDocumentationComments); 99public static SyntaxToken WithoutTrivia( 100this SyntaxToken token) 110public static SyntaxToken With(this SyntaxToken token, SyntaxTriviaList leading, SyntaxTriviaList trailing) 113public static SyntaxToken WithPrependedLeadingTrivia( 114this SyntaxToken token, 125public static SyntaxToken WithPrependedLeadingTrivia( 126this SyntaxToken token, 137public static SyntaxToken WithPrependedLeadingTrivia( 138this SyntaxToken token, 147public static SyntaxToken WithAppendedTrailingTrivia( 148this SyntaxToken token, 154public static SyntaxToken WithAppendedTrailingTrivia( 155this SyntaxToken token, 161public static SyntaxTrivia[] GetTrivia(this IEnumerable<SyntaxToken> tokens) 164public static SyntaxNode GetRequiredParent(this SyntaxToken token)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (13)
43public static Task<SyntaxToken> GetTouchingWordAsync( 53public static Task<SyntaxToken> GetTouchingTokenAsync( 62public static async Task<SyntaxToken> GetTouchingTokenAsync( 65Predicate<SyntaxToken> predicate, 77var token = root.FindToken(position, findInsideTrivia); 123var firstToken = root.GetFirstToken(includeZeroWidth: true, includeSkipped: true); 128public static SyntaxToken FindTokenOrEndToken( 134var result = root.FindToken(position, findInsideTrivia: true); 151var token = trivia.GetStructure()!.GetLastToken(includeZeroWidth: true); 179var endOfFileToken = compilationUnit.EndOfFileToken; 186var token = endOfFileToken.GetPreviousToken(includeSkipped: true); 200public static SyntaxToken FindTokenOnRightOfPosition( 215public static SyntaxToken FindTokenOnLeftOfPosition(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\AbstractSyntaxFormatting.cs (2)
30protected abstract AbstractFormattingResult Format(SyntaxNode node, SyntaxFormattingOptions options, ImmutableArray<AbstractFormattingRule> rules, SyntaxToken startToken, SyntaxToken endToken, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (18)
44SyntaxTree tree, SyntaxToken token, int position, CancellationToken cancellationToken) 70public int? FromAlignTokensOperations(SyntaxTree tree, SyntaxToken token) 74var nextToken = token.GetNextToken(includeZeroWidth: true); 79var alignmentBaseToken = GetAlignmentBaseTokenFor(nextToken); 90SyntaxTree tree, SyntaxToken token, int position, CancellationToken cancellationToken) 96SyntaxTree tree, SyntaxToken token, int position, int extraSpaces, CancellationToken cancellationToken) 111Func<SyntaxToken, int> tokenColumnGetter, 114var token = startingOperation.StartToken; 140Func<SyntaxToken, int> tokenColumnGetter, 154var baseToken = operation.BaseToken; 213private List<IndentBlockOperation> GetParentIndentBlockOperations(SyntaxToken token) 229private static IEnumerable<SyntaxNode> GetParentNodes(SyntaxToken token) 247private SyntaxToken GetAlignmentBaseTokenFor(SyntaxToken token) 278private IndentBlockOperation? GetIndentationDataFor(SyntaxNode root, SyntaxToken token, int position) 313var lastVisibleToken = default(SyntaxToken); 343var nextToken = operation.EndToken.GetNextToken(includeZeroWidth: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.AnchorData.cs (4)
16private sealed class AnchorData(AnchorIndentationOperation operation, SyntaxToken anchorToken, int originalColumn) 20public SyntaxToken StartToken => operation.StartToken; 22public SyntaxToken EndToken => operation.EndToken; 24public SyntaxToken AnchorToken { get; } = anchorToken;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (21)
43private readonly SegmentedDictionary<SyntaxToken, AnchorData> _anchorBaseTokenMap = []; 75SyntaxToken startToken, 76SyntaxToken endToken, 193Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter = operation.Option.IsOn(IndentBlockOption.RelativeToFirstTokenOnBaseTokenLine) 197Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> relativeIndentationDeltaGetter = static (self, operation, effectiveBaseToken) => 204Func<FormattingContext, SyntaxToken, int> relativeIndentationBaseIndentationGetter = 399var anchorToken = TokenStream.FirstTokenOfBaseTokenLine(operation.AnchorToken); 417public int GetBaseIndentation(SyntaxToken token) 435public bool TryGetEndTokenForRelativeIndentationSpan(SyntaxToken token, int maxChainDepth, out SyntaxToken endToken, CancellationToken cancellationToken) 468private AnchorData? GetAnchorData(SyntaxToken token) 483public int GetAnchorDeltaFromOriginalColumn(SyntaxToken token) 495public SyntaxToken GetAnchorToken(SyntaxToken token) 506public int GetDeltaFromPreviousChangesMap(SyntaxToken token, Dictionary<SyntaxToken, int> previousChangesMap) 518public SyntaxToken GetEndTokenForAnchorSpan(TokenData tokenData) 641var token1 = TokenStream.GetToken(pairIndex); 642var token2 = TokenStream.GetToken(pairIndex + 1); 656var token1 = TokenStream.GetToken(pairIndex); 657var token2 = TokenStream.GetToken(pairIndex + 1);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (9)
44public (List<IndentBlockOperation> indentOperations, ImmutableArray<SuppressOperation> suppressOperations) Do(SyntaxToken startToken, SyntaxToken endToken) 67private List<IndentBlockOperation> GetInitialIndentBlockOperations(SyntaxToken startToken, SyntaxToken endToken) 125private ImmutableArray<SuppressOperation> GetInitialSuppressOperations(SyntaxToken startToken, SyntaxToken endToken) 137SyntaxToken startToken, SyntaxToken endToken, SuppressOption mask, ArrayBuilder<SuppressOperation> result) 143private void AddInitialSuppressOperations(SyntaxToken token, SuppressOption mask, ArrayBuilder<SuppressOperation> result)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (4)
46protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> changeMap, CancellationToken cancellationToken); 104var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (11)
41private readonly SyntaxToken _startToken; 42private readonly SyntaxToken _endToken; 64SyntaxToken startToken, 65SyntaxToken endToken) 91SyntaxToken startToken, 92SyntaxToken endToken) 354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>(); 417private static SyntaxToken FindCorrectBaseTokenOfRelativeIndentBlockOperation(IndentBlockOperation operation, TokenStream tokenStream) 447var token1 = operation.Token1; 448var token2 = operation.Token2;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (21)
220SyntaxToken token, 221IEnumerable<SyntaxToken> operationTokens, 244SyntaxToken token, 245IEnumerable<SyntaxToken> tokens, 246Dictionary<SyntaxToken, int> previousChangesMap, 260AlignTokensOperation operation, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken) 294SyntaxToken token, 296Dictionary<SyntaxToken, int> previousChangesMap, 324Dictionary<SyntaxToken, int> previousChangesMap, 354private IList<TokenData> GetTokenWithIndices(IEnumerable<SyntaxToken> tokens) 357foreach (var token in tokens) 380IList<TokenData> tokenWithIndices, Dictionary<SyntaxToken, int> newChangesMap, CancellationToken cancellationToken) 412Dictionary<SyntaxToken, int> previousChangesMap, 445SyntaxToken currentToken, 448Dictionary<SyntaxToken, int> previousChangesMap, 472SyntaxToken baseToken, 473SyntaxToken startToken, 474SyntaxToken endToken, 475Dictionary<SyntaxToken, int> previousChangesMap, 492Dictionary<SyntaxToken, int> previousChangesMap, 544int pairIndex, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormattingResult.cs (8)
44protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, CancellationToken cancellationToken); 76private void AddTextChanges(List<TextChange> list, SyntaxToken token1, SyntaxToken token2, TriviaData data) 95using var pooledObject = SharedPools.Default<Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>>().GetPooledObject(); 110internal IEnumerable<ValueTuple<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>> GetChanges(CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractTriviaDataFactory.AbstractComplexTrivia.cs (4)
20public AbstractComplexTrivia(LineFormattingOptions options, TreeData treeInfo, SyntaxToken token1, SyntaxToken token2) 44public SyntaxToken Token1 { get; } 46public SyntaxToken Token2 { get; }
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractTriviaDataFactory.cs (4)
140public abstract TriviaData CreateLeadingTrivia(SyntaxToken token); 141public abstract TriviaData CreateTrailingTrivia(SyntaxToken token); 142public abstract TriviaData Create(SyntaxToken token1, SyntaxToken token2);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (4)
71public AdjustNewLinesOperation? GetAdjustNewLinesOperation(SyntaxToken previousToken, SyntaxToken currentToken) 77public AdjustSpacesOperation? GetAdjustSpacesOperation(SyntaxToken previousToken, SyntaxToken currentToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenData.cs (2)
26public SyntaxToken Token { get; } 28public TokenData(TokenStream tokenStream, int indexInStream, SyntaxToken token)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenPairWithOperations.cs (2)
39public SyntaxToken Token1 47public SyntaxToken Token2
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (30)
30private readonly SegmentedList<SyntaxToken> _tokens; 62_tokens = new SegmentedList<SyntaxToken>(sizeOfList); 83var previousToken = _tokens[0]; 86var currentToken = _tokens[i]; 136public SyntaxToken GetToken(int index) 142public TokenData GetTokenData(SyntaxToken token) 156var previousToken = tokenData.Token.GetPreviousToken(includeZeroWidth: true); 174var nextToken = tokenData.Token.GetNextToken(includeZeroWidth: true); 183internal SyntaxToken FirstTokenOfBaseTokenLine(SyntaxToken token) 196public bool TwoTokensOriginallyOnSameLine(SyntaxToken token1, SyntaxToken token2) 199public bool TwoTokensOnSameLine(SyntaxToken token1, SyntaxToken token2) 202private bool TwoTokensOnSameLineWorker(SyntaxToken token1, SyntaxToken token2, Func<TokenData, TokenData, TriviaData> triviaDataGetter) 264public int GetCurrentColumn(SyntaxToken token) 274public int GetOriginalColumn(SyntaxToken token) 318public void GetTokenLength(SyntaxToken token, out int length, out bool onMultipleLines) 346public IEnumerable<ValueTuple<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>> GetTriviaDataWithTokenPair(CancellationToken cancellationToken) 351var token = this.FirstTokenInStream.Token; 354yield return ValueTuple.Create(ValueTuple.Create(default(SyntaxToken), token), trivia); 369var token = this.LastTokenInStream.Token; 372yield return ValueTuple.Create(ValueTuple.Create(token, default(SyntaxToken)), trivia); 476public bool IsFirstTokenOnLine(SyntaxToken token) 501private int GetTokenIndexInStream(SyntaxToken token) 556private sealed class TokenOrderComparer : IComparer<SyntaxToken> 562public int Compare(SyntaxToken x, SyntaxToken y)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.Iterator.cs (7)
13public readonly struct Iterator(SegmentedList<SyntaxToken> tokensIncludingZeroWidth) 20private readonly SegmentedList<SyntaxToken> _tokensIncludingZeroWidth; 23private (int index, SyntaxToken currentToken, SyntaxToken nextToken) _current; 26public Enumerator(SegmentedList<SyntaxToken> tokensIncludingZeroWidth) 54public readonly (int index, SyntaxToken currentToken, SyntaxToken nextToken) Current => _current;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.cs (8)
36private readonly SyntaxToken _firstToken; 37private readonly SyntaxToken _lastToken; 48public abstract string GetTextBetween(SyntaxToken token1, SyntaxToken token2); 49public abstract int GetOriginalColumn(int tabSize, SyntaxToken token); 53public bool IsFirstToken(SyntaxToken token) 56public bool IsLastToken(SyntaxToken token) 69public IEnumerable<SyntaxToken> GetApplicableTokens(TextSpan textSpan)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.Debug.cs (2)
16public override string GetTextBetween(SyntaxToken token1, SyntaxToken token2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.Node.cs (7)
21public override int GetOriginalColumn(int tabSize, SyntaxToken token) 26var startToken = GetTokenWithLineBreaks(token); 34private static SyntaxToken GetTokenWithLineBreaks(SyntaxToken token) 36var currentToken = token.GetPreviousToken(includeZeroWidth: true); 51public override string GetTextBetween(SyntaxToken token1, SyntaxToken token2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.NodeAndText.cs (3)
24public override int GetOriginalColumn(int tabSize, SyntaxToken token) 33public override string GetTextBetween(SyntaxToken token1, SyntaxToken token2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.StructuredTrivia.cs (3)
33public override string GetTextBetween(SyntaxToken token1, SyntaxToken token2) 36public override int GetOriginalColumn(int tabSize, SyntaxToken token)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (7)
119SyntaxToken baseToken, 290internal static TextSpan GetSpan(SyntaxToken firstToken, SyntaxToken lastToken) 292var previousToken = firstToken.GetPreviousToken(); 293var nextToken = lastToken.GetNextToken(); 308internal static TextSpan GetElasticSpan(SyntaxToken token) 342this IndentBlockOperation operation, IHeaderFacts headerFacts, SyntaxNode root, SyntaxToken indentationAnchor)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\AbstractFormattingRule.cs (4)
47public virtual AdjustNewLinesOperation? GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation) 53public virtual AdjustSpacesOperation? GetAdjustSpacesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustSpacesOperation nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\BaseIndentationFormattingRule.cs (8)
17private readonly SyntaxToken _token1; 18private readonly SyntaxToken _token2; 133private static void SetInnermostNodeForSpan(SyntaxNode root, ref TextSpan span, out SyntaxToken token1, out SyntaxToken token2, out SyntaxNode? commonNode) 149private static void GetTokens(SyntaxNode root, TextSpan span, out SyntaxToken token1, out SyntaxToken token2) 168private static TextSpan GetSpanFromTokens(TextSpan span, SyntaxToken token1, SyntaxToken token2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\CompatAbstractFormattingRule.cs (12)
49public sealed override AdjustNewLinesOperation? GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation) 51var previousTokenCopy = previousToken; 52var currentTokenCopy = currentToken; 59public sealed override AdjustSpacesOperation? GetAdjustSpacesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustSpacesOperation nextOperation) 61var previousTokenCopy = previousToken; 62var currentTokenCopy = currentToken; 96public virtual AdjustNewLinesOperation? GetAdjustNewLinesOperationSlow(ref SyntaxToken previousToken, ref SyntaxToken currentToken, ref NextGetAdjustNewLinesOperation nextOperation) 102public virtual AdjustSpacesOperation? GetAdjustSpacesOperationSlow(ref SyntaxToken previousToken, ref SyntaxToken currentToken, ref NextGetAdjustSpacesOperation nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\NextGetAdjustNewLinesOperation.cs (2)
18public AdjustNewLinesOperation? Invoke(in SyntaxToken previousToken, in SyntaxToken currentToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\NextGetAdjustSpacesOperation.cs (2)
18public AdjustSpacesOperation? Invoke(in SyntaxToken previousToken, in SyntaxToken currentToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\Operations\AlignTokensOperation.cs (4)
16internal AlignTokensOperation(SyntaxToken baseToken, IEnumerable<SyntaxToken> tokens, AlignTokensOption option) 26public SyntaxToken BaseToken { get; } 27public IEnumerable<SyntaxToken> Tokens { get; }
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\Operations\AnchorIndentationOperation.cs (5)
16internal AnchorIndentationOperation(SyntaxToken anchorToken, SyntaxToken endToken, TextSpan textSpan) 29public SyntaxToken AnchorToken { get; } 32public SyntaxToken StartToken => AnchorToken; 33public SyntaxToken EndToken { get; }
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\Operations\FormattingOperations.cs (24)
30public static AnchorIndentationOperation CreateAnchorIndentationOperation(SyntaxToken anchorToken, SyntaxToken endToken) 36public static AnchorIndentationOperation CreateAnchorIndentationOperation(SyntaxToken anchorToken, SyntaxToken endToken, TextSpan textSpan) 42public static SuppressOperation CreateSuppressOperation(SyntaxToken startToken, SyntaxToken endToken, SuppressOption option) 48private static SuppressOperation CreateSuppressOperation(SyntaxToken startToken, SyntaxToken endToken, TextSpan textSpan, SuppressOption option) 54public static IndentBlockOperation CreateIndentBlockOperation(SyntaxToken startToken, SyntaxToken endToken, int indentationDelta, IndentBlockOption option) 63public static IndentBlockOperation CreateIndentBlockOperation(SyntaxToken startToken, SyntaxToken endToken, TextSpan textSpan, int indentationDelta, IndentBlockOption option) 69public static IndentBlockOperation CreateRelativeIndentBlockOperation(SyntaxToken baseToken, SyntaxToken startToken, SyntaxToken endToken, int indentationDelta, IndentBlockOption option) 79public static IndentBlockOperation CreateRelativeIndentBlockOperation(SyntaxToken baseToken, SyntaxToken startToken, SyntaxToken endToken, TextSpan textSpan, int indentationDelta, IndentBlockOption option) 85public static AlignTokensOperation CreateAlignTokensOperation(SyntaxToken baseToken, IEnumerable<SyntaxToken> tokens, AlignTokensOption option) 183internal static AdjustNewLinesOperation? GetAdjustNewLinesOperation(IEnumerable<AbstractFormattingRule> formattingRules, SyntaxToken previousToken, SyntaxToken currentToken, SyntaxFormattingOptions options) 192internal static AdjustSpacesOperation? GetAdjustSpacesOperation(IEnumerable<AbstractFormattingRule> formattingRules, SyntaxToken previousToken, SyntaxToken currentToken, SyntaxFormattingOptions options)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\Operations\IndentBlockOperation.cs (8)
15internal IndentBlockOperation(SyntaxToken startToken, SyntaxToken endToken, TextSpan textSpan, int indentationDelta, IndentBlockOption option) 34internal IndentBlockOperation(SyntaxToken baseToken, SyntaxToken startToken, SyntaxToken endToken, TextSpan textSpan, int indentationDelta, IndentBlockOption option) 56public SyntaxToken BaseToken { get; } 61public SyntaxToken StartToken { get; } 62public SyntaxToken EndToken { get; }
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\Operations\SuppressOperation.cs (4)
17public readonly SyntaxToken StartToken; 18public readonly SyntaxToken EndToken; 20internal SuppressOperation(SyntaxToken startToken, SyntaxToken endToken, TextSpan textSpan, SuppressOption option)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (10)
57protected readonly SyntaxToken Token1; 58protected readonly SyntaxToken Token2; 66SyntaxToken token1, 67SyntaxToken token2, 400GetTokensAtEdgeOfStructureTrivia(trivia1, trivia2, out var token1, out var token2); 464private void GetTokensAtEdgeOfStructureTrivia(SyntaxTrivia trivia1, SyntaxTrivia trivia2, out SyntaxToken token1, out SyntaxToken token2) 473var lastToken = trivia1.GetStructure()!.GetLastToken(includeZeroWidth: true); 487var firstToken = trivia2.GetStructure()!.GetFirstToken(includeZeroWidth: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Helpers\RemoveUnnecessaryImports\RemoveUnnecessaryImportsHelpers.cs (2)
15public static SyntaxToken StripNewLines(ISyntaxFacts syntaxFacts, SyntaxToken token)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.cs (2)
27protected abstract bool ShouldUseTokenIndenter(Indenter indenter, out SyntaxToken token); 32Indenter indenter, SyntaxToken? token, SyntaxTrivia? trivia);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (6)
124private readonly SyntaxToken? TryGetPrecedingVisibleToken() 126var token = Root.FindToken(LineToBeIndented.Start); 169if (_service.ShouldUseTokenIndenter(this, out var token)) 206public IndentationResult GetIndentationOfToken(SyntaxToken token) 209public IndentationResult GetIndentationOfToken(SyntaxToken token, int addedSpaces) 229var token = Root.FindTokenFromEnd(LineToBeIndented.Start);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\ISmartTokenFormatter.cs (1)
14IList<TextChange> FormatToken(SyntaxToken token, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\FileBannerFacts\AbstractFileBannerFacts.cs (1)
170public ImmutableArray<SyntaxTrivia> GetFileBanner(SyntaxToken firstToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\FileBannerFacts\IFileBannerFacts.cs (1)
13ImmutableArray<SyntaxTrivia> GetFileBanner(SyntaxToken firstToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\HeaderFacts\AbstractHeaderFacts.cs (2)
73var tokenToRightOrIn = root.FindToken(position); 95var afterAttributesToken = root.FindTokenOnRightOfPosition(endOfAttributeLists);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (3)
32protected abstract ImmutableArray<(SyntaxNode declarator, SyntaxToken identifier)> GetDeclaratorsAndIdentifiers(TMemberDeclarationSyntax member); 65var token = textSpan.IsEmpty 167var token = root.FindToken(position);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFacts.cs (2)
67ISymbol? GetDeclaredSymbol(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken); 100ImmutableArray<ISymbol> GetBestOrAllSymbols(SemanticModel semanticModel, SyntaxNode? node, SyntaxToken token, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\AbstractDocumentationCommentService.cs (2)
155protected abstract SyntaxToken GetIdentifier(TXmlNameAttributeSyntax xmlName); 164foreach (var token in textTokens)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFacts.cs (57)
105SyntaxToken ParseToken(string text); 108bool IsVerbatimIdentifier(SyntaxToken token); 109bool IsOperator(SyntaxToken token); 110bool IsPredefinedOperator(SyntaxToken token); 111bool IsPredefinedOperator(SyntaxToken token, PredefinedOperator op); 113bool IsPredefinedType(SyntaxToken token); 114bool IsPredefinedType(SyntaxToken token, PredefinedType type); 132bool IsReservedKeyword(SyntaxToken token); 151bool IsContextualKeyword(SyntaxToken token); 157bool IsPreprocessorKeyword(SyntaxToken token); 160bool IsLiteral(SyntaxToken token); 161bool IsStringLiteralOrInterpolatedStringLiteral(SyntaxToken token); 163bool IsNumericLiteral(SyntaxToken token); 164bool IsVerbatimStringLiteral(SyntaxToken token); 186bool TryGetPredefinedType(SyntaxToken token, out PredefinedType type); 187bool TryGetPredefinedOperator(SyntaxToken token, out PredefinedOperator op); 199out SyntaxToken openParen, out SeparatedSyntaxList<TArgumentSyntax> arguments, out SyntaxToken closeParen) where TArgumentSyntax : SyntaxNode; 208void GetPartsOfAssignmentStatement(SyntaxNode statement, out SyntaxNode left, out SyntaxToken operatorToken, out SyntaxNode right); 209void GetPartsOfAssignmentExpressionOrStatement(SyntaxNode statement, out SyntaxNode left, out SyntaxToken operatorToken, out SyntaxNode right); 294SyntaxToken GetIdentifierOfSimpleName(SyntaxNode node); 295SyntaxToken GetIdentifierOfTypeDeclaration(SyntaxNode node); 296SyntaxToken GetIdentifierOfVariableDeclarator(SyntaxNode node); 358bool IsThisConstructorInitializer(SyntaxToken token); 359bool IsBaseConstructorInitializer(SyntaxToken token); 360bool IsQueryKeyword(SyntaxToken token); 377bool IsBindableToken(SyntaxToken token); 391bool AreEquivalent(SyntaxToken token1, SyntaxToken token2); 432SyntaxNode? TryGetBindableParent(SyntaxToken token); 461void GetPartsOfParenthesizedPattern(SyntaxNode node, out SyntaxToken openParen, out SyntaxNode pattern, out SyntaxToken closeParen); 462void GetPartsOfBinaryPattern(SyntaxNode node, out SyntaxNode left, out SyntaxToken operatorToken, out SyntaxNode right); 465void GetPartsOfRelationalPattern(SyntaxNode node, out SyntaxToken operatorToken, out SyntaxNode expression); 466void GetPartsOfUnaryPattern(SyntaxNode node, out SyntaxToken operatorToken, out SyntaxNode pattern); 468bool ContainsInterleavedDirective(TextSpan span, SyntaxToken token, CancellationToken cancellationToken); 480SyntaxToken? GetDeclarationIdentifierIfOverride(SyntaxToken token); 511void GetPartsOfArgumentList(SyntaxNode node, out SyntaxToken openParenToken, out SeparatedSyntaxList<SyntaxNode> arguments, out SyntaxToken closeParenToken); 515void GetPartsOfBinaryExpression(SyntaxNode node, out SyntaxNode left, out SyntaxToken operatorToken, out SyntaxNode right); 518void GetPartsOfConditionalAccessExpression(SyntaxNode node, out SyntaxNode expression, out SyntaxToken operatorToken, out SyntaxNode whenNotNull); 520void GetPartsOfGenericName(SyntaxNode node, out SyntaxToken identifier, out SeparatedSyntaxList<SyntaxNode> typeArguments); 521void GetPartsOfInterpolationExpression(SyntaxNode node, out SyntaxToken stringStartToken, out SyntaxList<SyntaxNode> contents, out SyntaxToken stringEndToken); 523void GetPartsOfIsPatternExpression(SyntaxNode node, out SyntaxNode left, out SyntaxToken isToken, out SyntaxNode right); 524void GetPartsOfMemberAccessExpression(SyntaxNode node, out SyntaxNode expression, out SyntaxToken operatorToken, out SyntaxNode name); 526void GetPartsOfObjectCreationExpression(SyntaxNode node, out SyntaxToken keyword, out SyntaxNode type, out SyntaxNode? argumentList, out SyntaxNode? initializer); 527void GetPartsOfImplicitObjectCreationExpression(SyntaxNode node, out SyntaxToken keyword, out SyntaxNode argumentList, out SyntaxNode? initializer); 528void GetPartsOfParameter(SyntaxNode node, out SyntaxToken identifier, out SyntaxNode? @default); 529void GetPartsOfParenthesizedExpression(SyntaxNode node, out SyntaxToken openParen, out SyntaxNode expression, out SyntaxToken closeParen); 530void GetPartsOfPrefixUnaryExpression(SyntaxNode node, out SyntaxToken operatorToken, out SyntaxNode operand); 531void GetPartsOfQualifiedName(SyntaxNode node, out SyntaxNode left, out SyntaxToken dotToken, out SyntaxNode right); 532void GetPartsOfUsingAliasDirective(SyntaxNode node, out SyntaxToken globalKeyword, out SyntaxToken alias, out SyntaxNode name); 557SyntaxToken GetTokenOfLiteralExpression(SyntaxNode node);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (32)
94private static bool IsOnSingleLine(ISyntaxFacts syntaxFacts, SyntaxToken token, bool leading, bool trailing) 184foreach (var token in node.DescendantTokens()) 210public static bool SpansPreprocessorDirective(this ISyntaxFacts syntaxFacts, IEnumerable<SyntaxToken> tokens) 217var previousToken = default(SyntaxToken); 223foreach (var token in orderedTokens) 272public static bool IsReservedOrContextualKeyword(this ISyntaxFacts syntaxFacts, SyntaxToken token) 275public static bool IsWord(this ISyntaxFacts syntaxFacts, SyntaxToken token) 323SyntaxToken openParenToken; 325SyntaxToken closeParenToken; 357var previousToken = node.GetFirstToken().GetPreviousToken(); 368var nextToken = node.GetLastToken().GetNextToken(); 380private static bool IsWordOrNumber(this ISyntaxFacts syntaxFacts, SyntaxToken token) 401public static SyntaxToken GetOperatorTokenOfBinaryExpression(this ISyntaxFacts syntaxFacts, SyntaxNode node) 403syntaxFacts.GetPartsOfBinaryExpression(node, out _, out var token, out _); 429public static SyntaxToken GetOperatorTokenOfMemberAccessExpression(this ISyntaxFacts syntaxFacts, SyntaxNode node) 431syntaxFacts.GetPartsOfMemberAccessExpression(node, out _, out var operatorToken, out _); 456var afterAttributesToken = root.FindTokenOnRightOfPosition(endOfAttributeLists); 519public static SyntaxToken GetIdentifierOfGenericName(this ISyntaxFacts syntaxFacts, SyntaxNode node) 521syntaxFacts.GetPartsOfGenericName(node, out var identifier, out _); 525public static SyntaxToken GetIdentifierOfIdentifierName(this ISyntaxFacts syntaxFacts, SyntaxNode node) 528public static SyntaxToken GetIdentifierOfParameter(this ISyntaxFacts syntaxFacts, SyntaxNode node) 530syntaxFacts.GetPartsOfParameter(node, out var identifier, out _); 588public static SyntaxToken GetOperatorTokenOfPrefixUnaryExpression(this ISyntaxFacts syntaxFacts, SyntaxNode node) 590syntaxFacts.GetPartsOfPrefixUnaryExpression(node, out var operatorToken, out _); 702public static bool IsAwaitKeyword(this ISyntaxFacts syntaxFacts, SyntaxToken token) 705public static bool IsGlobalNamespaceKeyword(this ISyntaxFacts syntaxFacts, SyntaxToken token) 712public static bool IsCharacterLiteral(this ISyntaxFacts syntaxFacts, SyntaxToken token) 715public static bool IsStringLiteral(this ISyntaxFacts syntaxFacts, SyntaxToken token) 722public static bool IsIdentifier(this ISyntaxFacts syntaxFacts, SyntaxToken token) 725public static bool IsHashToken(this ISyntaxFacts syntaxFacts, SyntaxToken token) 728public static bool IsInterpolatedStringTextToken(this ISyntaxFacts syntaxFacts, SyntaxToken token)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (11)
78public SyntaxToken WithAdditionalAnnotations(SyntaxToken token, params TAnnotation[] annotations) 90public SyntaxToken WithoutAnnotations(SyntaxToken token, params TAnnotation[] annotations) 114public IEnumerable<TAnnotation> GetAnnotations(SyntaxToken token) 126public IEnumerable<TSpecificAnnotation> GetAnnotations<TSpecificAnnotation>(SyntaxToken token) where TSpecificAnnotation : TAnnotation 138public bool HasAnnotations(SyntaxToken token) 150public bool HasAnnotations<TSpecificAnnotation>(SyntaxToken token) where TSpecificAnnotation : TAnnotation 162public bool HasAnnotation(SyntaxToken token, TAnnotation annotation) 177public IEnumerable<SyntaxToken> GetAnnotatedTokens(SyntaxNode node) 189public IEnumerable<SyntaxToken> GetAnnotatedTokens<TSpecificAnnotation>(SyntaxNode node) where TSpecificAnnotation : TAnnotation
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CommonFormattingHelpers.cs (31)
46public static IEnumerable<(SyntaxToken, SyntaxToken)> ConvertToTokenPairs(this SyntaxNode root, IReadOnlyList<TextSpan> spans) 82public static ValueTuple<SyntaxToken, SyntaxToken> ConvertToTokenPair(this SyntaxNode root, TextSpan textSpan) 87var startToken = root.FindToken(textSpan.Start); 104var endToken = (root.FullSpan.End <= textSpan.End) ? 128public static bool IsInvalidTokenRange(this SyntaxNode root, SyntaxToken startToken, SyntaxToken endToken) 146public static int GetTokenColumn(this SyntaxTree tree, SyntaxToken token, int tabSize) 157public static string GetText(this SourceText text, SyntaxToken token1, SyntaxToken token2) 160public static string GetTextBetween(SyntaxToken token1, SyntaxToken token2) 168public static void AppendTextBetween(SyntaxToken token1, SyntaxToken token2, StringBuilder builder) 193for (var token = token1.GetNextToken(includeZeroWidth: true); token.FullSpan.End <= token2.FullSpan.Start; token = token.GetNextToken(includeZeroWidth: true)) 201private static void AppendTextBetweenTwoAdjacentTokens(SyntaxToken token1, SyntaxToken token2, StringBuilder builder) 207private static void AppendLeadingTriviaText(SyntaxToken token, StringBuilder builder) 224private static void AppendPartialLeadingTriviaText(SyntaxToken token, StringBuilder builder, int token1FullSpanEnd) 242private static void AppendTrailingTriviaText(SyntaxToken token, StringBuilder builder) 260public static TextSpan GetSpanIncludingTrailingAndLeadingTriviaOfAdjacentTokens(SyntaxToken startToken, SyntaxToken endToken) 270private static int GetEndPositionOfSpan(SyntaxToken token) 272var nextToken = token.GetNextToken(); 295public static int GetStartPositionOfSpan(SyntaxToken token) 297var previousToken = token.GetPreviousToken(); 347public static bool HasAnyWhitespaceElasticTrivia(SyntaxToken previousToken, SyntaxToken currentToken) 362var startToken = root.FindToken(span.Start).GetPreviousToken(); 363var endToken = root.FindTokenFromEnd(span.End).GetNextToken();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\InterceptsLocationUtilities.cs (1)
18/// cref="SyntaxToken.FullSpan"/>).</param>
Microsoft.CodeAnalysis.CodeStyle.Fixes (140)
src\Analyzers\Core\CodeFixes\AddAnonymousTypeMemberName\AbstractAddAnonymousTypeMemberNameCodeFixProvider.cs (2)
30protected abstract TAnonymousObjectMemberDeclaratorSyntax WithName(TAnonymousObjectMemberDeclaratorSyntax declarator, SyntaxToken name); 129var nameToken = generator.Identifier(uniqueName);
src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractRemoveDocCommentNodeCodeFixProvider.cs (3)
31protected abstract bool IsXmlNewLineToken(SyntaxToken token); 32protected abstract bool IsXmlWhitespaceToken(SyntaxToken token); 105foreach (var childToken in GetTextTokens(textSyntax))
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (5)
33protected abstract bool TryInitializeImplicitObjectCreation(SemanticDocument document, SyntaxNode node, CancellationToken cancellationToken, out SyntaxToken token, out ImmutableArray<Argument> arguments, out INamedTypeSymbol typeToGenerateIn); 34protected abstract bool TryInitializeSimpleNameGenerationState(SemanticDocument document, SyntaxNode simpleName, CancellationToken cancellationToken, out SyntaxToken token, out ImmutableArray<Argument> arguments, out INamedTypeSymbol typeToGenerateIn); 35protected abstract bool TryInitializeConstructorInitializerGeneration(SemanticDocument document, SyntaxNode constructorInitializer, CancellationToken cancellationToken, out SyntaxToken token, out ImmutableArray<Argument> arguments, out INamedTypeSymbol typeToGenerateIn); 36protected abstract bool TryInitializeSimpleAttributeNameGenerationState(SemanticDocument document, SyntaxNode simpleName, CancellationToken cancellationToken, out SyntaxToken token, out ImmutableArray<Argument> arguments, out INamedTypeSymbol typeToGenerateIn); 43protected abstract IMethodSymbol GetCurrentConstructor(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken);
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (4)
51public SyntaxToken Token { get; private set; } 302out var token, out var arguments, out var typeToGenerateIn)) 320out var token, out var arguments, out var typeToGenerateIn)) 339out var token, out var arguments, out var typeToGenerateIn))
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorCodeFixProvider.cs (1)
18protected abstract SyntaxToken? TryGetTypeName(SyntaxNode typeDeclaration);
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.cs (1)
27protected abstract bool TryInitializeIdentifierNameState(SemanticDocument document, TSimpleNameSyntax identifierName, CancellationToken cancellationToken, out SyntaxToken identifierToken, out TExpressionSyntax simpleNameOrMemberAccessExpression);
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.State.cs (2)
23public SyntaxToken IdentifierToken { get; private set; } 86out var identifierToken, out var simpleNameOrMemberAccessExpression))
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberCodeFixProvider.cs (2)
28protected abstract bool IsCandidate(SyntaxNode node, SyntaxToken token, Diagnostic diagnostic); 65var token = root.FindToken(span.Start);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateConversionService.cs (2)
26protected abstract bool TryInitializeImplicitConversionState(SemanticDocument document, SyntaxNode expression, ISet<TypeKind> classInterfaceModuleStructTypes, CancellationToken cancellationToken, out SyntaxToken identifierToken, out IMethodSymbol methodSymbol, out INamedTypeSymbol typeToGenerateIn); 27protected abstract bool TryInitializeExplicitConversionState(SemanticDocument document, SyntaxNode expression, ISet<TypeKind> classInterfaceModuleStructTypes, CancellationToken cancellationToken, out SyntaxToken identifierToken, out IMethodSymbol methodSymbol, out INamedTypeSymbol typeToGenerateIn);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateConversionService.State.cs (2)
62out var identifierToken, out var methodSymbol, out var typeToGenerateIn)) 86out var identifierToken, out var methodSymbol, out var typeToGenerateIn))
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.cs (2)
26protected abstract bool TryInitializeExplicitInterfaceState(SemanticDocument document, SyntaxNode node, CancellationToken cancellationToken, out SyntaxToken identifierToken, out IMethodSymbol methodSymbol, out INamedTypeSymbol typeToGenerateIn); 27protected abstract bool TryInitializeSimpleNameState(SemanticDocument document, TSimpleNameSyntax simpleName, CancellationToken cancellationToken, out SyntaxToken identifierToken, out TExpressionSyntax simpleNameOrMemberAccessExpression, out TInvocationExpressionSyntax invocationExpressionOpt, out bool isInConditionalExpression);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.State.cs (2)
89out var identifierToken, out var methodSymbol, out var typeToGenerateIn)) 129out var identifierToken, out var simpleNameOrMemberAccessExpression,
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.State.cs (1)
30public SyntaxToken IdentifierToken { get; protected set; }
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (3)
34protected abstract bool TryInitializeExplicitInterfaceState(SemanticDocument document, SyntaxNode node, CancellationToken cancellationToken, out SyntaxToken identifierToken, out IPropertySymbol propertySymbol, out INamedTypeSymbol typeToGenerateIn); 35protected abstract bool TryInitializeIdentifierNameState(SemanticDocument document, TSimpleNameSyntax identifierName, CancellationToken cancellationToken, out SyntaxToken identifierToken, out TExpressionSyntax simpleNameOrMemberAccessExpression, out bool isInExecutableBlock, out bool isinConditionalAccessExpression); 37protected abstract bool TryConvertToLocalDeclaration(ITypeSymbol type, SyntaxToken identifierToken, SemanticModel semanticModel, CancellationToken cancellationToken, out SyntaxNode newRoot);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (3)
39public SyntaxToken IdentifierToken { get; private set; } 197out var identifierToken, out var propertySymbol, out var typeToGenerateIn)) 240out var identifierToken, out var simpleNameOrMemberAccessExpression, out var isInExecutableBlock, out var isInConditionalAccessExpression))
src\Analyzers\Core\CodeFixes\ImplementAbstractClass\AbstractImplementAbstractClassCodeFixProvider.cs (2)
25protected abstract SyntaxToken GetClassIdentifier(TClassNode classNode); 34var token = root.FindToken(context.Span.Start);
src\Analyzers\Core\CodeFixes\ImplementAbstractClass\ImplementAbstractClassData.cs (4)
33Document document, ImplementTypeOptions options, SyntaxNode classNode, SyntaxToken classIdentifier, 40private readonly SyntaxToken _classIdentifier = classIdentifier; 47Document document, SyntaxNode classNode, SyntaxToken classIdentifier, CancellationToken cancellationToken) 79Document document, SyntaxNode classNode, SyntaxToken classIdentifier, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\ImplementInterface\AbstractImplementInterfaceCodeFixProvider.cs (1)
37var token = root.FindToken(span.Start);
src\Analyzers\Core\CodeFixes\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesCodeFixProvider.cs (3)
50using var _ = PooledDictionary<SyntaxToken, SyntaxToken>.GetInstance(out var replacements); 53var token = root.FindToken(diagnostic.AdditionalLocations[0].SourceSpan.Start);
src\Analyzers\Core\CodeFixes\OrderModifiers\AbstractOrderModifiersCodeFixProvider.cs (3)
82int CompareModifiers(SyntaxToken t1, SyntaxToken t2) 85int GetOrder(SyntaxToken token)
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (4)
76protected abstract SyntaxNode? TryUpdateNameForFlaggedNode(SyntaxNode node, SyntaxToken newName); 81protected abstract SyntaxToken GetForEachStatementIdentifier(TForEachStatementSyntax node); 938public SyntaxToken GenerateUniqueNameAtSpanStart(SyntaxNode node) 940var nameToken = _semanticFacts.GenerateUniqueName(_semanticModel, node, _memberDeclaration, "unused", _usedNames, _cancellationToken);
src\Analyzers\Core\CodeFixes\UseCompoundAssignment\AbstractUseCompoundAssignmentCodeFixProvider.cs (3)
39protected abstract SyntaxToken Token(TSyntaxKind kind); 41TSyntaxKind assignmentOpKind, TExpressionSyntax left, SyntaxToken syntaxToken, TExpressionSyntax right); 85var compoundOperator = Token(_assignmentToTokenMap[assignmentOpKind]);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (14)
98public TDeclarationNode AddAttributes<TDeclarationNode>(TDeclarationNode destination, IEnumerable<AttributeData> attributes, SyntaxToken? target, CodeGenerationContextInfo info, CancellationToken cancellationToken) where TDeclarationNode : SyntaxNode 107public TDeclarationNode UpdateDeclarationModifiers<TDeclarationNode>(TDeclarationNode declaration, IEnumerable<SyntaxToken> newModifiers, CodeGenerationContextInfo info, CancellationToken cancellationToken) where TDeclarationNode : SyntaxNode 133public abstract TDeclarationNode AddAttributes<TDeclarationNode>(TDeclarationNode destination, IEnumerable<AttributeData> attributes, SyntaxToken? target, TCodeGenerationContextInfo info, CancellationToken cancellationToken) where TDeclarationNode : SyntaxNode; 138public abstract TDeclarationNode UpdateDeclarationModifiers<TDeclarationNode>(TDeclarationNode declaration, IEnumerable<SyntaxToken> newModifiers, TCodeGenerationContextInfo info, CancellationToken cancellationToken) where TDeclarationNode : SyntaxNode; 522Func<SyntaxToken, bool> isComma, 528var previousToken = root.FindToken(attributeToRemove.FullSpan.Start - 1); 530var nextToken = root.FindToken(attributeToRemove.FullSpan.End + 1); 540var tokenToInsertTrivia = node.FindToken(position); 541var tokenWithInsertedTrivia = tokenToInsertTrivia.WithLeadingTrivia(trivia.Concat(tokenToInsertTrivia.LeadingTrivia)); 549ArrayBuilder<SyntaxToken> newModifierTokens, SyntaxTokenList modifiersList, 550Func<SyntaxToken, bool> isAccessibilityModifier) 552using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var updatedModifiersList); 554foreach (var modifier in modifiersList) 556SyntaxToken newModifier;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService_FindDeclaration.cs (5)
30protected static SyntaxToken GetEndToken(SyntaxNode node) 32var lastToken = node.GetLastToken(includeZeroWidth: true, includeSkipped: true); 36var nextToken = lastToken.GetNextToken(includeZeroWidth: true, includeSkipped: true); 48var start = node.GetFirstToken(); 49var end = GetEndToken(node);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\ICodeGenerationService.cs (2)
94TDeclarationNode AddAttributes<TDeclarationNode>(TDeclarationNode destination, IEnumerable<AttributeData> attributes, SyntaxToken? target, CodeGenerationContextInfo info, CancellationToken cancellationToken) where TDeclarationNode : SyntaxNode; 109TDeclarationNode UpdateDeclarationModifiers<TDeclarationNode>(TDeclarationNode declaration, IEnumerable<SyntaxToken> newModifiers, CodeGenerationContextInfo info, CancellationToken cancellationToken) where TDeclarationNode : SyntaxNode;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\AbstractRefactoringHelpersService.cs (13)
155private static (SyntaxToken tokenToLeft, SyntaxToken tokenToRight) GetTokensToLeftAndRight( 161var tokenOnLocation = root.FindToken(location); 166var commaToken = tokenOnLocation; 178var nextToken = commaToken.GetNextToken(); 179var previousToken = commaToken.GetPreviousToken(); 191var tokenToRight = tokenOnLocation.Span.Contains(location) 197var tokenToLeft = default(SyntaxToken); 200var previousToken = tokenOnLocation.Span.End == location 233SourceText sourceText, SyntaxToken tokenOnLocation, int location) 267SyntaxToken tokenToLeft, 306SyntaxToken tokenToRightOrIn,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\CodeRefactoringHelpers.cs (2)
25/// Returns false if only and precisely one <see cref="SyntaxToken"/> is selected. In that case the <paramref 77var selectionStartToken = node.FindToken(selection.Start);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\AddParameterEditor.cs (1)
55var previousToken = firstParameter.GetFirstToken().GetPreviousToken();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ContextQuery\SyntaxContext.cs (4)
22public SyntaxToken LeftToken { get; } 28public SyntaxToken TargetToken { get; } 62SyntaxToken leftToken, 63SyntaxToken targetToken,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (1)
138var token = root.FindToken(span.Start);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\IIndentationService.cs (2)
30public static string GetPreferredIndentation(this SyntaxToken token, ParsedDocument document, IndentationOptions options, CancellationToken cancellationToken) 48var newToken = token.WithAdditionalAnnotations(annotation);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AddImportHelpers.cs (2)
35var firstToken = root.GetFirstToken(); 39var newFirstToken = firstToken.WithLeadingTrivia(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (1)
34protected abstract SyntaxToken GetIdentifierOfVariableDeclarator(TVariableDeclaratorSyntax variableDeclarator);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
171var previousToken = FirstStatementAffectedInInnermostBlock.GetFirstToken().GetPreviousToken();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (9)
25protected abstract SyntaxToken ToIdentifierToken(string identifier); 39public SyntaxToken GenerateUniqueName( 47public SyntaxToken GenerateUniqueName( 55public SyntaxToken GenerateUniqueLocalName( 63public SyntaxToken GenerateUniqueLocalName( 71public SyntaxToken GenerateUniqueName( 94public SyntaxToken GenerateUniqueName(string baseName, IEnumerable<string> usedNames) 197public ISymbol GetDeclaredSymbol(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 242public ImmutableArray<ISymbol> GetBestOrAllSymbols(SemanticModel semanticModel, SyntaxNode node, SyntaxToken token, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\ISemanticFactsService.cs (6)
26SyntaxToken GenerateUniqueName( 30SyntaxToken GenerateUniqueName( 34SyntaxToken GenerateUniqueName(SemanticModel semanticModel, SyntaxNode location, SyntaxNode? container, string baseName, 37SyntaxToken GenerateUniqueLocalName( 41SyntaxToken GenerateUniqueLocalName( 45SyntaxToken GenerateUniqueName(string baseName, IEnumerable<string> usedNames);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SyntaxGeneratorInternalExtensions\SyntaxGeneratorInternal.cs (11)
37SyntaxNode? type, SyntaxToken identifier, SyntaxNode? initializer = null, bool isConst = false); 42public SyntaxNode LocalDeclarationStatement(SyntaxToken name, SyntaxNode initializer) 47public abstract SyntaxNode EqualsValueClause(SyntaxToken operatorToken, SyntaxNode value); 49public abstract SyntaxToken Identifier(string identifier); 71/// <see cref="LocalDeclarationStatement(SyntaxNode, SyntaxToken, SyntaxNode, bool)"/>. 76public abstract SyntaxToken InterpolatedStringTextToken(string content, string value); 77public abstract SyntaxNode InterpolatedStringText(SyntaxToken textToken); 79public abstract SyntaxNode InterpolatedStringExpression(SyntaxToken startToken, IEnumerable<SyntaxNode> content, SyntaxToken endToken); 108public abstract SyntaxNode IsPatternExpression(SyntaxNode expression, SyntaxToken isToken, SyntaxNode pattern); 121public abstract SyntaxNode UnaryPattern(SyntaxToken operatorToken, SyntaxNode pattern);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (6)
51public abstract SyntaxToken Expand(SyntaxToken token, SemanticModel semanticModel, Func<SyntaxNode, bool>? expandInsideNode, CancellationToken cancellationToken); 138var reducedTokensMap = new ConcurrentDictionary<SyntaxToken, SyntaxToken>(); 179ConcurrentDictionary<SyntaxToken, SyntaxToken> reducedTokensMap,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\ISimplificationService.cs (2)
24SyntaxToken Expand( 25SyntaxToken token,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplificationHelpers.cs (3)
41public static SyntaxToken CopyAnnotations(SyntaxToken from, SyntaxToken to)
Microsoft.CodeAnalysis.CSharp (847)
Binder\Binder.cs (3)
270internal bool AreNullableAnnotationsEnabled(SyntaxToken token) 549internal static void Error(BindingDiagnosticBag diagnostics, ErrorCode code, SyntaxToken token) 554internal static void Error(BindingDiagnosticBag diagnostics, ErrorCode code, SyntaxToken token, params object[] args)
Binder\Binder.QueryTranslationState.cs (1)
72internal RangeVariableSymbol AddRangeVariable(Binder binder, SyntaxToken identifier, BindingDiagnosticBag diagnostics)
Binder\Binder_AnonymousTypes.cs (2)
49SyntaxToken nameToken = default(SyntaxToken);
Binder\Binder_Constraints.cs (1)
150SyntaxToken questionToken = constraintSyntax.QuestionToken;
Binder\Binder_Expressions.cs (2)
4605SyntaxToken stackAllocKeyword, 7605SyntaxToken operatorToken,
Binder\Binder_Lambda.cs (2)
183refKind = ParameterHelpers.GetModifiers(p.Modifiers, out _, out var paramsKeyword, out _, out scope); 366ParameterHelpers.GetModifiers(paramSyntax.Modifiers, refnessKeyword: out _, out var paramsKeyword, thisKeyword: out _, scope: out _);
Binder\Binder_Operators.cs (2)
831private void ReportBinaryOperatorError(ExpressionSyntax node, BindingDiagnosticBag diagnostics, SyntaxToken operatorToken, BoundExpression left, BoundExpression right, LookupResultKind resultKind) 2260private BoundExpression BindIncrementOperator(CSharpSyntaxNode node, ExpressionSyntax operandSyntax, SyntaxToken operatorToken, BindingDiagnosticBag diagnostics)
Binder\Binder_Patterns.cs (1)
878SyntaxToken identifier = singleVariableDesignation.Identifier;
Binder\Binder_Statements.cs (4)
1162protected bool CheckRefLocalInAsyncOrIteratorMethod(SyntaxToken identifierToken, BindingDiagnosticBag diagnostics) 1200private SourceLocalSymbol LocateDeclaredVariableSymbol(SyntaxToken identifier, TypeSyntax typeSyntax, EqualsValueClauseSyntax equalsValue, LocalDeclarationKind kind) 1851protected virtual SourceLocalSymbol LookupLocal(SyntaxToken nameToken) 1856protected virtual LocalFunctionSymbol LookupLocalFunction(SyntaxToken nameToken)
Binder\Binder_Symbols.cs (6)
192private NamespaceOrTypeOrAliasSymbolWithAnnotations BindTypeOrAliasOrKeyword(SyntaxToken identifier, SyntaxNode syntax, BindingDiagnosticBag diagnostics, out bool isKeyword) 521void reportNullableReferenceTypesIfNeeded(SyntaxToken questionToken, TypeWithAnnotations typeArgument = default) 697SyntaxToken nameToken = argumentSyntax.Identifier; 1748internal static bool ReportUseSite(Symbol symbol, BindingDiagnosticBag diagnostics, SyntaxToken token) 2739internal static bool CheckFeatureAvailability(SyntaxToken syntax, MessageID feature, BindingDiagnosticBag diagnostics, bool forceWarning = false) 2748private static bool CheckFeatureAvailability(SyntaxToken syntax, MessageID feature, DiagnosticBag? diagnostics, bool forceWarning = false)
Binder\BinderFactory.BinderFactoryVisitor.cs (2)
1068SyntaxToken token; 1420SyntaxToken associatedToken = containingTrivia.Token;
Binder\BindingDiagnosticBag.cs (2)
100internal bool ReportUseSite(Symbol? symbol, SyntaxToken token) 164internal CSDiagnosticInfo Add(ErrorCode code, SyntaxToken syntax, params object[] args)
Binder\BuckStopsHereBinder.cs (2)
53protected override SourceLocalSymbol? LookupLocal(SyntaxToken nameToken) 58protected override LocalFunctionSymbol? LookupLocalFunction(SyntaxToken nameToken)
Binder\InContainerBinder.cs (2)
136protected override SourceLocalSymbol LookupLocal(SyntaxToken nameToken) 141protected override LocalFunctionSymbol LookupLocalFunction(SyntaxToken nameToken)
Binder\InMethodBinder.cs (2)
59protected override SourceLocalSymbol LookupLocal(SyntaxToken nameToken) 64protected override LocalFunctionSymbol LookupLocalFunction(SyntaxToken nameToken)
Binder\LocalScopeBinder.cs (3)
205else if (decl.UsingKeyword != default(SyntaxToken)) 381protected override SourceLocalSymbol LookupLocal(SyntaxToken nameToken) 401protected override LocalFunctionSymbol LookupLocalFunction(SyntaxToken nameToken)
Binder\Semantics\BestTypeInferrer.cs (1)
19var example = types.FirstOrDefault(t => t.HasType);
Binder\UsingStatementBinder.cs (2)
90internal static BoundStatement BindUsingStatementOrDeclarationFromParts(SyntaxNode syntax, SyntaxToken usingKeyword, SyntaxToken awaitKeyword, Binder originalBinder, UsingStatementBinder? usingBinderOpt, BindingDiagnosticBag diagnostics)
Binder\WithExternAliasesBinder.cs (2)
62protected sealed override SourceLocalSymbol? LookupLocal(SyntaxToken nameToken) 67protected sealed override LocalFunctionSymbol? LookupLocalFunction(SyntaxToken nameToken)
Binder\WithUsingNamespacesAndTypesBinder.cs (2)
218protected override SourceLocalSymbol? LookupLocal(SyntaxToken nameToken) 223protected override LocalFunctionSymbol? LookupLocalFunction(SyntaxToken nameToken)
CodeGen\Optimizer.cs (2)
2371internal override SyntaxToken IdentifierToken 2373get { return default(SyntaxToken); }
Compilation\CSharpSemanticModel.cs (7)
437SyntaxToken token = Root.FindToken(position); 1268SyntaxToken unused; 1272protected int CheckAndAdjustPosition(int position, out SyntaxToken token) 1298token = default(SyntaxToken); 1318SyntaxToken firstToken = node.GetFirstToken(includeZeroWidth: false); 1574SyntaxToken token; 1843var token = this.Root.FindToken(position);
Compilation\MemberSemanticModel.cs (3)
692private LocalSymbol GetDeclaredLocal(CSharpSyntaxNode declarationSyntax, SyntaxToken declaredIdentifier) 735private static LocalFunctionSymbol GetDeclaredLocalFunction(Binder enclosingBinder, SyntaxToken declaredIdentifier) 1583SyntaxToken token = this.Root.FindToken(position);
Compilation\SyntaxTreeSemanticModel.cs (1)
151SyntaxToken token = this.Root.FindTokenIncludingCrefAndNameAttributes(position);
Compiler\DocumentationCommentCompiler.DocumentationCommentWalker.cs (2)
103if (endGreaterThanToken.GetNextToken() is SyntaxToken newLineToken && newLineToken.IsKind(SyntaxKind.XmlTextLiteralNewLineToken)) 219public override void VisitToken(SyntaxToken token)
Compiler\UnprocessedDocumentationCommentFinder.cs (1)
78public override void VisitLeadingTrivia(SyntaxToken token)
CSharpExtensions.cs (21)
20/// Determines if <see cref="SyntaxToken"/> is of a specified kind. 25public static bool IsKind(this SyntaxToken token, SyntaxKind kind) 67internal static SyntaxKind ContextualKind(this SyntaxToken token) 72internal static bool IsUnderscoreToken(this SyntaxToken identifier) 160internal static SyntaxToken FirstOrDefault(this SyntaxTokenList list, SyntaxKind kind) 163return (index >= 0) ? list[index] : default(SyntaxToken); 187/// Returns <see cref="SyntaxKind"/> for <see cref="SyntaxToken"/> from <see cref="SyntaxToken.RawKind"/> property. 189public static SyntaxKind Kind(this SyntaxToken token) 222public static bool IsKeyword(this SyntaxToken token) 227public static bool IsContextualKeyword(this SyntaxToken token) 232public static bool IsReservedKeyword(this SyntaxToken token) 237public static bool IsVerbatimStringLiteral(this SyntaxToken token) 242public static bool IsVerbatimIdentifier(this SyntaxToken token) 247public static VarianceKind VarianceKindFromToken(this SyntaxToken node) 261public static SyntaxTokenList Insert(this SyntaxTokenList list, int index, params SyntaxToken[] items) 304public static SyntaxToken ReplaceTrivia(this SyntaxToken token, IEnumerable<SyntaxTrivia> trivia, Func<SyntaxTrivia, SyntaxTrivia, SyntaxTrivia> computeReplacementTrivia) 317public static SyntaxToken ReplaceTrivia(this SyntaxToken token, SyntaxTrivia oldTrivia, SyntaxTrivia newTrivia) 327internal static Syntax.InternalSyntax.DirectiveStack ApplyDirectives(this SyntaxToken token, Syntax.InternalSyntax.DirectiveStack stack)
Errors\DiagnosticBagExtensions.cs (1)
75SyntaxToken token,
Errors\LazyMissingNonNullTypesContextDiagnosticInfo.cs (2)
46public static void AddAll(Binder binder, SyntaxToken questionToken, TypeWithAnnotations? type, DiagnosticBag diagnostics) 61private static void GetRawDiagnosticInfos(Binder binder, SyntaxToken questionToken, ArrayBuilder<DiagnosticInfo> infos)
Errors\MessageID.cs (2)
364SyntaxToken syntax, 392SyntaxToken syntax,
FlowAnalysis\ControlFlowPass.cs (1)
268var firstToken = statement.Syntax.GetFirstToken();
FlowAnalysis\NullableWalker.PlaceholderLocal.cs (1)
54internal override SyntaxToken IdentifierToken => throw ExceptionUtilities.Unreachable();
Lowering\Instrumentation\CodeCoverageInstrumenter.cs (1)
623private static TextSpan SkipAttributes(SyntaxNode syntax, SyntaxList<AttributeListSyntax> attributes, SyntaxTokenList modifiers, SyntaxToken keyword, TypeSyntax? type)
Lowering\Instrumentation\DebugInfoInjector_SequencePoints.cs (3)
101GetFirstLocalOrFieldBreakpointSpan(modifiers.Any() ? modifiers[0] : (SyntaxToken?)null, declaratorSyntax, out node, out part); 112parent.UsingKeyword == default ? (SyntaxToken?)null : 142internal static void GetFirstLocalOrFieldBreakpointSpan(SyntaxToken? firstToken, VariableDeclaratorSyntax declaratorSyntax, out SyntaxNode node, out TextSpan? part)
Lowering\Instrumentation\LocalStateTracingInstrumenter.cs (1)
516var targetSymbol = original.Locals.FirstOrDefault(l => l.SynthesizedKind == SynthesizedLocalKind.UserDefined);
Lowering\LocalRewriter\LocalRewriter_UsingStatement.cs (5)
51SyntaxToken awaitKeyword = node.Syntax.Kind() == SyntaxKind.UsingStatement ? ((UsingStatementSyntax)node.Syntax).AwaitKeyword : default; 68SyntaxToken awaitKeyword) 210SyntaxToken awaitKeywordOpt, 284SyntaxToken awaitKeywordOpt, 440SyntaxToken awaitKeyword)
Parser\Blender.cs (2)
133var token = oldTree.FindToken(start, findInsideTrivia: false); 162var token = oldTree.FindToken(start, findInsideTrivia: false);
Parser\Blender.Cursor.cs (1)
149var redToken = new CodeAnalysis.SyntaxToken(node.Parent, greenToken, node.Position, _indexInParent);
Parser\Lexer.cs (2)
326return new SyntaxTriviaList(default(Microsoft.CodeAnalysis.SyntaxToken), 334return new SyntaxTriviaList(default(Microsoft.CodeAnalysis.SyntaxToken),
SymbolDisplay\SymbolDisplayVisitor_Minimal.cs (5)
80var firstSymbol = symbols.OfType<ISymbol>().FirstOrDefault(); 193var token = semanticModel.SyntaxTree.GetRoot().FindToken(position); 247var token = location.SourceTree.GetRoot().FindToken(PositionOpt); 270private static QueryBodySyntax? GetQueryBody(SyntaxToken token) => 293var token = SyntaxFactory.ParseToken(nameWithoutAttributeSuffix);
Symbols\AliasSymbol.cs (1)
73internal static AliasSymbol CreateCustomDebugInfoAlias(NamespaceOrTypeSymbol targetSymbol, SyntaxToken aliasToken, Symbol containingSymbol, bool isExtern)
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (1)
41SyntaxToken modifier = modifiers[i];
Symbols\LexicalSortKey.cs (1)
90public LexicalSortKey(SyntaxToken token, CSharpCompilation compilation)
Symbols\LocalSymbol.cs (1)
57internal abstract SyntaxToken IdentifierToken
Symbols\Metadata\PE\PEParameterSymbol.cs (1)
895var param = parameters.FirstOrDefault(static (p, name) => string.Equals(p.Name, name, StringComparison.Ordinal), name);
Symbols\RangeVariableSymbol.cs (1)
62SyntaxToken token = _location.SourceTree.GetRoot().FindToken(_location.SourceSpan.Start);
Symbols\Source\AttributeLocation.cs (1)
103internal static AttributeLocation ToAttributeLocation(this SyntaxToken token)
Symbols\Source\LocalFunctionSymbol.cs (3)
189SyntaxToken arglistToken; 319var firstParam = Syntax.ParameterList.Parameters.FirstOrDefault(); 332public SyntaxToken NameToken => Syntax.Identifier;
Symbols\Source\ModifierUtils.cs (5)
28var readonlyToken = modifiers.FirstOrDefault(SyntaxKind.ReadOnlyKeyword); 118internal static void CheckScopedModifierAvailability(CSharpSyntaxNode syntax, SyntaxToken modifier, BindingDiagnosticBag diagnostics) 133var partialToken = modifierTokens.Value.FirstOrDefault(SyntaxKind.PartialKeyword); 393SyntaxToken modifier = modifiers[i]; 441SyntaxToken modifierToken,
Symbols\Source\ParameterHelpers.cs (28)
24out SyntaxToken arglistToken, 43SyntaxToken paramsKeyword, SyntaxToken thisKeyword, bool addRefReadOnlyModifier, 83SyntaxToken paramsKeyword, SyntaxToken thisKeyword, bool addRefReadOnlyModifier, 117out SyntaxToken arglistToken, 124Func<Binder, TOwningSymbol, TypeWithAnnotations, TParameterSyntax, RefKind, int, SyntaxToken, SyntaxToken, bool, ScopedKind, BindingDiagnosticBag, TParameterSymbol> parameterCreationFunc, 131arglistToken = default(SyntaxToken); 144var refKind = GetModifiers(parameterSyntax.Modifiers, out SyntaxToken refnessKeyword, out SyntaxToken paramsKeyword, out SyntaxToken thisKeyword, out ScopedKind scope); 436SyntaxToken? previousModifier = null; 630static void addERR_DupParamMod(BindingDiagnosticBag diagnostics, SyntaxToken modifier) 635static void addERR_BadParameterModifiers(BindingDiagnosticBag diagnostics, SyntaxToken modifier, SyntaxKind otherModifierKind) 640static void addERR_ParamsCantBeWithModifier(BindingDiagnosticBag diagnostics, SyntaxToken modifier, SyntaxKind otherModifierKind) 655SyntaxToken thisKeyword, 656SyntaxToken paramsKeyword, 740var refKind = GetModifiers(parameterSyntax.Modifiers, out SyntaxToken refnessKeyword, out SyntaxToken paramsKeyword, out SyntaxToken thisKeyword, out _); 921internal static RefKind GetModifiers(SyntaxTokenList modifiers, out SyntaxToken refnessKeyword, out SyntaxToken paramsKeyword, out SyntaxToken thisKeyword, out ScopedKind scope) 926refnessKeyword = default(SyntaxToken); 927paramsKeyword = default(SyntaxToken); 928thisKeyword = default(SyntaxToken); 930foreach (var modifier in modifiers)
Symbols\Source\SourceComplexParameterSymbol.cs (1)
1355var parameter = containingSymbolParameters.FirstOrDefault(static (param, name) => string.Equals(param.Name, name, StringComparison.Ordinal), name);
Symbols\Source\SourceCustomEventSymbol.cs (1)
32SyntaxToken nameToken = syntax.Identifier;
Symbols\Source\SourceDelegateMethodSymbol.cs (1)
264SyntaxToken arglistToken;
Symbols\Source\SourceEventSymbol.cs (1)
45SyntaxToken nameTokenSyntax,
Symbols\Source\SourceLabelSymbol.cs (2)
59var tk = _identifierNodeOrToken.AsToken(); 73_identifierNodeOrToken = default(SyntaxToken);
Symbols\Source\SourceLocalSymbol.cs (11)
33private readonly SyntaxToken _identifierToken; 47SyntaxToken identifierToken, 112SyntaxToken identifierToken, 140SyntaxToken identifierToken, 160SyntaxToken identifierToken, 206SyntaxToken identifierToken, 278internal override SyntaxToken IdentifierToken 528SyntaxToken identifierToken, 629SyntaxToken identifierToken, 670SyntaxToken identifierToken, 734SyntaxToken identifierToken,
Symbols\Source\SourceMemberContainerSymbol.cs (2)
1861SyntaxToken? identifier = syntaxRef.GetSyntax() switch 2825foreach (var m in modifiers) { if (m.IsKind(modifier)) return true; };
Symbols\Source\SourceMemberFieldSymbol.cs (5)
72SyntaxToken constToken = default(SyntaxToken); 73foreach (var modifier in ModifiersTokenList) 165internal static DeclarationModifiers MakeModifiers(NamedTypeSymbol containingType, SyntaxToken firstIdentifier, SyntaxTokenList modifiers, bool isRefField, BindingDiagnosticBag diagnostics, out bool modifierErrors) 196foreach (var modifier in modifiers)
Symbols\Source\SourceMethodSymbolWithAttributes.cs (3)
1079var referencedToken = root.FindToken(position); 1237var suffixMatch = syntaxTrees.FirstOrDefault(static (tree, attributeFilePathWithForwardSlashes) 1292var referencedToken = root.FindToken(referencedPosition);
Symbols\Source\SourceNamedTypeSymbol.cs (2)
109private static SyntaxToken GetName(CSharpSyntaxNode node) 124return default(SyntaxToken);
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (1)
624var name = GetName(bases.Parent);
Symbols\Source\SourceNamespaceSymbol.AliasesAndUsings.cs (5)
662SyntaxToken identifier = usingDirective.Alias.Name.Identifier; 670if (usingDirective.StaticKeyword != default(SyntaxToken)) 773if (usingDirective.StaticKeyword != default(SyntaxToken)) 791if (usingDirective.StaticKeyword == default(SyntaxToken)) 798if (usingDirective.GlobalKeyword != default(SyntaxToken) && importedType.HasFileLocalTypes())
Symbols\Source\SourceOrdinaryMethodSymbol.cs (1)
248var thisKeyword = syntax.ParameterList.Parameters[0].Modifiers.FirstOrDefault(SyntaxKind.ThisKeyword);
Symbols\Source\SourceParameterSymbol.cs (1)
36SyntaxToken identifier,
Symbols\Source\SourcePropertySymbol.cs (2)
612SyntaxToken arglistToken; 632SyntaxToken paramNameToken = parameterSyntax.Identifier;
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (1)
227SyntaxToken arglistToken;
Symbols\Symbol.cs (1)
513SyntaxToken token = location.SourceTree.GetRoot().FindToken(location.SourceSpan.Start);
Symbols\Synthesized\Records\SynthesizedPrimaryConstructor.cs (1)
183SyntaxToken target = attributeDeclarationSyntax.Target.Identifier;
Symbols\Synthesized\SynthesizedLocal.cs (2)
123internal sealed override SyntaxToken IdentifierToken 125get { return default(SyntaxToken); }
Symbols\Synthesized\TypeSubstitutedLocalSymbol.cs (1)
85internal override SyntaxToken IdentifierToken
Symbols\UpdatedContainingSymbolLocal.cs (1)
88internal override SyntaxToken IdentifierToken => _underlyingLocal.IdentifierToken;
Syntax\AnonymousFunctionExpressionSyntax.cs (5)
22public abstract SyntaxToken AsyncKeyword { get; } 24public AnonymousFunctionExpressionSyntax WithAsyncKeyword(SyntaxToken asyncKeyword) 27internal abstract AnonymousFunctionExpressionSyntax WithAsyncKeywordCore(SyntaxToken asyncKeyword); 33private protected SyntaxTokenList UpdateAsyncKeyword(SyntaxToken asyncKeyword) 47var existingAsync = AsyncKeyword;
Syntax\AnonymousMethodExpressionSyntax.cs (9)
19public AnonymousMethodExpressionSyntax Update(SyntaxToken asyncKeyword, SyntaxToken delegateKeyword, ParameterListSyntax parameterList, CSharpSyntaxNode body) 24public override SyntaxToken AsyncKeyword 27internal override AnonymousFunctionExpressionSyntax WithAsyncKeywordCore(SyntaxToken asyncKeyword) => WithAsyncKeyword(asyncKeyword); 28public new AnonymousMethodExpressionSyntax WithAsyncKeyword(SyntaxToken asyncKeyword) 31public AnonymousMethodExpressionSyntax Update(SyntaxToken asyncKeyword, SyntaxToken delegateKeyword, ParameterListSyntax parameterList, BlockSyntax block, ExpressionSyntax expressionBody) 49public static AnonymousMethodExpressionSyntax AnonymousMethodExpression(SyntaxToken asyncKeyword, SyntaxToken delegateKeyword, ParameterListSyntax parameterList, BlockSyntax block, ExpressionSyntax expressionBody)
Syntax\ArgumentSyntax.cs (2)
15public SyntaxToken RefOrOutKeyword 24public ArgumentSyntax WithRefOrOutKeyword(SyntaxToken refOrOutKeyword)
Syntax\BlockSyntax.cs (4)
11public BlockSyntax Update(SyntaxToken openBraceToken, SyntaxList<StatementSyntax> statements, SyntaxToken closeBraceToken) 20public static BlockSyntax Block(SyntaxToken openBraceToken, SyntaxList<StatementSyntax> statements, SyntaxToken closeBraceToken)
Syntax\BreakStatementSyntax.cs (4)
11public BreakStatementSyntax Update(SyntaxToken breakKeyword, SyntaxToken semicolonToken) 20public static BreakStatementSyntax BreakStatement(SyntaxToken breakKeyword, SyntaxToken semicolonToken)
Syntax\CheckedStatementSyntax.cs (2)
11public CheckedStatementSyntax Update(SyntaxToken keyword, BlockSyntax block) 20public static CheckedStatementSyntax CheckedStatement(SyntaxKind kind, SyntaxToken keyword, BlockSyntax block)
Syntax\ClassDeclarationSyntax.cs (5)
9public ClassDeclarationSyntax Update(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken keyword, SyntaxToken identifier, TypeParameterListSyntax? typeParameterList, BaseListSyntax? baseList, SyntaxList<TypeParameterConstraintClauseSyntax> constraintClauses, SyntaxToken openBraceToken, SyntaxList<MemberDeclarationSyntax> members, SyntaxToken closeBraceToken, SyntaxToken semicolonToken)
Syntax\ClassOrStructConstraintSyntax.cs (1)
9public ClassOrStructConstraintSyntax Update(SyntaxToken classOrStructKeyword)
Syntax\CompilationUnitSyntax.cs (1)
56var firstToken = this.GetFirstToken(includeZeroWidth: true);
Syntax\ConstructorDeclarationSyntax.cs (10)
16SyntaxToken identifier, 20SyntaxToken semicolonToken) 40SyntaxToken identifier, 52default(SyntaxToken)); 57SyntaxToken identifier, 61SyntaxToken semicolonToken) 75SyntaxToken identifier, 87default(SyntaxToken)); 92SyntaxToken identifier, 96SyntaxToken semicolonToken)
Syntax\ContinueStatementSyntax.cs (4)
11public ContinueStatementSyntax Update(SyntaxToken continueKeyword, SyntaxToken semicolonToken) 20public static ContinueStatementSyntax ContinueStatement(SyntaxToken continueKeyword, SyntaxToken semicolonToken)
Syntax\ConversionOperatorDeclarationSyntax.cs (6)
12SyntaxToken implicitOrExplicitKeyword, 13SyntaxToken operatorKeyword, 18SyntaxToken semicolonToken) 36SyntaxToken implicitOrExplicitKeyword, 38SyntaxToken operatorKeyword, 43SyntaxToken semicolonToken)
Syntax\ConversionOperatorMemberCrefSyntax.cs (2)
9public ConversionOperatorMemberCrefSyntax Update(SyntaxToken implicitOrExplicitKeyword, SyntaxToken operatorKeyword, TypeSyntax type, CrefParameterListSyntax? parameters)
Syntax\CrefParameterSyntax.cs (4)
15public SyntaxToken RefOrOutKeyword => this.RefKindKeyword; 18/// Pre C# 7.2 back-compat overload, which simply calls the replacement method <see cref="Update(SyntaxToken, TypeSyntax)"/>. 21public CrefParameterSyntax WithRefOrOutKeyword(SyntaxToken refOrOutKeyword) 26public CrefParameterSyntax Update(SyntaxToken refKindKeyword, TypeSyntax type)
Syntax\CSharpLineDirectiveMap.cs (4)
50SyntaxToken lineToken = directive.Line; 108static bool tryGetNumericLiteralValue(in SyntaxToken token, out int value, bool oneBased) 128static bool tryGetStringLiteralValue(in SyntaxToken token, out string? value) 140static bool tryGetOptionalCharacterOffset(in SyntaxToken token, out int? value)
Syntax\CSharpSyntaxNode.cs (20)
168var firstToken = this.GetFirstToken(includeZeroWidth: true); 177var lastToken = this.GetLastToken(includeZeroWidth: true); 246var token = child.AsToken(); 286var token = child.AsToken(); 321public new SyntaxToken GetFirstToken(bool includeZeroWidth = false, bool includeSkipped = false, bool includeDirectives = false, bool includeDocumentationComments = false) 334internal SyntaxToken GetFirstToken(Func<SyntaxToken, bool>? predicate, Func<SyntaxTrivia, bool>? stepInto = null) 349public new SyntaxToken GetLastToken(bool includeZeroWidth = false, bool includeSkipped = false, bool includeDirectives = false, bool includeDocumentationComments = false) 364public new SyntaxToken FindToken(int position, bool findInsideTrivia = false) 379internal SyntaxToken FindTokenIncludingCrefAndNameAttributes(int position) 381SyntaxToken nonTriviaToken = this.FindToken(position, findInsideTrivia: false); 391SyntaxToken triviaToken = ((CSharpSyntaxNode)trivia.GetStructure()!).FindTokenInternal(position); 467IEnumerable<SyntaxToken>? tokens = null, 468Func<SyntaxToken, SyntaxToken, SyntaxToken>? computeReplacementToken = null, 485protected internal override SyntaxNode ReplaceTokenInListCore(SyntaxToken originalToken, IEnumerable<SyntaxToken> newTokens) 490protected internal override SyntaxNode InsertTokensInListCore(SyntaxToken originalToken, IEnumerable<SyntaxToken> newTokens, bool insertBefore)
Syntax\CSharpSyntaxRewriter.cs (8)
53public virtual SyntaxToken VisitToken(SyntaxToken token) 184var separator = list.GetSeparator(i); 185var visitedSeparator = this.VisitListSeparator(separator); 246public virtual SyntaxToken VisitListSeparator(SyntaxToken separator) 257foreach (var item in list) 260var visited = this.VisitToken(item);
Syntax\CSharpSyntaxTree.cs (1)
815public override IEnumerable<Diagnostic> GetDiagnostics(SyntaxToken token)
Syntax\CSharpSyntaxWalker.cs (4)
9/// visiting each CSharpSyntaxNode and its child SyntaxNodes and <see cref="SyntaxToken"/>s in depth-first order. 64public virtual void VisitToken(SyntaxToken token) 73public virtual void VisitLeadingTrivia(SyntaxToken token) 84public virtual void VisitTrailingTrivia(SyntaxToken token)
Syntax\DestructorDeclarationSyntax.cs (13)
16SyntaxToken tildeToken, 17SyntaxToken identifier, 20SyntaxToken semicolonToken) 40SyntaxToken identifier, 51default(SyntaxToken)); 56SyntaxToken tildeToken, 57SyntaxToken identifier, 60SyntaxToken semicolonToken) 74SyntaxToken identifier, 85default(SyntaxToken)); 90SyntaxToken tildeToken, 91SyntaxToken identifier, 94SyntaxToken semicolonToken)
Syntax\DirectiveTriviaSyntax.cs (6)
17public SyntaxToken DirectiveNameToken 69var token = (SyntaxToken)this.ParentTrivia.Token; 100var token = (SyntaxToken)this.ParentTrivia.Token; 357private static readonly Func<SyntaxToken, bool> s_hasDirectivesFunction = t => t.ContainsDirectives;
Syntax\DoStatementSyntax.cs (10)
11public DoStatementSyntax Update(SyntaxToken doKeyword, StatementSyntax statement, SyntaxToken whileKeyword, SyntaxToken openParenToken, ExpressionSyntax condition, SyntaxToken closeParenToken, SyntaxToken semicolonToken) 20public static DoStatementSyntax DoStatement(SyntaxToken doKeyword, StatementSyntax statement, SyntaxToken whileKeyword, SyntaxToken openParenToken, ExpressionSyntax condition, SyntaxToken closeParenToken, SyntaxToken semicolonToken)
Syntax\EmptyStatementSyntax.cs (2)
11public EmptyStatementSyntax Update(SyntaxToken semicolonToken) 20public static EmptyStatementSyntax EmptyStatement(SyntaxToken semicolonToken)
Syntax\EnumMemberDeclarationSyntax.cs (1)
9public EnumMemberDeclarationSyntax Update(SyntaxList<AttributeListSyntax> attributeLists, SyntaxToken identifier, EqualsValueClauseSyntax equalsValue)
Syntax\EventDeclarationSyntax.cs (5)
13public EventDeclarationSyntax Update(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken eventKeyword, TypeSyntax type, ExplicitInterfaceSpecifierSyntax explicitInterfaceSpecifier, SyntaxToken identifier, AccessorListSyntax accessorList) 18public EventDeclarationSyntax Update(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken eventKeyword, TypeSyntax type, ExplicitInterfaceSpecifierSyntax explicitInterfaceSpecifier, SyntaxToken identifier, SyntaxToken semicolonToken)
Syntax\ExpressionStatementSyntax.cs (2)
28public ExpressionStatementSyntax Update(ExpressionSyntax expression, SyntaxToken semicolonToken) 37public static ExpressionStatementSyntax ExpressionStatement(ExpressionSyntax expression, SyntaxToken semicolonToken)
Syntax\FixedStatementSyntax.cs (6)
11public FixedStatementSyntax Update(SyntaxToken fixedKeyword, SyntaxToken openParenToken, VariableDeclarationSyntax declaration, SyntaxToken closeParenToken, StatementSyntax statement) 20public static FixedStatementSyntax FixedStatement(SyntaxToken fixedKeyword, SyntaxToken openParenToken, VariableDeclarationSyntax declaration, SyntaxToken closeParenToken, StatementSyntax statement)
Syntax\ForEachStatementSyntax.cs (22)
11public ForEachStatementSyntax Update(SyntaxToken forEachKeyword, SyntaxToken openParenToken, TypeSyntax type, SyntaxToken identifier, SyntaxToken inKeyword, ExpressionSyntax expression, SyntaxToken closeParenToken, StatementSyntax statement) 14public ForEachStatementSyntax Update(SyntaxToken awaitKeyword, SyntaxToken forEachKeyword, SyntaxToken openParenToken, TypeSyntax type, SyntaxToken identifier, SyntaxToken inKeyword, ExpressionSyntax expression, SyntaxToken closeParenToken, StatementSyntax statement) 23public static ForEachStatementSyntax ForEachStatement(SyntaxToken forEachKeyword, SyntaxToken openParenToken, TypeSyntax type, SyntaxToken identifier, SyntaxToken inKeyword, ExpressionSyntax expression, SyntaxToken closeParenToken, StatementSyntax statement) 26public static ForEachStatementSyntax ForEachStatement(SyntaxToken awaitKeyword, SyntaxToken forEachKeyword, SyntaxToken openParenToken, TypeSyntax type, SyntaxToken identifier, SyntaxToken inKeyword, ExpressionSyntax expression, SyntaxToken closeParenToken, StatementSyntax statement)
Syntax\ForEachVariableStatementSyntax.cs (18)
11public ForEachVariableStatementSyntax Update(SyntaxToken forEachKeyword, SyntaxToken openParenToken, ExpressionSyntax variable, SyntaxToken inKeyword, ExpressionSyntax expression, SyntaxToken closeParenToken, StatementSyntax statement) 14public ForEachVariableStatementSyntax Update(SyntaxToken awaitKeyword, SyntaxToken forEachKeyword, SyntaxToken openParenToken, ExpressionSyntax variable, SyntaxToken inKeyword, ExpressionSyntax expression, SyntaxToken closeParenToken, StatementSyntax statement) 23public static ForEachVariableStatementSyntax ForEachVariableStatement(SyntaxToken forEachKeyword, SyntaxToken openParenToken, ExpressionSyntax variable, SyntaxToken inKeyword, ExpressionSyntax expression, SyntaxToken closeParenToken, StatementSyntax statement) 26public static ForEachVariableStatementSyntax ForEachVariableStatement(SyntaxToken awaitKeyword, SyntaxToken forEachKeyword, SyntaxToken openParenToken, ExpressionSyntax variable, SyntaxToken inKeyword, ExpressionSyntax expression, SyntaxToken closeParenToken, StatementSyntax statement)
Syntax\ForStatementSyntax.cs (10)
11public ForStatementSyntax Update(SyntaxToken forKeyword, SyntaxToken openParenToken, VariableDeclarationSyntax? declaration, SeparatedSyntaxList<ExpressionSyntax> initializers, SyntaxToken firstSemicolonToken, ExpressionSyntax? condition, SyntaxToken secondSemicolonToken, SeparatedSyntaxList<ExpressionSyntax> incrementors, SyntaxToken closeParenToken, StatementSyntax statement) 23public static ForStatementSyntax ForStatement(SyntaxToken forKeyword, SyntaxToken openParenToken, VariableDeclarationSyntax? declaration, SeparatedSyntaxList<ExpressionSyntax> initializers, SyntaxToken firstSemicolonToken, ExpressionSyntax? condition, SyntaxToken secondSemicolonToken, SeparatedSyntaxList<ExpressionSyntax> incrementors, SyntaxToken closeParenToken, StatementSyntax statement)
Syntax\GotoStatementSyntax.cs (7)
11public GotoStatementSyntax Update(SyntaxToken gotoKeyword, SyntaxToken caseOrDefaultKeyword, ExpressionSyntax expression, SyntaxToken semicolonToken) 20public static GotoStatementSyntax GotoStatement(SyntaxKind kind, SyntaxToken caseOrDefaultKeyword, ExpressionSyntax expression) 23public static GotoStatementSyntax GotoStatement(SyntaxKind kind, SyntaxToken gotoKeyword, SyntaxToken caseOrDefaultKeyword, ExpressionSyntax expression, SyntaxToken semicolonToken)
Syntax\IfStatementSyntax.cs (6)
11public IfStatementSyntax Update(SyntaxToken ifKeyword, SyntaxToken openParenToken, ExpressionSyntax condition, SyntaxToken closeParenToken, StatementSyntax statement, ElseClauseSyntax? @else) 23public static IfStatementSyntax IfStatement(SyntaxToken ifKeyword, SyntaxToken openParenToken, ExpressionSyntax condition, SyntaxToken closeParenToken, StatementSyntax statement, ElseClauseSyntax? @else)
Syntax\IndexerDeclarationSyntax.cs (2)
15public SyntaxToken Semicolon 25public IndexerDeclarationSyntax WithSemicolon(SyntaxToken semicolon)
Syntax\InterfaceDeclarationSyntax.cs (5)
9public InterfaceDeclarationSyntax Update(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken keyword, SyntaxToken identifier, TypeParameterListSyntax? typeParameterList, BaseListSyntax? baseList, SyntaxList<TypeParameterConstraintClauseSyntax> constraintClauses, SyntaxToken openBraceToken, SyntaxList<MemberDeclarationSyntax> members, SyntaxToken closeBraceToken, SyntaxToken semicolonToken)
Syntax\InternalSyntax\CSharpSyntaxNode.cs (1)
240public sealed override CodeAnalysis.SyntaxToken CreateSeparator(SyntaxNode element)
Syntax\InterpolatedStringExpressionSyntax.cs (2)
11public static InterpolatedStringExpressionSyntax InterpolatedStringExpression(SyntaxToken stringStartToken) 14public static InterpolatedStringExpressionSyntax InterpolatedStringExpression(SyntaxToken stringStartToken, SyntaxList<InterpolatedStringContentSyntax> contents)
Syntax\LabeledStatementSyntax.cs (4)
11public LabeledStatementSyntax Update(SyntaxToken identifier, SyntaxToken colonToken, StatementSyntax statement) 20public static LabeledStatementSyntax LabeledStatement(SyntaxToken identifier, SyntaxToken colonToken, StatementSyntax statement)
Syntax\LambdaExpressionSyntax.cs (1)
17public new LambdaExpressionSyntax WithAsyncKeyword(SyntaxToken asyncKeyword)
Syntax\LambdaUtilities.cs (1)
225SyntaxToken sourceIdentifier;
Syntax\LocalDeclarationStatementSyntax.cs (8)
11public LocalDeclarationStatementSyntax Update(SyntaxTokenList modifiers, VariableDeclarationSyntax declaration, SyntaxToken semicolonToken) 14public LocalDeclarationStatementSyntax Update(SyntaxToken awaitKeyword, SyntaxToken usingKeyword, SyntaxTokenList modifiers, VariableDeclarationSyntax declaration, SyntaxToken semicolonToken) 23public static LocalDeclarationStatementSyntax LocalDeclarationStatement(SyntaxTokenList modifiers, VariableDeclarationSyntax declaration, SyntaxToken semicolonToken) 26public static LocalDeclarationStatementSyntax LocalDeclarationStatement(SyntaxToken awaitKeyword, SyntaxToken usingKeyword, SyntaxTokenList modifiers, VariableDeclarationSyntax declaration, SyntaxToken semicolonToken)
Syntax\LocalFunctionStatementSyntax.cs (5)
12public LocalFunctionStatementSyntax Update(SyntaxTokenList modifiers, TypeSyntax returnType, SyntaxToken identifier, TypeParameterListSyntax typeParameterList, ParameterListSyntax parameterList, SyntaxList<TypeParameterConstraintClauseSyntax> constraintClauses, BlockSyntax body, ArrowExpressionClauseSyntax expressionBody, SyntaxToken semicolonToken) 24public static LocalFunctionStatementSyntax LocalFunctionStatement(SyntaxTokenList modifiers, TypeSyntax returnType, SyntaxToken identifier, TypeParameterListSyntax? typeParameterList, ParameterListSyntax parameterList, SyntaxList<TypeParameterConstraintClauseSyntax> constraintClauses, BlockSyntax? body, ArrowExpressionClauseSyntax? expressionBody) 30public static LocalFunctionStatementSyntax LocalFunctionStatement(SyntaxTokenList modifiers, TypeSyntax returnType, SyntaxToken identifier, TypeParameterListSyntax? typeParameterList, ParameterListSyntax parameterList, SyntaxList<TypeParameterConstraintClauseSyntax> constraintClauses, BlockSyntax? body, ArrowExpressionClauseSyntax? expressionBody, SyntaxToken semicolonToken)
Syntax\LockStatementSyntax.cs (6)
11public LockStatementSyntax Update(SyntaxToken lockKeyword, SyntaxToken openParenToken, ExpressionSyntax expression, SyntaxToken closeParenToken, StatementSyntax statement) 20public static LockStatementSyntax LockStatement(SyntaxToken lockKeyword, SyntaxToken openParenToken, ExpressionSyntax expression, SyntaxToken closeParenToken, StatementSyntax statement)
Syntax\LookupPosition.cs (18)
31SyntaxToken semicolonToken) 37private static bool IsInBody(int position, BlockSyntax? blockOpt, ArrowExpressionClauseSyntax? exprOpt, SyntaxToken semiOpt) 80internal static bool IsBetweenTokens(int position, SyntaxToken firstIncluded, SyntaxToken firstExcluded) 88private static bool IsBeforeToken(int position, CSharpSyntaxNode node, SyntaxToken firstExcluded) 93private static bool IsBeforeToken(int position, SyntaxToken firstExcluded) 145SyntaxToken lastToken = body == null ? accessorDecl.SemicolonToken : body.CloseBraceToken; 186var nextToken = (SyntaxToken)SyntaxNavigator.Instance.GetNextToken(constructorDecl, predicate: null, stepInto: null); 273SyntaxToken firstIncludedToken = GetFirstIncludedToken(statement); 274return firstIncludedToken != default(SyntaxToken) && 310private static SyntaxToken GetFirstIncludedToken(StatementSyntax statement) 330return default(SyntaxToken); //The caller will have to check for this. 372internal static SyntaxToken GetFirstExcludedToken(StatementSyntax statement) 445if (localFunctionStmt.SemicolonToken != default(SyntaxToken)) 453private static SyntaxToken GetFirstExcludedIfStatementToken(IfStatementSyntax ifStmt) 477SyntaxToken firstIncluded; 509(SyntaxToken)SyntaxNavigator.Instance.GetNextToken(body, predicate: null, stepInto: null);
Syntax\MethodDeclarationSyntax.cs (2)
32SyntaxToken identifier, 37SyntaxToken semicolonToken)
Syntax\NamespaceDeclarationSyntax.cs (4)
21public NamespaceDeclarationSyntax Update(SyntaxToken namespaceKeyword, NameSyntax name, SyntaxToken openBraceToken, SyntaxList<ExternAliasDirectiveSyntax> externs, SyntaxList<UsingDirectiveSyntax> usings, SyntaxList<MemberDeclarationSyntax> members, SyntaxToken closeBraceToken, SyntaxToken semicolonToken)
Syntax\OperatorDeclarationSyntax.cs (6)
13SyntaxToken operatorKeyword, 14SyntaxToken operatorToken, 18SyntaxToken semicolonToken) 38SyntaxToken operatorKeyword, 39SyntaxToken operatorToken, 43SyntaxToken semicolonToken)
Syntax\OperatorMemberCrefSyntax.cs (2)
9public OperatorMemberCrefSyntax Update(SyntaxToken operatorKeyword, SyntaxToken operatorToken, CrefParameterListSyntax? parameters)
Syntax\ParenthesizedLambdaExpressionSyntax.cs (12)
16public ParenthesizedLambdaExpressionSyntax Update(SyntaxToken asyncKeyword, ParameterListSyntax parameterList, SyntaxToken arrowToken, CSharpSyntaxNode body) 21public override SyntaxToken AsyncKeyword 24internal override AnonymousFunctionExpressionSyntax WithAsyncKeywordCore(SyntaxToken asyncKeyword) 27public new ParenthesizedLambdaExpressionSyntax WithAsyncKeyword(SyntaxToken asyncKeyword) 30public ParenthesizedLambdaExpressionSyntax Update(SyntaxToken asyncKeyword, ParameterListSyntax parameterList, SyntaxToken arrowToken, BlockSyntax? block, ExpressionSyntax? expressionBody) 33public ParenthesizedLambdaExpressionSyntax Update(SyntaxTokenList modifiers, ParameterListSyntax parameterList, SyntaxToken arrowToken, BlockSyntax? block, ExpressionSyntax? expressionBody) 36public ParenthesizedLambdaExpressionSyntax Update(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, ParameterListSyntax parameterList, SyntaxToken arrowToken, BlockSyntax? block, ExpressionSyntax? expressionBody) 45public static ParenthesizedLambdaExpressionSyntax ParenthesizedLambdaExpression(SyntaxToken asyncKeyword, ParameterListSyntax parameterList, SyntaxToken arrowToken, BlockSyntax? block, ExpressionSyntax? expressionBody) 51public static ParenthesizedLambdaExpressionSyntax ParenthesizedLambdaExpression(SyntaxTokenList modifiers, ParameterListSyntax parameterList, SyntaxToken arrowToken, BlockSyntax? block, ExpressionSyntax? expressionBody)
Syntax\PropertyDeclarationSyntax.cs (5)
15public SyntaxToken Semicolon 25public PropertyDeclarationSyntax WithSemicolon(SyntaxToken semicolon) 34public AccessorDeclarationSyntax Update(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken keyword, BlockSyntax? body, SyntaxToken semicolonToken) 46return SyntaxFactory.AccessorDeclaration(kind, default(SyntaxList<AttributeListSyntax>), default(SyntaxTokenList), SyntaxFactory.Token(GetAccessorDeclarationKeywordKind(kind)), body, expressionBody: null, default(SyntaxToken));
Syntax\RecordDeclarationSyntax.cs (18)
13public RecordDeclarationSyntax Update(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken keyword, SyntaxToken identifier, 15SyntaxToken openBraceToken, SyntaxList<MemberDeclarationSyntax> members, SyntaxToken closeBraceToken, SyntaxToken semicolonToken) 27public static RecordDeclarationSyntax RecordDeclaration(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken keyword, SyntaxToken identifier, 29SyntaxToken openBraceToken, SyntaxList<MemberDeclarationSyntax> members, SyntaxToken closeBraceToken, SyntaxToken semicolonToken) 35public static RecordDeclarationSyntax RecordDeclaration(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken keyword, SyntaxToken identifier, 38var semicolonToken = members.Count == 0 ? Token(SyntaxKind.SemicolonToken) : default; 39var openBraceToken = members.Count == 0 ? default : Token(SyntaxKind.OpenBraceToken); 40var closeBraceToken = members.Count == 0 ? default : Token(SyntaxKind.CloseBraceToken); 46public static RecordDeclarationSyntax RecordDeclaration(SyntaxToken keyword, string identifier) 51public static RecordDeclarationSyntax RecordDeclaration(SyntaxToken keyword, SyntaxToken identifier)
Syntax\RefTypeSyntax.cs (2)
11public RefTypeSyntax Update(SyntaxToken refKeyword, TypeSyntax type) 23public static RefTypeSyntax RefType(SyntaxToken refKeyword, TypeSyntax type)
Syntax\ReturnStatementSyntax.cs (4)
11public ReturnStatementSyntax Update(SyntaxToken returnKeyword, ExpressionSyntax? expression, SyntaxToken semicolonToken) 20public static ReturnStatementSyntax ReturnStatement(SyntaxToken returnKeyword, ExpressionSyntax? expression, SyntaxToken semicolonToken)
Syntax\SimpleLambdaExpressionSyntax.cs (11)
16public SimpleLambdaExpressionSyntax Update(SyntaxToken asyncKeyword, ParameterSyntax parameter, SyntaxToken arrowToken, CSharpSyntaxNode body) 21public override SyntaxToken AsyncKeyword 24internal override AnonymousFunctionExpressionSyntax WithAsyncKeywordCore(SyntaxToken asyncKeyword) 27public new SimpleLambdaExpressionSyntax WithAsyncKeyword(SyntaxToken asyncKeyword) 30public SimpleLambdaExpressionSyntax Update(SyntaxToken asyncKeyword, ParameterSyntax parameter, SyntaxToken arrowToken, BlockSyntax? block, ExpressionSyntax? expressionBody) 33public SimpleLambdaExpressionSyntax Update(SyntaxTokenList modifiers, ParameterSyntax parameter, SyntaxToken arrowToken, BlockSyntax? block, ExpressionSyntax? expressionBody) 42public static SimpleLambdaExpressionSyntax SimpleLambdaExpression(SyntaxToken asyncKeyword, ParameterSyntax parameter, SyntaxToken arrowToken, BlockSyntax? block, ExpressionSyntax? expressionBody) 48public static SimpleLambdaExpressionSyntax SimpleLambdaExpression(SyntaxTokenList modifiers, ParameterSyntax parameter, SyntaxToken arrowToken, BlockSyntax? block, ExpressionSyntax? expressionBody)
Syntax\StackAllocArrayCreationExpressionSyntax.cs (2)
11public StackAllocArrayCreationExpressionSyntax Update(SyntaxToken stackAllocKeyword, TypeSyntax type) 20public static StackAllocArrayCreationExpressionSyntax StackAllocArrayCreationExpression(SyntaxToken stackAllocKeyword, TypeSyntax type)
Syntax\StructDeclarationSyntax.cs (5)
9public StructDeclarationSyntax Update(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken keyword, SyntaxToken identifier, TypeParameterListSyntax? typeParameterList, BaseListSyntax? baseList, SyntaxList<TypeParameterConstraintClauseSyntax> constraintClauses, SyntaxToken openBraceToken, SyntaxList<MemberDeclarationSyntax> members, SyntaxToken closeBraceToken, SyntaxToken semicolonToken)
Syntax\SwitchStatementSyntax.cs (10)
11public SwitchStatementSyntax Update(SyntaxToken switchKeyword, SyntaxToken openParenToken, ExpressionSyntax expression, SyntaxToken closeParenToken, SyntaxToken openBraceToken, SyntaxList<SwitchSectionSyntax> sections, SyntaxToken closeBraceToken) 20public static SwitchStatementSyntax SwitchStatement(SyntaxToken switchKeyword, SyntaxToken openParenToken, ExpressionSyntax expression, SyntaxToken closeParenToken, SyntaxToken openBraceToken, SyntaxList<SwitchSectionSyntax> sections, SyntaxToken closeBraceToken)
Syntax\SyntaxEquivalence.cs (2)
51public static bool AreEquivalent(SyntaxToken before, SyntaxToken after)
Syntax\SyntaxExtensions.cs (12)
67public static SyntaxToken NormalizeWhitespace(this SyntaxToken token, string indentation, bool elasticTrivia) 75internal static SyntaxToken Identifier(this DeclarationExpressionSyntax self) 89public static SyntaxToken NormalizeWhitespace(this SyntaxToken token, 189public static SimpleNameSyntax WithIdentifier(this SimpleNameSyntax simpleName, SyntaxToken identifier) 272SyntaxToken thisKeyword, 293SyntaxToken operatorKeyword, 294SyntaxToken operatorToken, 297SyntaxToken semicolonToken) 317SyntaxToken identifier, 322SyntaxToken semicolonToken)
Syntax\SyntaxFactory.cs (144)
206return new SyntaxTrivia(default(SyntaxToken), new Syntax.InternalSyntax.SyntaxTrivia(kind, text, null, null), 0, 0); 218public static SyntaxToken Token(SyntaxKind kind) 230public static SyntaxToken Token(SyntaxTriviaList leading, SyntaxKind kind, SyntaxTriviaList trailing) 247public static SyntaxToken Token(SyntaxTriviaList leading, SyntaxKind kind, string text, string valueText, SyntaxTriviaList trailing) 275public static SyntaxToken MissingToken(SyntaxKind kind) 287public static SyntaxToken MissingToken(SyntaxTriviaList leading, SyntaxKind kind, SyntaxTriviaList trailing) 296public static SyntaxToken Identifier(string text) 308public static SyntaxToken Identifier(SyntaxTriviaList leading, string text, SyntaxTriviaList trailing) 321public static SyntaxToken VerbatimIdentifier(SyntaxTriviaList leading, string text, string valueText, SyntaxTriviaList trailing) 342public static SyntaxToken Identifier(SyntaxTriviaList leading, SyntaxKind contextualKind, string text, string valueText, SyntaxTriviaList trailing) 351public static SyntaxToken Literal(int value) 361public static SyntaxToken Literal(string text, int value) 373public static SyntaxToken Literal(SyntaxTriviaList leading, string text, int value, SyntaxTriviaList trailing) 382public static SyntaxToken Literal(uint value) 392public static SyntaxToken Literal(string text, uint value) 404public static SyntaxToken Literal(SyntaxTriviaList leading, string text, uint value, SyntaxTriviaList trailing) 413public static SyntaxToken Literal(long value) 423public static SyntaxToken Literal(string text, long value) 435public static SyntaxToken Literal(SyntaxTriviaList leading, string text, long value, SyntaxTriviaList trailing) 444public static SyntaxToken Literal(ulong value) 454public static SyntaxToken Literal(string text, ulong value) 466public static SyntaxToken Literal(SyntaxTriviaList leading, string text, ulong value, SyntaxTriviaList trailing) 475public static SyntaxToken Literal(float value) 485public static SyntaxToken Literal(string text, float value) 497public static SyntaxToken Literal(SyntaxTriviaList leading, string text, float value, SyntaxTriviaList trailing) 506public static SyntaxToken Literal(double value) 516public static SyntaxToken Literal(string text, double value) 528public static SyntaxToken Literal(SyntaxTriviaList leading, string text, double value, SyntaxTriviaList trailing) 537public static SyntaxToken Literal(decimal value) 547public static SyntaxToken Literal(string text, decimal value) 559public static SyntaxToken Literal(SyntaxTriviaList leading, string text, decimal value, SyntaxTriviaList trailing) 568public static SyntaxToken Literal(string value) 578public static SyntaxToken Literal(string text, string value) 590public static SyntaxToken Literal(SyntaxTriviaList leading, string text, string value, SyntaxTriviaList trailing) 599public static SyntaxToken Literal(char value) 609public static SyntaxToken Literal(string text, char value) 621public static SyntaxToken Literal(SyntaxTriviaList leading, string text, char value, SyntaxTriviaList trailing) 632public static SyntaxToken BadToken(SyntaxTriviaList leading, string text, SyntaxTriviaList trailing) 644public static SyntaxToken XmlTextLiteral(SyntaxTriviaList leading, string text, string value, SyntaxTriviaList trailing) 656public static SyntaxToken XmlEntity(SyntaxTriviaList leading, string text, string value, SyntaxTriviaList trailing) 1042public static XmlTextAttributeSyntax XmlTextAttribute(string name, params SyntaxToken[] textTokens) 1108public static SyntaxToken XmlTextNewLine(string text) 1120public static SyntaxToken XmlTextNewLine(SyntaxTriviaList leading, string text, string value, SyntaxTriviaList trailing) 1137public static SyntaxToken XmlTextNewLine(string text, bool continueXmlDocumentationComment) 1139var token = new SyntaxToken( 1165public static XmlTextSyntax XmlText(params SyntaxToken[] textTokens) 1174public static SyntaxToken XmlTextLiteral(string value) 1193public static SyntaxToken XmlTextLiteral(string text, string value) 1204private static SyntaxToken XmlReplaceBracketTokens(SyntaxToken originalToken, SyntaxToken rewrittenToken) 1266public static SyntaxTokenList TokenList(SyntaxToken token) 1275public static SyntaxTokenList TokenList(params SyntaxToken[] tokens) 1285public static SyntaxTokenList TokenList(IEnumerable<SyntaxToken> tokens) 1295return new SyntaxTrivia(default(SyntaxToken), node.Green, position: 0, index: 0); 1385var commaToken = Token(SyntaxKind.CommaToken); 1405public static SeparatedSyntaxList<TNode> SeparatedList<TNode>(IEnumerable<TNode>? nodes, IEnumerable<SyntaxToken>? separators) where TNode : SyntaxNode 1416foreach (SyntaxToken token in separators) 1638public static SyntaxToken ParseToken(string text, int offset = 0) 1649/// the <see cref="SyntaxToken.GetLocation"/> API may yield surprising results for 1656public static IEnumerable<SyntaxToken> ParseTokens(string text, int offset = 0, int initialTokenPosition = 0, CSharpParseOptions? options = null) 1987public static bool AreEquivalent(SyntaxToken oldToken, SyntaxToken newToken) 2369var closingToken = lastNode.GetLastToken(includeZeroWidth: true, includeSkipped: true, includeDirectives: true, includeDocumentationComments: true); 2374var token = lastNode.GetLastToken(includeZeroWidth: true, includeSkipped: true, includeDirectives: true, includeDocumentationComments: true); 2386token = token.GetPreviousToken(predicate: SyntaxToken.Any, stepInto: CodeAnalysis.SyntaxTrivia.Any); 2455SyntaxToken identifier, 2472SyntaxToken implicitOrExplicitKeyword, 2473SyntaxToken operatorKeyword, 2477SyntaxToken semicolonToken) 2493SyntaxToken implicitOrExplicitKeyword, 2494SyntaxToken operatorKeyword, 2499SyntaxToken semicolonToken) 2517SyntaxToken implicitOrExplicitKeyword, 2538SyntaxToken implicitOrExplicitKeyword, 2540SyntaxToken operatorKeyword, 2545SyntaxToken semicolonToken) 2566SyntaxToken operatorKeyword, 2567SyntaxToken operatorToken, 2570SyntaxToken semicolonToken) 2589SyntaxToken operatorKeyword, 2590SyntaxToken operatorToken, 2594SyntaxToken semicolonToken) 2614SyntaxToken operatorToken, 2636SyntaxToken operatorKeyword, 2637SyntaxToken operatorToken, 2641SyntaxToken semicolonToken) 2662staticKeyword: default(SyntaxToken), 2668public static UsingDirectiveSyntax UsingDirective(SyntaxToken usingKeyword, SyntaxToken staticKeyword, NameEqualsSyntax? alias, NameSyntax name, SyntaxToken semicolonToken) 2681public static ClassOrStructConstraintSyntax ClassOrStructConstraint(SyntaxKind kind, SyntaxToken classOrStructKeyword) 2683return ClassOrStructConstraint(kind, classOrStructKeyword, questionToken: default(SyntaxToken)); 2689public static AccessorDeclarationSyntax AccessorDeclaration(SyntaxKind kind, SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken keyword, BlockSyntax body, SyntaxToken semicolonToken) 2693public static AccessorDeclarationSyntax AccessorDeclaration(SyntaxKind kind, SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken keyword, ArrowExpressionClauseSyntax expressionBody, SyntaxToken semicolonToken) 2696public static EnumMemberDeclarationSyntax EnumMemberDeclaration(SyntaxList<AttributeListSyntax> attributeLists, SyntaxToken identifier, EqualsValueClauseSyntax? equalsValue) 2704public static NamespaceDeclarationSyntax NamespaceDeclaration(SyntaxToken namespaceKeyword, NameSyntax name, SyntaxToken openBraceToken, SyntaxList<ExternAliasDirectiveSyntax> externs, SyntaxList<UsingDirectiveSyntax> usings, SyntaxList<MemberDeclarationSyntax> members, SyntaxToken closeBraceToken, SyntaxToken semicolonToken) 2709public static EventDeclarationSyntax EventDeclaration(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken eventKeyword, TypeSyntax type, ExplicitInterfaceSpecifierSyntax explicitInterfaceSpecifier, SyntaxToken identifier, AccessorListSyntax accessorList) 2715public static EventDeclarationSyntax EventDeclaration(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken eventKeyword, TypeSyntax type, ExplicitInterfaceSpecifierSyntax explicitInterfaceSpecifier, SyntaxToken identifier, SyntaxToken semicolonToken) 2724var openParen = needsParens ? SyntaxFactory.Token(SyntaxKind.OpenParenToken) : default; 2725var closeParen = needsParens ? SyntaxFactory.Token(SyntaxKind.CloseParenToken) : default; 2748public static SimpleLambdaExpressionSyntax SimpleLambdaExpression(SyntaxToken asyncKeyword, ParameterSyntax parameter, SyntaxToken arrowToken, CSharpSyntaxNode body) 2761public static ParenthesizedLambdaExpressionSyntax ParenthesizedLambdaExpression(SyntaxToken asyncKeyword, ParameterListSyntax parameterList, SyntaxToken arrowToken, CSharpSyntaxNode body) 2774public static AnonymousMethodExpressionSyntax AnonymousMethodExpression(SyntaxToken asyncKeyword, SyntaxToken delegateKeyword, ParameterListSyntax parameterList, CSharpSyntaxNode body) 2836public static OperatorMemberCrefSyntax OperatorMemberCref(SyntaxToken operatorKeyword, SyntaxToken operatorToken, CrefParameterListSyntax? parameters) 2846public static ConversionOperatorMemberCrefSyntax ConversionOperatorMemberCref(SyntaxToken implicitOrExplicitKeyword, SyntaxToken operatorKeyword, TypeSyntax type, CrefParameterListSyntax? parameters) 2857public static ClassDeclarationSyntax ClassDeclaration(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken keyword, SyntaxToken identifier, TypeParameterListSyntax? typeParameterList, BaseListSyntax? baseList, SyntaxList<TypeParameterConstraintClauseSyntax> constraintClauses, SyntaxToken openBraceToken, SyntaxList<MemberDeclarationSyntax> members, SyntaxToken closeBraceToken, SyntaxToken semicolonToken) 2866public static ClassDeclarationSyntax ClassDeclaration(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken identifier, TypeParameterListSyntax? typeParameterList, BaseListSyntax? baseList, SyntaxList<TypeParameterConstraintClauseSyntax> constraintClauses, SyntaxList<MemberDeclarationSyntax> members) 2872public static ClassDeclarationSyntax ClassDeclaration(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken identifier, TypeParameterListSyntax? typeParameterList, ParameterListSyntax? parameterList, BaseListSyntax? baseList, SyntaxList<TypeParameterConstraintClauseSyntax> constraintClauses, SyntaxList<MemberDeclarationSyntax> members) 2876public static ClassDeclarationSyntax ClassDeclaration(SyntaxToken identifier) 2884public static StructDeclarationSyntax StructDeclaration(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken keyword, SyntaxToken identifier, TypeParameterListSyntax? typeParameterList, BaseListSyntax? baseList, SyntaxList<TypeParameterConstraintClauseSyntax> constraintClauses, SyntaxToken openBraceToken, SyntaxList<MemberDeclarationSyntax> members, SyntaxToken closeBraceToken, SyntaxToken semicolonToken) 2893public static StructDeclarationSyntax StructDeclaration(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken identifier, TypeParameterListSyntax? typeParameterList, BaseListSyntax? baseList, SyntaxList<TypeParameterConstraintClauseSyntax> constraintClauses, SyntaxList<MemberDeclarationSyntax> members) 2899public static StructDeclarationSyntax StructDeclaration(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken identifier, TypeParameterListSyntax? typeParameterList, ParameterListSyntax? parameterList, BaseListSyntax? baseList, SyntaxList<TypeParameterConstraintClauseSyntax> constraintClauses, SyntaxList<MemberDeclarationSyntax> members) 2903public static StructDeclarationSyntax StructDeclaration(SyntaxToken identifier) 2911public static InterfaceDeclarationSyntax InterfaceDeclaration(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken keyword, SyntaxToken identifier, TypeParameterListSyntax? typeParameterList, BaseListSyntax? baseList, SyntaxList<TypeParameterConstraintClauseSyntax> constraintClauses, SyntaxToken openBraceToken, SyntaxList<MemberDeclarationSyntax> members, SyntaxToken closeBraceToken, SyntaxToken semicolonToken) 2917public static InterfaceDeclarationSyntax InterfaceDeclaration(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken identifier, TypeParameterListSyntax? typeParameterList, BaseListSyntax? baseList, SyntaxList<TypeParameterConstraintClauseSyntax> constraintClauses, SyntaxList<MemberDeclarationSyntax> members) 2921public static InterfaceDeclarationSyntax InterfaceDeclaration(SyntaxToken identifier) 2929public static EnumDeclarationSyntax EnumDeclaration(SyntaxList<AttributeListSyntax> attributeLists, SyntaxTokenList modifiers, SyntaxToken identifier, BaseListSyntax? baseList, SeparatedSyntaxList<EnumMemberDeclarationSyntax> members) 2933public static EnumDeclarationSyntax EnumDeclaration(SyntaxToken identifier)
Syntax\SyntaxFacts.cs (1)
465SyntaxToken nameToken;
Syntax\SyntaxNodeExtensions.cs (2)
194internal static SyntaxToken ExtractAnonymousTypeMemberName(this ExpressionSyntax input) 217return default(SyntaxToken);
Syntax\SyntaxNodeRemover.cs (6)
185public override SyntaxToken VisitToken(SyntaxToken token) 187SyntaxToken result = token; 256var separator = withSeps[i + 1].AsToken(); 324private void AddTrivia(SyntaxToken token, SyntaxNode node) 364private void AddTrivia(SyntaxNode node, SyntaxToken token)
Syntax\SyntaxNormalizer.cs (39)
24private SyntaxToken _previousToken; 54internal static SyntaxToken Normalize(SyntaxToken token, string indentWhitespace, string eolWhitespace, bool useElasticTrivia = false) 57var result = normalizer.VisitToken(token); 67GetDeclarationDepth((SyntaxToken)trivia.ElementAt(0).Token), 84public override SyntaxToken VisitToken(SyntaxToken token) 93var tk = token; 105var nextToken = this.GetNextRelevantToken(token); 129private SyntaxToken GetNextRelevantToken(SyntaxToken token) 132var nextToken = token.GetNextToken( 133t => SyntaxToken.NonZeroWidth(t) || t.Kind() == SyntaxKind.EndOfDirectiveToken, 142return default(SyntaxToken); 172private static bool NeedsIndentAfterLineBreak(SyntaxToken token) 177private int LineBreaksAfter(SyntaxToken currentToken, SyntaxToken nextToken) 316private static int LineBreaksBeforeOpenBrace(SyntaxToken openBraceToken) 333private static int LineBreaksBeforeCloseBrace(SyntaxToken closeBraceToken) 349private static int LineBreaksAfterOpenBrace(SyntaxToken openBraceToken) 365private static int LineBreaksAfterCloseBrace(SyntaxToken currentToken, SyntaxToken nextToken) 410static bool isCloseBraceFollowedByCommaOrSemicolon(SyntaxToken currentToken, SyntaxToken nextToken) 415private static int LineBreaksAfterSemicolon(SyntaxToken currentToken, SyntaxToken nextToken) 467private static bool NeedsSeparatorForPropertyPattern(SyntaxToken token, SyntaxToken next) 527private static bool NeedsSeparatorForPositionalPattern(SyntaxToken token, SyntaxToken next) 591private static bool NeedsSeparatorForListPattern(SyntaxToken token, SyntaxToken next) 614private static bool NeedsSeparator(SyntaxToken token, SyntaxToken next) 1151SyntaxToken oldPreviousToken = _previousToken; 1152_previousToken = default(SyntaxToken); 1222private static bool IsLineBreak(SyntaxToken token) 1292private static int GetDeclarationDepth(SyntaxToken token) 1304return GetDeclarationDepth((SyntaxToken)trivia.Token);
Syntax\SyntaxReplacer.cs (41)
21IEnumerable<SyntaxToken>? tokens = null, 22Func<SyntaxToken, SyntaxToken, SyntaxToken>? computeReplacementToken = null, 42internal static SyntaxToken Replace( 43SyntaxToken root, 46IEnumerable<SyntaxToken>? tokens = null, 47Func<SyntaxToken, SyntaxToken, SyntaxToken>? computeReplacementToken = null, 69private readonly Func<SyntaxToken, SyntaxToken, SyntaxToken>? _computeReplacementToken; 73private readonly HashSet<SyntaxToken> _tokenSet; 84IEnumerable<SyntaxToken>? tokens, 85Func<SyntaxToken, SyntaxToken, SyntaxToken>? computeReplacementToken, 94_tokenSet = tokens != null ? new HashSet<SyntaxToken>(tokens) : s_noTokens; 113private static readonly HashSet<SyntaxToken> s_noTokens = new HashSet<SyntaxToken>(); 200public override SyntaxToken VisitToken(SyntaxToken token) 202var rewritten = token; 245public static SyntaxNode ReplaceTokenInList(SyntaxNode root, SyntaxToken tokenInList, IEnumerable<SyntaxToken> newTokens) 250public static SyntaxNode InsertTokenInList(SyntaxNode root, SyntaxToken tokenInList, IEnumerable<SyntaxToken> newTokens, bool insertBefore) 265public static SyntaxToken ReplaceTriviaInList(SyntaxToken root, SyntaxTrivia triviaInList, IEnumerable<SyntaxTrivia> newTrivia) 270public static SyntaxToken InsertTriviaInList(SyntaxToken root, SyntaxTrivia triviaInList, IEnumerable<SyntaxTrivia> newTrivia, bool insertBefore) 343public override SyntaxToken VisitToken(SyntaxToken token) 345var rewritten = token; 445private readonly SyntaxToken _originalToken; 446private readonly IEnumerable<SyntaxToken> _newTokens; 449SyntaxToken originalToken, 450IEnumerable<SyntaxToken> newTokens, 458public override SyntaxToken VisitToken(SyntaxToken token)
Syntax\SyntaxTokenParser.cs (9)
48/// the <see cref="SyntaxToken.GetLocation"/> API may yield surprising results for 61/// token parser to the end of the leading trivia of the next token. The returned result will have a token with <see cref="CSharpExtensions.Kind(SyntaxToken)"/> 62/// of <see cref="SyntaxKind.None"/>, <see cref="SyntaxToken.IsMissing"/> set to <see langword="true"/>, and a parent of <see langword="null"/>. The 63/// parsed trivia will be set as the <see cref="SyntaxToken.LeadingTrivia"/> of the token. 76/// token parser to the end of the trailing trivia from the current location. The returned result will have a token with <see cref="CSharpExtensions.Kind(SyntaxToken)"/> 77/// of <see cref="SyntaxKind.None"/>, <see cref="SyntaxToken.IsMissing"/> set to <see langword="true"/>, and a parent of <see langword="null"/>. The 78/// parsed trivia will be set as the <see cref="SyntaxToken.TrailingTrivia"/> of the token. 123public readonly SyntaxToken Token { get; } 140internal Result(SyntaxToken token, InternalSyntax.DirectiveStack contextStartDirectiveStack)
Syntax\ThrowStatementSyntax.cs (4)
11public ThrowStatementSyntax Update(SyntaxToken throwKeyword, ExpressionSyntax expression, SyntaxToken semicolonToken) 20public static ThrowStatementSyntax ThrowStatement(SyntaxToken throwKeyword, ExpressionSyntax expression, SyntaxToken semicolonToken)
Syntax\TryStatementSyntax.cs (2)
11public TryStatementSyntax Update(SyntaxToken tryKeyword, BlockSyntax block, SyntaxList<CatchClauseSyntax> catches, FinallyClauseSyntax @finally) 23public static TryStatementSyntax TryStatement(SyntaxToken tryKeyword, BlockSyntax block, SyntaxList<CatchClauseSyntax> catches, FinallyClauseSyntax? @finally)
Syntax\TypeDeclarationSyntax.cs (8)
24public new TypeDeclarationSyntax AddModifiers(params SyntaxToken[] items) 85public static TypeDeclarationSyntax TypeDeclaration(SyntaxKind kind, SyntaxToken identifier) 99default(SyntaxToken)); 111SyntaxToken keyword, 112SyntaxToken identifier, 116SyntaxToken openBraceToken, 118SyntaxToken closeBraceToken, 119SyntaxToken semicolonToken)
Syntax\UnsafeStatementSyntax.cs (2)
11public UnsafeStatementSyntax Update(SyntaxToken unsafeKeyword, BlockSyntax block) 20public static UnsafeStatementSyntax UnsafeStatement(SyntaxToken unsafeKeyword, BlockSyntax block)
Syntax\UsingDirectiveSyntax.cs (12)
21public UsingDirectiveSyntax Update(SyntaxToken usingKeyword, SyntaxToken staticKeyword, NameEqualsSyntax? alias, NameSyntax name, SyntaxToken semicolonToken) 24public UsingDirectiveSyntax Update(SyntaxToken globalKeyword, SyntaxToken usingKeyword, SyntaxToken staticKeyword, NameEqualsSyntax? alias, NameSyntax name, SyntaxToken semicolonToken) 37public static UsingDirectiveSyntax UsingDirective(SyntaxToken staticKeyword, NameEqualsSyntax? alias, NameSyntax name) 41public static UsingDirectiveSyntax UsingDirective(SyntaxToken globalKeyword, SyntaxToken usingKeyword, SyntaxToken staticKeyword, NameEqualsSyntax? alias, NameSyntax name, SyntaxToken semicolonToken)
Syntax\UsingStatementSyntax.cs (14)
11public UsingStatementSyntax Update(SyntaxToken usingKeyword, SyntaxToken openParenToken, VariableDeclarationSyntax? declaration, ExpressionSyntax? expression, SyntaxToken closeParenToken, StatementSyntax statement) 14public UsingStatementSyntax Update(SyntaxToken awaitKeyword, SyntaxToken usingKeyword, SyntaxToken openParenToken, VariableDeclarationSyntax? declaration, ExpressionSyntax? expression, SyntaxToken closeParenToken, StatementSyntax statement) 23public static UsingStatementSyntax UsingStatement(SyntaxToken usingKeyword, SyntaxToken openParenToken, VariableDeclarationSyntax? declaration, ExpressionSyntax? expression, SyntaxToken closeParenToken, StatementSyntax statement) 26public static UsingStatementSyntax UsingStatement(SyntaxToken awaitKeyword, SyntaxToken usingKeyword, SyntaxToken openParenToken, VariableDeclarationSyntax? declaration, ExpressionSyntax? expression, SyntaxToken closeParenToken, StatementSyntax statement)
Syntax\WhileStatementSyntax.cs (6)
11public WhileStatementSyntax Update(SyntaxToken whileKeyword, SyntaxToken openParenToken, ExpressionSyntax condition, SyntaxToken closeParenToken, StatementSyntax statement) 20public static WhileStatementSyntax WhileStatement(SyntaxToken whileKeyword, SyntaxToken openParenToken, ExpressionSyntax condition, SyntaxToken closeParenToken, StatementSyntax statement)
Syntax\YieldStatementSyntax.cs (6)
11public YieldStatementSyntax Update(SyntaxToken yieldKeyword, SyntaxToken returnOrBreakKeyword, ExpressionSyntax expression, SyntaxToken semicolonToken) 20public static YieldStatementSyntax YieldStatement(SyntaxKind kind, SyntaxToken yieldKeyword, SyntaxToken returnOrBreakKeyword, ExpressionSyntax expression, SyntaxToken semicolonToken)
Microsoft.CodeAnalysis.CSharp.CodeStyle (602)
src\Analyzers\CSharp\Analyzers\AddAccessibilityModifiers\CSharpAddAccessibilityModifiers.cs (1)
26out SyntaxToken name,
src\Analyzers\CSharp\Analyzers\AddAccessibilityModifiers\CSharpAddAccessibilityModifiersDiagnosticAnalyzer.cs (1)
68CSharpAccessibilityFacts.Instance, member, option.Value, out var name, out var modifiersAdded))
src\Analyzers\CSharp\Analyzers\AddBraces\CSharpAddBracesDiagnosticAnalyzer.cs (3)
109var firstToken = statement.GetFirstToken(); 173var lastTokenBeforeEmbeddedStatement = embeddedStatement.GetFirstToken().GetPreviousToken(); 215var firstTokenAfterEmbeddedStatement = embeddedStatement.GetLastToken().GetNextToken();
src\Analyzers\CSharp\Analyzers\AddRequiredParentheses\CSharpAddRequiredExpressionParenthesesDiagnosticAnalyzer.cs (1)
62protected override (ExpressionSyntax, SyntaxToken, ExpressionSyntax) GetPartsOfBinaryLike(ExpressionSyntax binaryLike)
src\Analyzers\CSharp\Analyzers\AddRequiredParentheses\CSharpAddRequiredPatternParenthesesDiagnosticAnalyzer.cs (1)
36protected override (PatternSyntax, SyntaxToken, PatternSyntax) GetPartsOfBinaryLike(BinaryPatternSyntax binaryPattern)
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (2)
178var previousToken = expressionStatement.GetFirstToken().GetPreviousToken(); 179var nextToken = expressionStatement.GetLastToken().GetNextToken();
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
204_ => (SyntaxToken?)null
src\Analyzers\CSharp\Analyzers\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementDiagnosticAnalyzer.cs (2)
88static bool IsOk(SyntaxToken token) 101var nextToken = token.GetNextToken();
src\Analyzers\CSharp\Analyzers\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementDiagnosticAnalyzer.cs (2)
69static bool IsOk(SyntaxToken token) 82var nextToken = token.GetNextToken();
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (6)
78private void ProcessToken(SyntaxTreeAnalysisContext context, NotificationOption2 notificationOption, SourceText text, SyntaxToken token) 80if (!HasExcessBlankLinesAfter(text, token, out var secondBrace, out _)) 93SourceText text, SyntaxToken token, 94out SyntaxToken secondBrace, 102var nextToken = token.GetNextToken(); 106var firstBrace = token;
src\Analyzers\CSharp\Analyzers\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementDiagnosticAnalyzer.cs (2)
71var colonToken = initializer.ColonToken; 72var thisOrBaseKeyword = initializer.ThisOrBaseKeyword;
src\Analyzers\CSharp\Analyzers\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementDiagnosticAnalyzer.cs (3)
100var statementStartToken = statement.GetFirstToken(); 126public static bool ContainsEndOfLineBetween(SyntaxToken previous, SyntaxToken next)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryImports\CSharpRemoveUnnecessaryImportsDiagnosticAnalyzer.cs (1)
46protected override SyntaxToken? TryGetLastToken(SyntaxNode node)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderDiagnosticAnalyzer.cs (2)
148var identifier = 211static InvocationExpressionSyntax? TryFindCreationExpression(SyntaxToken identifier, StatementSyntax statement)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (2)
625var openBracket = OpenBracketToken.WithTriviaFrom(initializer.OpenBraceToken); 628var closeBracket = CloseBracketToken.WithTriviaFrom(initializer.CloseBraceToken);
src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUpdateExpressionSyntaxHelper.cs (2)
17out SyntaxToken awaitKeyword, 18out SyntaxToken identifier,
src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (1)
138SyntaxToken identifier,
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForAccessorsHelper.cs (2)
44protected override SyntaxToken GetSemicolonToken(AccessorDeclarationSyntax declaration) 47protected override AccessorDeclarationSyntax WithSemicolonToken(AccessorDeclarationSyntax declaration, SyntaxToken token)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForConstructorsHelper.cs (2)
38protected override SyntaxToken GetSemicolonToken(ConstructorDeclarationSyntax declaration) 41protected override ConstructorDeclarationSyntax WithSemicolonToken(ConstructorDeclarationSyntax declaration, SyntaxToken token)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForConversionOperatorsHelper.cs (2)
38protected override SyntaxToken GetSemicolonToken(ConversionOperatorDeclarationSyntax declaration) 41protected override ConversionOperatorDeclarationSyntax WithSemicolonToken(ConversionOperatorDeclarationSyntax declaration, SyntaxToken token)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForIndexersHelper.cs (3)
42protected override SyntaxToken GetSemicolonToken(IndexerDeclarationSyntax declaration) 45protected override IndexerDeclarationSyntax WithSemicolonToken(IndexerDeclarationSyntax declaration, SyntaxToken token) 74out SyntaxToken semicolonToken)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForLocalFunctionHelper.cs (2)
41protected override SyntaxToken GetSemicolonToken(LocalFunctionStatementSyntax statement) 44protected override LocalFunctionStatementSyntax WithSemicolonToken(LocalFunctionStatementSyntax statement, SyntaxToken token)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForMethodsHelper.cs (2)
41protected override SyntaxToken GetSemicolonToken(MethodDeclarationSyntax declaration) 44protected override MethodDeclarationSyntax WithSemicolonToken(MethodDeclarationSyntax declaration, SyntaxToken token)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForOperatorsHelper.cs (2)
40protected override SyntaxToken GetSemicolonToken(OperatorDeclarationSyntax declaration) 43protected override OperatorDeclarationSyntax WithSemicolonToken(OperatorDeclarationSyntax declaration, SyntaxToken token)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForPropertiesHelper.cs (3)
42protected override SyntaxToken GetSemicolonToken(PropertyDeclarationSyntax declaration) 45protected override PropertyDeclarationSyntax WithSemicolonToken(PropertyDeclarationSyntax declaration, SyntaxToken token) 74out SyntaxToken semicolonToken)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyHelper`1.cs (7)
123out SyntaxToken semicolonWhenOnSingleLine) 132[NotNullWhen(true)] out ArrowExpressionClauseSyntax? expressionWhenOnSingleLine, out SyntaxToken semicolonWhenOnSingleLine) 154out SyntaxToken semicolonToken) 233TryConvertToExpressionBody(declaration, ExpressionBodyPreference.WhenPossible, cancellationToken, out var expressionBody, out var semicolonToken); 262protected abstract SyntaxToken GetSemicolonToken(TDeclaration declaration); 264protected abstract TDeclaration WithSemicolonToken(TDeclaration declaration, SyntaxToken token); 286var semicolonToken = GetSemicolonToken(declaration);
src\Analyzers\CSharp\Analyzers\UseExpressionBodyForLambda\UseExpressionBodyForLambdaHelpers.cs (1)
116if (!body.TryConvertToExpressionBody(languageVersion, conversionPreference, cancellationToken, out expression, out var semicolonToken))
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsAnalyzer.cs (1)
75private static AnalyzedPattern? ParseBinaryPattern(IBinaryOperation op, bool isDisjunctive, SyntaxToken token)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpUseNotPatternDiagnosticAnalyzer.cs (1)
73var isKeyword = parenthesizedExpression.Expression switch
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (90)
11public static readonly SyntaxToken AbstractKeyword = Token(SyntaxKind.AbstractKeyword); 12public static readonly SyntaxToken AssemblyKeyword = Token(SyntaxKind.AssemblyKeyword); 13public static readonly SyntaxToken AsyncKeyword = Token(SyntaxKind.AsyncKeyword); 14public static readonly SyntaxToken AwaitKeyword = Token(SyntaxKind.AwaitKeyword); 15public static readonly SyntaxToken BoolKeyword = Token(SyntaxKind.BoolKeyword); 16public static readonly SyntaxToken ByteKeyword = Token(SyntaxKind.ByteKeyword); 17public static readonly SyntaxToken CharKeyword = Token(SyntaxKind.CharKeyword); 18public static readonly SyntaxToken CheckedKeyword = Token(SyntaxKind.CheckedKeyword); 19public static readonly SyntaxToken CloseBraceToken = Token(SyntaxKind.CloseBraceToken); 20public static readonly SyntaxToken CloseBracketToken = Token(SyntaxKind.CloseBracketToken); 21public static readonly SyntaxToken CloseParenToken = Token(SyntaxKind.CloseParenToken); 22public static readonly SyntaxToken ColonToken = Token(SyntaxKind.ColonToken); 23public static readonly SyntaxToken CommaToken = Token(SyntaxKind.CommaToken); 24public static readonly SyntaxToken ConstKeyword = Token(SyntaxKind.ConstKeyword); 25public static readonly SyntaxToken DecimalKeyword = Token(SyntaxKind.DecimalKeyword); 26public static readonly SyntaxToken DisableKeyword = Token(SyntaxKind.DisableKeyword); 27public static readonly SyntaxToken DotDotToken = Token(SyntaxKind.DotDotToken); 28public static readonly SyntaxToken DoubleKeyword = Token(SyntaxKind.DoubleKeyword); 29public static readonly SyntaxToken EndOfDocumentationCommentToken = Token(SyntaxKind.EndOfDocumentationCommentToken); 30public static readonly SyntaxToken EqualsToken = Token(SyntaxKind.EqualsToken); 31public static readonly SyntaxToken ExplicitKeyword = Token(SyntaxKind.ExplicitKeyword); 32public static readonly SyntaxToken ExternKeyword = Token(SyntaxKind.ExternKeyword); 33public static readonly SyntaxToken FileKeyword = Token(SyntaxKind.FileKeyword); 34public static readonly SyntaxToken FloatKeyword = Token(SyntaxKind.FloatKeyword); 35public static readonly SyntaxToken ForEachKeyword = Token(SyntaxKind.ForEachKeyword); 36public static readonly SyntaxToken FromKeyword = Token(SyntaxKind.FromKeyword); 37public static readonly SyntaxToken GlobalKeyword = Token(SyntaxKind.GlobalKeyword); 38public static readonly SyntaxToken GreaterThanEqualsToken = Token(SyntaxKind.GreaterThanEqualsToken); 39public static readonly SyntaxToken GreaterThanToken = Token(SyntaxKind.GreaterThanToken); 40public static readonly SyntaxToken IfKeyword = Token(SyntaxKind.IfKeyword); 41public static readonly SyntaxToken ImplicitKeyword = Token(SyntaxKind.ImplicitKeyword); 42public static readonly SyntaxToken InKeyword = Token(SyntaxKind.InKeyword); 43public static readonly SyntaxToken InterfaceKeyword = Token(SyntaxKind.InterfaceKeyword); 44public static readonly SyntaxToken InternalKeyword = Token(SyntaxKind.InternalKeyword); 45public static readonly SyntaxToken InterpolatedStringEndToken = Token(SyntaxKind.InterpolatedStringEndToken); 46public static readonly SyntaxToken InterpolatedStringStartToken = Token(SyntaxKind.InterpolatedStringStartToken); 47public static readonly SyntaxToken IntKeyword = Token(SyntaxKind.IntKeyword); 48public static readonly SyntaxToken IsKeyword = Token(SyntaxKind.IsKeyword); 49public static readonly SyntaxToken LessThanEqualsToken = Token(SyntaxKind.LessThanEqualsToken); 50public static readonly SyntaxToken LessThanToken = Token(SyntaxKind.LessThanToken); 51public static readonly SyntaxToken LetKeyword = Token(SyntaxKind.LetKeyword); 52public static readonly SyntaxToken LongKeyword = Token(SyntaxKind.LongKeyword); 53public static readonly SyntaxToken MethodKeyword = Token(SyntaxKind.MethodKeyword); 54public static readonly SyntaxToken NewKeyword = Token(SyntaxKind.NewKeyword); 55public static readonly SyntaxToken NotKeyword = Token(SyntaxKind.NotKeyword); 56public static readonly SyntaxToken NullKeyword = Token(SyntaxKind.NullKeyword); 57public static readonly SyntaxToken ObjectKeyword = Token(SyntaxKind.ObjectKeyword); 58public static readonly SyntaxToken OpenBraceToken = Token(SyntaxKind.OpenBraceToken); 59public static readonly SyntaxToken OpenBracketToken = Token(SyntaxKind.OpenBracketToken); 60public static readonly SyntaxToken OpenParenToken = Token(SyntaxKind.OpenParenToken); 61public static readonly SyntaxToken OperatorKeyword = Token(SyntaxKind.OperatorKeyword); 62public static readonly SyntaxToken OutKeyword = Token(SyntaxKind.OutKeyword); 63public static readonly SyntaxToken OverrideKeyword = Token(SyntaxKind.OverrideKeyword); 64public static readonly SyntaxToken ParamsKeyword = Token(SyntaxKind.ParamsKeyword); 65public static readonly SyntaxToken PartialKeyword = Token(SyntaxKind.PartialKeyword); 66public static readonly SyntaxToken PlusToken = Token(SyntaxKind.PlusToken); 67public static readonly SyntaxToken PrivateKeyword = Token(SyntaxKind.PrivateKeyword); 68public static readonly SyntaxToken PropertyKeyword = Token(SyntaxKind.PropertyKeyword); 69public static readonly SyntaxToken ProtectedKeyword = Token(SyntaxKind.ProtectedKeyword); 70public static readonly SyntaxToken PublicKeyword = Token(SyntaxKind.PublicKeyword); 71public static readonly SyntaxToken QuestionQuestionEqualsToken = Token(SyntaxKind.QuestionQuestionEqualsToken); 72public static readonly SyntaxToken QuestionToken = Token(SyntaxKind.QuestionToken); 73public static readonly SyntaxToken ReadOnlyKeyword = Token(SyntaxKind.ReadOnlyKeyword); 74public static readonly SyntaxToken RecordKeyword = Token(SyntaxKind.RecordKeyword); 75public static readonly SyntaxToken RefKeyword = Token(SyntaxKind.RefKeyword); 76public static readonly SyntaxToken RequiredKeyword = Token(SyntaxKind.RequiredKeyword); 77public static readonly SyntaxToken RestoreKeyword = Token(SyntaxKind.RestoreKeyword); 78public static readonly SyntaxToken ReturnKeyword = Token(SyntaxKind.ReturnKeyword); 79public static readonly SyntaxToken SByteKeyword = Token(SyntaxKind.SByteKeyword); 80public static readonly SyntaxToken ScopedKeyword = Token(SyntaxKind.ScopedKeyword); 81public static readonly SyntaxToken SealedKeyword = Token(SyntaxKind.SealedKeyword); 82public static readonly SyntaxToken SemicolonToken = Token(SyntaxKind.SemicolonToken); 83public static readonly SyntaxToken ShortKeyword = Token(SyntaxKind.ShortKeyword); 84public static readonly SyntaxToken SlashGreaterThanToken = Token(SyntaxKind.SlashGreaterThanToken); 85public static readonly SyntaxToken StaticKeyword = Token(SyntaxKind.StaticKeyword); 86public static readonly SyntaxToken StringKeyword = Token(SyntaxKind.StringKeyword); 87public static readonly SyntaxToken StructKeyword = Token(SyntaxKind.StructKeyword); 88public static readonly SyntaxToken SwitchKeyword = Token(SyntaxKind.SwitchKeyword); 89public static readonly SyntaxToken ThisKeyword = Token(SyntaxKind.ThisKeyword); 90public static readonly SyntaxToken TildeToken = Token(SyntaxKind.TildeToken); 91public static readonly SyntaxToken UIntKeyword = Token(SyntaxKind.UIntKeyword); 92public static readonly SyntaxToken ULongKeyword = Token(SyntaxKind.ULongKeyword); 93public static readonly SyntaxToken UnmanagedKeyword = Token(SyntaxKind.UnmanagedKeyword); 94public static readonly SyntaxToken UnsafeKeyword = Token(SyntaxKind.UnsafeKeyword); 95public static readonly SyntaxToken UShortKeyword = Token(SyntaxKind.UShortKeyword); 96public static readonly SyntaxToken UsingKeyword = Token(SyntaxKind.UsingKeyword); 97public static readonly SyntaxToken VirtualKeyword = Token(SyntaxKind.VirtualKeyword); 98public static readonly SyntaxToken VoidKeyword = Token(SyntaxKind.VoidKeyword); 99public static readonly SyntaxToken VolatileKeyword = Token(SyntaxKind.VolatileKeyword); 100public static readonly SyntaxToken WhereKeyword = Token(SyntaxKind.WhereKeyword);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (6)
34protected override bool IsMultiLineRawStringToken(SyntaxToken token) 45protected override VirtualCharSequence TryConvertToVirtualCharsWorker(SyntaxToken token) 127private static VirtualCharSequence TryConvertVerbatimStringToVirtualChars(SyntaxToken token, string startDelimiter, string endDelimiter, bool escapeBraces) 130private static VirtualCharSequence TryConvertSingleLineRawStringToVirtualChars(SyntaxToken token) 175SyntaxToken token, ExpressionSyntax parentExpression, bool tokenIncludeDelimiters) 232SyntaxToken token, string startDelimiter, string endDelimiter, bool escapeBraces)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ArrowExpressionClauseSyntaxExtensions.cs (2)
17SyntaxToken semicolonToken, 33SyntaxToken semicolonToken,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (5)
26out SyntaxToken semicolonToken) 51bool HasAcceptableDirectiveShape(StatementSyntax statement, SyntaxToken closeBrace) 86var parentToken = parentTrivia.Token; 120out SyntaxToken semicolonToken) 181private static bool TryGetExpression(StatementSyntax firstStatement, LanguageVersion languageVersion, [NotNullWhen(true)] out ExpressionSyntax? expression, out SyntaxToken semicolonToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
20public static bool IsPreProcessorDirectiveContext(this SyntaxTree syntaxTree, int position, SyntaxToken preProcessorTokenOnLeftOfPosition, CancellationToken cancellationToken) 22var token = preProcessorTokenOnLeftOfPosition;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (6)
84var firstToken = expression.GetFirstToken(); 198=> expression?.Parent is ArgumentSyntax { RefOrOutKeyword: SyntaxToken(SyntaxKind.OutKeyword) } argument && 225=> expression?.Parent is ArgumentSyntax { RefKindKeyword: SyntaxToken(SyntaxKind.InKeyword) }; 854SyntaxToken? semicolonTokenOpt, 867var semicolonToken = semicolonTokenOpt ?? SemicolonToken; 873private static StatementSyntax ConvertToStatement(ExpressionSyntax expression, SyntaxToken semicolonToken, bool createReturnStatementForExpression)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (2)
18private static readonly ConditionalWeakTable<MemberDeclarationSyntax, Dictionary<string, ImmutableArray<SyntaxToken>>> s_declarationCache = new(); 27public static SyntaxToken GetNameToken(this MemberDeclarationSyntax member)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.DeclarationFinder.cs (3)
16private readonly Dictionary<string, List<SyntaxToken>> _map = []; 23public static Dictionary<string, List<SyntaxToken>> GetAllDeclarations(SyntaxNode syntax) 30private void Add(SyntaxToken syntaxToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.LocalDeclarationMap.cs (3)
16private readonly Dictionary<string, ImmutableArray<SyntaxToken>> _dictionary; 18internal LocalDeclarationMap(Dictionary<string, ImmutableArray<SyntaxToken>> dictionary) 21public ImmutableArray<SyntaxToken> this[string identifier]
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (2)
46var tokenBeforeParen = node.GetFirstToken().GetPreviousToken(); 47var tokenAfterParen = node.Expression.GetFirstToken();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (4)
24SyntaxToken name, 41SyntaxToken name, 128public static SymbolInfo GetSymbolInfo(this SemanticModel semanticModel, SyntaxToken token) 148private static bool CanBindToken(SyntaxToken token)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\StatementSyntaxExtensions.cs (2)
20var previousToken = statement.GetFirstToken().GetPreviousToken(); 31var nextToken = statement.GetLastToken().GetNextToken();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (13)
69this SyntaxToken token, SourceText? sourceText = null, 72var prevToken = token.GetPreviousToken(includeSkipped: true); 97public static (SyntaxToken openBrace, SyntaxToken closeBrace) GetBraces(this SyntaxNode? node) 518this SyntaxToken token, 694public static (SyntaxToken openParen, SyntaxToken closeParen) GetParentheses(this SyntaxNode node) 724public static (SyntaxToken openBracket, SyntaxToken closeBracket) GetBrackets(this SyntaxNode? node) 862public static T WithCommentsFrom<T>(this T node, SyntaxToken leadingToken, SyntaxToken trailingToken) 870IEnumerable<SyntaxToken> leadingTokens, 871IEnumerable<SyntaxToken> trailingTokens)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.SingleLineRewriter.cs (2)
24public override SyntaxToken VisitToken(SyntaxToken token)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (32)
20public static void Deconstruct(this SyntaxToken token, out SyntaxKind kind) 23public static bool IsLastTokenOfNode<T>(this SyntaxToken token) where T : SyntaxNode 26public static bool IsLastTokenOfNode<T>(this SyntaxToken token, [NotNullWhen(true)] out T? node) where T : SyntaxNode 39public static bool IsKindOrHasMatchingText(this SyntaxToken token, SyntaxKind kind) 42public static bool HasMatchingText(this SyntaxToken token, SyntaxKind kind) 45public static bool IsOpenBraceOrCommaOfObjectInitializer(this SyntaxToken token) 49public static bool IsOpenBraceOfAccessorList(this SyntaxToken token) 58public static bool CouldBeKeyword(this SyntaxToken token) 76public static bool IsPotentialModifier(this SyntaxToken token, out SyntaxKind modifierKind) 125public static bool IsLiteral(this SyntaxToken token) 141public static bool IntersectsWith(this SyntaxToken token, int position) 144public static SyntaxToken GetPreviousTokenIfTouchingWord(this SyntaxToken token, int position) 151private static bool IsWord(SyntaxToken token) 154public static SyntaxToken GetNextNonZeroWidthTokenOrEndOfFile(this SyntaxToken token) 160public static bool IsFirstTokenOnLine(this SyntaxToken token, SourceText text) 162var previousToken = token.GetPreviousToken(includeSkipped: true, includeDirectives: true, includeDocumentationComments: true); 173public static bool SpansPreprocessorDirective(this IEnumerable<SyntaxToken> tokens) 180public static IEnumerable<SyntaxTrivia> GetAllTrailingTrivia(this SyntaxToken token) 195public static bool IsRegularStringLiteral(this SyntaxToken token) 198public static bool IsValidAttributeTarget(this SyntaxToken token) 218public static SyntaxToken WithCommentsFrom( 219this SyntaxToken token, 228public static SyntaxToken KeepCommentsAndAddElasticMarkers(this SyntaxToken token) 232public static bool TryParseGenericName(this SyntaxToken genericIdentifier, CancellationToken cancellationToken, [NotNullWhen(true)] out GenericNameSyntax? genericName) 236var lastToken = genericIdentifier.FindLastTokenOfPartialGenericName(); 256public static SyntaxToken FindLastTokenOfPartialGenericName(this SyntaxToken genericIdentifier) 261var token = genericIdentifier.GetNextToken(includeSkipped: true); 270var next = token.GetNextToken(includeSkipped: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (9)
28var token = tokenOnLeftOfPosition.GetPreviousTokenIfTouchingWord(position); 91public static bool IsRightOfDotOrArrowOrColonColon(this SyntaxTree syntaxTree, int position, SyntaxToken targetToken, CancellationToken cancellationToken) 186var eof = root.EndOfFileToken; 318private static bool AtEndOfIncompleteStringOrCharLiteral(SyntaxToken token, int position, char lastChar, CancellationToken cancellationToken) 389this SyntaxTree syntaxTree, int position, out SyntaxToken stringLiteral, CancellationToken cancellationToken) 391var token = syntaxTree.GetRoot(cancellationToken).FindToken(position, findInsideTrivia: true); 441var token = root.FindToken(position, findInsideTrivia: true); 536public static bool IsPreProcessorKeywordContext(this SyntaxTree syntaxTree, int position, SyntaxToken preProcessorTokenOnLeftOfPosition) 546var token = preProcessorTokenOnLeftOfPosition;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpSyntaxFormatting.cs (2)
48protected override AbstractFormattingResult Format(SyntaxNode node, SyntaxFormattingOptions options, ImmutableArray<AbstractFormattingRule> formattingRules, SyntaxToken startToken, SyntaxToken endToken, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\DefaultOperationProvider.cs (4)
39public override AdjustNewLinesOperation? GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation) 43public override AdjustSpacesOperation GetAdjustSpacesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustSpacesOperation nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\AggregatedFormattingResult.cs (2)
21protected override SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\CSharpFormatEngine.cs (2)
19SyntaxToken startToken, 20SyntaxToken endToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\CSharpStructuredTriviaFormatEngine.cs (2)
33SyntaxToken startToken, 34SyntaxToken endToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\FormattingResult.cs (2)
24protected override SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> changeMap, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (2)
25SyntaxToken token1, 26SyntaxToken token2,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.Analyzer.cs (6)
16public static AnalysisResult Leading(SyntaxToken token) 24public static AnalysisResult Trailing(SyntaxToken token) 32public static AnalysisResult Between(SyntaxToken token1, SyntaxToken token2) 66for (var currentToken = token1; !currentToken.IsKind(SyntaxKind.None);) 68var previousToken = currentToken.GetPreviousToken(includeSkipped: false, includeZeroWidth: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.cs (1)
330foreach (var token in xmlComment.DescendantTokens())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.ComplexTrivia.cs (2)
24public ComplexTrivia(LineFormattingOptions options, TreeData treeInfo, SyntaxToken token1, SyntaxToken token2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.cs (8)
29public override TriviaData CreateLeadingTrivia(SyntaxToken token) 49public override TriviaData CreateTrailingTrivia(SyntaxToken token) 69public override TriviaData Create(SyntaxToken token1, SyntaxToken token2) 99private TriviaData? GetWhitespaceOnlyTriviaInfo(SyntaxToken token1, SyntaxToken token2, Analyzer.AnalysisResult result) 130private int CalculateSpaces(SyntaxToken token1, SyntaxToken token2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.FormattedComplexTrivia.cs (2)
24SyntaxToken token1, 25SyntaxToken token2,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaRewriter.cs (16)
25private readonly Dictionary<SyntaxToken, SyntaxTriviaList> _trailingTriviaMap = []; 26private readonly Dictionary<SyntaxToken, SyntaxTriviaList> _leadingTriviaMap = []; 31Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, 48Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, 70KeyValuePair<ValueTuple<SyntaxToken, SyntaxToken>, 99private TextSpan GetTextSpan(ValueTuple<SyntaxToken, SyntaxToken> pair) 135ValueTuple<SyntaxToken, SyntaxToken> pair, 163public override SyntaxToken VisitToken(SyntaxToken token) 208private static SyntaxToken CreateNewToken(SyntaxTriviaList leadingTrivia, SyntaxToken token, SyntaxTriviaList trailingTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\FormattingHelpers.cs (53)
20public static string GetIndent(this SyntaxToken token) 48public static (SyntaxToken openBrace, SyntaxToken closeBrace) GetBracePair(this SyntaxNode? node) 51public static (SyntaxToken openBracket, SyntaxToken closeBracket) GetBracketPair(this SyntaxNode? node) 54public static bool IsValidBracketOrBracePair(this (SyntaxToken openBracketOrBrace, SyntaxToken closeBracketOrBrace) bracketOrBracePair) 76public static bool IsOpenParenInParameterListOfAConversionOperatorDeclaration(this SyntaxToken token) 79public static bool IsOpenParenInParameterListOfAOperationDeclaration(this SyntaxToken token) 82public static bool IsOpenParenInParameterList(this SyntaxToken token) 85public static bool IsCloseParenInParameterList(this SyntaxToken token) 88public static bool IsOpenParenInArgumentListOrPositionalPattern(this SyntaxToken token) 94public static bool IsCloseParenInArgumentListOrPositionalPattern(this SyntaxToken token) 100private static bool IsTokenInArgumentListOrPositionalPattern(SyntaxToken token) 118public static bool IsColonInTypeBaseList(this SyntaxToken token) 121public static bool IsCommaInArgumentOrParameterList(this SyntaxToken token) 124public static bool IsOpenParenInParameterListOfParenthesizedLambdaExpression(this SyntaxToken token) 147public static bool IsSemicolonInForStatement(this SyntaxToken token) 155public static bool IsSemicolonOfEmbeddedStatement(this SyntaxToken token) 171public static bool IsCloseBraceOfExpression(this SyntaxToken token) 181public static bool IsCloseBraceOfEmbeddedBlock(this SyntaxToken token) 207public static bool IsCommaInEnumDeclaration(this SyntaxToken token) 213public static bool IsCommaInAnyArgumentsList(this SyntaxToken token) 219public static bool IsParenInParenthesizedExpression(this SyntaxToken token) 229public static bool IsParenInArgumentList(this SyntaxToken token) 275public static bool IsEqualsTokenInAutoPropertyInitializers(this SyntaxToken token) 282public static bool IsCloseParenInStatement(this SyntaxToken token) 304public static bool IsDotInMemberAccessOrQualifiedName(this SyntaxToken token) 307public static bool IsDotInMemberAccess(this SyntaxToken token) 318public static bool IsGenericGreaterThanToken(this SyntaxToken token) 326public static bool IsCommaInInitializerExpression(this SyntaxToken token) 333public static bool IsColonInCasePatternSwitchLabel(this SyntaxToken token) 336public static bool IsColonInSwitchExpressionArm(this SyntaxToken token) 339public static bool IsCommaInSwitchExpression(this SyntaxToken token) 342public static bool IsCommaInPropertyPatternClause(this SyntaxToken token) 345public static bool IsIdentifierInLabeledStatement(this SyntaxToken token) 352public static bool IsColonInSwitchLabel(this SyntaxToken token) 355public static bool IsColonInLabeledStatement(this SyntaxToken token) 373public static bool IsNestedQueryExpression(this SyntaxToken token) 380public static bool IsFirstFromKeywordInExpression(this SyntaxToken token) 465public static bool ParenOrBracketContainsNothing(this SyntaxToken token1, SyntaxToken token2) 471public static bool IsLastTokenInLabelStatement(this SyntaxToken token) 486public static (SyntaxToken firstToken, SyntaxToken lastToken) GetFirstAndLastMemberDeclarationTokensAfterAttributes(this MemberDeclarationSyntax node) 497var lastToken = node.GetLastToken(includeZeroWidth: true); 498var lastAttributeToken = attributes.Last().GetLastToken(includeZeroWidth: true); 504var firstTokenAfterAttribute = lastAttributeToken.GetNextToken(includeZeroWidth: true); 510public static bool IsPlusOrMinusExpression(this SyntaxToken token) 520public static bool IsInterpolation(this SyntaxToken currentToken) 526public static bool IsOpenParenInVarDeconstructionDeclaration(this SyntaxToken currentToken) 536public static bool IsCommaInTupleExpression(this SyntaxToken currentToken) 542public static bool IsCommaInCollectionExpression(this SyntaxToken token)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\BaseFormattingRule.cs (27)
19SyntaxToken startToken, 20SyntaxToken endToken, 34SyntaxToken startToken, 35SyntaxToken endToken, 59SyntaxToken startToken, 60SyntaxToken endToken, 73SyntaxToken startToken, 74SyntaxToken endToken, 87SyntaxToken startToken, 88SyntaxToken endToken, 102SyntaxToken baseToken, 103SyntaxToken startToken, 104SyntaxToken endToken, 112SyntaxToken baseToken, 113SyntaxToken startToken, 114SyntaxToken endToken, 120protected static void AddSuppressWrappingIfOnSingleLineOperation(ArrayBuilder<SuppressOperation> list, SyntaxToken startToken, SyntaxToken endToken, SuppressOption extraOption = SuppressOption.None) 123protected static void AddSuppressAllOperationIfOnMultipleLine(ArrayBuilder<SuppressOperation> list, SyntaxToken startToken, SyntaxToken endToken, SuppressOption extraOption = SuppressOption.None) 126protected static void AddSuppressOperation(ArrayBuilder<SuppressOperation> list, SyntaxToken startToken, SyntaxToken endToken, SuppressOption option) 136protected static void AddAnchorIndentationOperation(List<AnchorIndentationOperation> list, SyntaxToken anchorToken, SyntaxToken endToken) 146protected static void AddAlignIndentationOfTokensToBaseTokenOperation(List<AlignTokensOperation> list, SyntaxNode containingNode, SyntaxToken baseNode, IEnumerable<SyntaxToken> tokens, AlignTokensOption option = AlignTokensOption.AlignIndentationOfTokensToBaseToken) 170var firstTokenOfNode = node.GetFirstToken(includeZeroWidth: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (17)
88private static SyntaxToken? GetLastTokenOfType(SyntaxNode node) 108public override AdjustNewLinesOperation? GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation) 127var firstTokenAfterTypeConstraint = currentToken.Parent.GetLastToken().GetNextToken(); 128var lastTokenForTypeConstraint = currentToken.Parent.GetLastToken().GetNextToken(); 174private static AdjustNewLinesOperation? GetAdjustNewLinesOperationAfterFileScopedNamespace(SyntaxToken previousToken, SyntaxToken currentToken) 194private static AdjustNewLinesOperation? GetAdjustNewLinesOperationBetweenMembers(SyntaxToken previousToken, SyntaxToken currentToken) 251private static bool TryGetOperationBeforeDocComment(SyntaxToken currentToken, [NotNullWhen(true)] out AdjustNewLinesOperation? operation) 270public override AdjustSpacesOperation? GetAdjustSpacesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustSpacesOperation nextOperation) 308private static int LineBreaksAfter(SyntaxToken previousToken, SyntaxToken currentToken) 423private static int LineBreaksAfterCloseBrace(SyntaxToken nextToken) 452private static int LineBreaksAfterSemicolon(SyntaxToken previousToken, SyntaxToken currentToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\EndOfFileTokenFormattingRule.cs (4)
13public override AdjustNewLinesOperation? GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation) 25public override AdjustSpacesOperation? GetAdjustSpacesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustSpacesOperation nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (16)
69var baseToken = declaringNode.GetFirstToken(); 115var lastTokenOfLabel = section.Labels.Last().GetLastToken(includeZeroWidth: true); 116var nextToken = lastTokenOfLabel.GetNextToken(includeZeroWidth: true); 124var startToken = section.Statements.First().GetFirstToken(includeZeroWidth: true); 125var endToken = section.Statements.Last().GetLastToken(includeZeroWidth: true); 190var baseTokenForAlignment = recursivePatternParent.GetFirstToken(); 209var baseToken = baseNode.GetFirstToken(includeZeroWidth: true); 210var firstToken = body.GetFirstToken(includeZeroWidth: true); 211var lastToken = body.GetLastToken(includeZeroWidth: true); 274var firstToken = node.GetFirstToken(includeZeroWidth: true); 275var lastToken = node.GetLastToken(includeZeroWidth: true); 276var baseToken = firstToken.GetPreviousToken(includeZeroWidth: true); 282private static void AddAlignmentBlockOperationRelativeToFirstTokenOnBaseTokenLine(List<IndentBlockOperation> list, (SyntaxToken openBrace, SyntaxToken closeBrace) bracePair) 352var firstToken = statement.GetFirstToken(includeZeroWidth: true); 353var lastToken = statement.GetLastToken(includeZeroWidth: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (4)
76public override AdjustSpacesOperation? GetAdjustSpacesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustSpacesOperation nextOperation) 237public override AdjustNewLinesOperation? GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\QueryExpressionFormattingRule.cs (10)
75var baseToken = fromClause.FromKeyword; 76var startToken = fromClause.Expression.GetFirstToken(includeZeroWidth: true); 77var endToken = fromClause.Expression.GetLastToken(includeZeroWidth: true); 100var baseToken = queryExpression.GetFirstToken(includeZeroWidth: true); 101var endToken = queryExpression.GetLastToken(includeZeroWidth: true); 104var startToken = baseToken.GetNextToken(includeZeroWidth: true); 117var firstToken = queryClause.GetFirstToken(includeZeroWidth: true); 124var firstToken = selectOrGroupClause.GetFirstToken(includeZeroWidth: true); 135public override AdjustNewLinesOperation? GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (5)
43public override AdjustSpacesOperation? GetAdjustSpacesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustSpacesOperation nextOperation) 585var firstToken = node.GetFirstToken(includeZeroWidth: true); 586var lastToken = node.GetLastToken(includeZeroWidth: true); 605private static bool HasFormattableBracketParent(SyntaxToken token)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\StructuredTriviaFormattingRule.cs (4)
14public override AdjustNewLinesOperation? GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation) 24public override AdjustSpacesOperation? GetAdjustSpacesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustSpacesOperation nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (12)
57var openParenToken = positional.OpenParenToken; 58var closeParenToken = positional.CloseParenToken; 70var openBraceToken = property.OpenBraceToken; 71var closeBraceToken = property.CloseBraceToken; 161var endToken = node.GetLastToken(includeZeroWidth: true); 225var anchorToken = parameterNode.AttributeLists.First().OpenBracketToken; 270var firstToken = statementNode.GetFirstToken(includeZeroWidth: true); 271var lastToken = statementNode.GetLastToken(includeZeroWidth: true); 327var startToken = pragmaWarningDirectiveTrivia.GetLastToken(includeZeroWidth: true, includeDirectives: true); 330var endToken = endDirective is null 407var firstToken = item.GetFirstToken(includeZeroWidth: true); 408var lastToken = item.GetLastToken(includeZeroWidth: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\TokenBasedFormattingRule.cs (6)
43public override AdjustNewLinesOperation? GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation) 219SyntaxToken previousToken, SyntaxToken currentToken) 256public override AdjustSpacesOperation? GetAdjustSpacesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustSpacesOperation nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\WrappingFormattingRule.cs (13)
67private static (SyntaxToken firstToken, SyntaxToken lastToken) GetSpecificNodeSuppressionTokenRange(SyntaxNode node) 72var firstTokenOfEmbeddedStatement = embeddedStatement.GetFirstToken(includeZeroWidth: true); 73var firstToken = firstTokenOfEmbeddedStatement.GetPreviousToken(includeZeroWidth: true); 108var firstToken = statementNode.GetFirstToken(includeZeroWidth: true); 109var lastToken = statementNode.GetLastToken(includeZeroWidth: true); 118var firstToken = statementNode.GetFirstToken(includeZeroWidth: true); 119var lastToken = statementNode.GetLastToken(includeZeroWidth: true); 145var firstTokenOfNode = node.GetFirstToken(includeZeroWidth: true); 158private static (SyntaxToken openBrace, SyntaxToken closeBrace) GetBracePair(SyntaxNode node) 180SyntaxToken startToken, 181SyntaxToken endToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Indentation\CSharpSmartTokenFormatter.cs (10)
47SyntaxToken startToken, SyntaxToken endToken, CancellationToken cancellationToken) 71private static bool CloseBraceOfTryOrDoBlock(SyntaxToken endToken) 78public IList<TextChange> FormatToken(SyntaxToken token, CancellationToken cancellationToken) 83var previousToken = token.GetPreviousToken(includeZeroWidth: true); 99var nextToken = token.GetNextToken(includeZeroWidth: true); 127public override AdjustNewLinesOperation? GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation) 155public override AdjustSpacesOperation? GetAdjustSpacesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustSpacesOperation nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SelectedMembers\CSharpSelectedMembers.cs (1)
30protected override ImmutableArray<(SyntaxNode declarator, SyntaxToken identifier)> GetDeclaratorsAndIdentifiers(MemberDeclarationSyntax member)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (4)
58public ISymbol? GetDeclaredSymbol(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 270public ImmutableArray<ISymbol> GetBestOrAllSymbols(SemanticModel semanticModel, SyntaxNode? node, SyntaxToken token, CancellationToken cancellationToken) 296private ImmutableArray<ISymbol> GetSymbolInfo(SemanticModel semanticModel, SyntaxNode node, SyntaxToken token, CancellationToken cancellationToken) 407private static IPreprocessingSymbol? CreatePreprocessingSymbol(SemanticModel model, SyntaxToken identifier)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (1)
109foreach (var token in modifierList)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpDocumentationCommentService.cs (1)
37protected override SyntaxToken GetIdentifier(XmlNameAttributeSyntax xmlName)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (64)
75public SyntaxToken ParseToken(string text) 93public bool IsVerbatimIdentifier(SyntaxToken token) 96public bool IsOperator(SyntaxToken token) 107public bool IsReservedKeyword(SyntaxToken token) 110public bool IsContextualKeyword(SyntaxToken token) 113public bool IsPreprocessorKeyword(SyntaxToken token) 198public void GetPartsOfUsingAliasDirective(SyntaxNode node, out SyntaxToken globalKeyword, out SyntaxToken alias, out SyntaxNode name) 271public bool IsThisConstructorInitializer(SyntaxToken token) 275public bool IsBaseConstructorInitializer(SyntaxToken token) 279public bool IsQueryKeyword(SyntaxToken token) 306public bool IsPredefinedType(SyntaxToken token) 309public bool IsPredefinedType(SyntaxToken token, PredefinedType type) 318public bool TryGetPredefinedType(SyntaxToken token, out PredefinedType type) 324private static PredefinedType GetPredefinedType(SyntaxToken token) 352public bool IsPredefinedOperator(SyntaxToken token) 355public bool IsPredefinedOperator(SyntaxToken token, PredefinedOperator op) 358public bool TryGetPredefinedOperator(SyntaxToken token, out PredefinedOperator op) 364private static PredefinedOperator GetPredefinedOperator(SyntaxToken token) 460var token = SyntaxFactory.ParseToken(identifier); 466var token = SyntaxFactory.ParseToken(identifier); 475public bool IsLiteral(SyntaxToken token) 503public bool IsStringLiteralOrInterpolatedStringLiteral(SyntaxToken token) 506public bool IsBindableToken(SyntaxToken token) 821var identifier = ((IdentifierNameSyntax)node).Identifier; 842var nameToken = memberDeclaration.GetNameToken(); 871var nameToken = fieldDeclarator.Identifier; 996public SyntaxNode? TryGetBindableParent(SyntaxToken token) 1196public bool IsVerbatimStringLiteral(SyntaxToken token) 1199public bool IsNumericLiteral(SyntaxToken token) 1302SyntaxNode statement, out SyntaxNode left, out SyntaxToken operatorToken, out SyntaxNode right) 1309SyntaxNode statement, out SyntaxNode left, out SyntaxToken operatorToken, out SyntaxNode right) 1327public SyntaxToken GetIdentifierOfSimpleName(SyntaxNode node) 1330public SyntaxToken GetIdentifierOfVariableDeclarator(SyntaxNode node) 1333public SyntaxToken GetIdentifierOfTypeDeclaration(SyntaxNode node) 1345public bool AreEquivalent(SyntaxToken token1, SyntaxToken token2) 1361out SyntaxToken openParen, out SeparatedSyntaxList<TArgumentSyntax> arguments, out SyntaxToken closeParen) where TArgumentSyntax : SyntaxNode 1372public bool ContainsInterleavedDirective(TextSpan span, SyntaxToken token, CancellationToken cancellationToken) 1413public SyntaxToken? GetDeclarationIdentifierIfOverride(SyntaxToken token) 1447public void GetPartsOfIsPatternExpression(SyntaxNode node, out SyntaxNode left, out SyntaxToken isToken, out SyntaxNode right) 1490public void GetPartsOfParenthesizedPattern(SyntaxNode node, out SyntaxToken openParen, out SyntaxNode pattern, out SyntaxToken closeParen) 1498public void GetPartsOfBinaryPattern(SyntaxNode node, out SyntaxNode left, out SyntaxToken operatorToken, out SyntaxNode right) 1506public void GetPartsOfUnaryPattern(SyntaxNode node, out SyntaxToken operatorToken, out SyntaxNode pattern) 1513public void GetPartsOfRelationalPattern(SyntaxNode node, out SyntaxToken operatorToken, out SyntaxNode expression) 1581public void GetPartsOfArgumentList(SyntaxNode node, out SyntaxToken openParenToken, out SeparatedSyntaxList<SyntaxNode> arguments, out SyntaxToken closeParenToken) 1603public void GetPartsOfBinaryExpression(SyntaxNode node, out SyntaxNode left, out SyntaxToken operatorToken, out SyntaxNode right) 1620SyntaxNode node, out SyntaxNode expression, out SyntaxToken operatorToken, out SyntaxNode whenNotNull) 1642public void GetPartsOfGenericName(SyntaxNode node, out SyntaxToken identifier, out SeparatedSyntaxList<SyntaxNode> typeArguments) 1650out SyntaxToken stringStartToken, out SyntaxList<SyntaxNode> contents, out SyntaxToken stringEndToken) 1665public void GetPartsOfMemberAccessExpression(SyntaxNode node, out SyntaxNode expression, out SyntaxToken operatorToken, out SyntaxNode name) 1688public void GetPartsOfObjectCreationExpression(SyntaxNode node, out SyntaxToken keyword, out SyntaxNode type, out SyntaxNode? argumentList, out SyntaxNode? initializer) 1697public void GetPartsOfImplicitObjectCreationExpression(SyntaxNode node, out SyntaxToken keyword, out SyntaxNode argumentList, out SyntaxNode? initializer) 1705public void GetPartsOfParameter(SyntaxNode node, out SyntaxToken identifier, out SyntaxNode? @default) 1713SyntaxNode node, out SyntaxToken openParen, out SyntaxNode expression, out SyntaxToken closeParen) 1721public void GetPartsOfPrefixUnaryExpression(SyntaxNode node, out SyntaxToken operatorToken, out SyntaxNode operand) 1728public void GetPartsOfQualifiedName(SyntaxNode node, out SyntaxNode left, out SyntaxToken operatorToken, out SyntaxNode right) 1761public SyntaxToken GetTokenOfLiteralExpression(SyntaxNode node)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\FormattingRangeHelper.cs (38)
20public static ValueTuple<SyntaxToken, SyntaxToken>? FindAppropriateRange(SyntaxToken endToken, bool useDefaultRange = true) 27private static ValueTuple<SyntaxToken, SyntaxToken>? FixupOpenBrace(ValueTuple<SyntaxToken, SyntaxToken>? tokenRange) 37var currentToken = tokenRange.Value.Item1; 38var previousToken = currentToken.GetPreviousToken(); 55private static ValueTuple<SyntaxToken, SyntaxToken>? FindAppropriateRangeWorker(SyntaxToken endToken, bool useDefaultRange) 112private static ValueTuple<SyntaxToken, SyntaxToken>? FindAppropriateRangeForSemicolon(SyntaxToken endToken) 168private static ValueTuple<SyntaxToken, SyntaxToken>? FindAppropriateRangeForCloseBrace(SyntaxToken endToken) 215var firstTokenOfInnerBlock = parent.GetFirstToken(); 216var lastTokenOfInnerBlock = parent.GetLastToken(); 250var firstTokenOfInnerBlock = parent.GetFirstToken(); 251var lastTokenOfInnerBlock = parent.GetLastToken(); 268private static ValueTuple<SyntaxToken, SyntaxToken>? FindAppropriateRangeForColon(SyntaxToken endToken) 286private static SyntaxToken GetPreviousTokenIfNotFirstTokenInTree(SyntaxToken token) 288var previousToken = token.GetPreviousToken(); 292public static bool AreTwoTokensOnSameLine(SyntaxToken token1, SyntaxToken token2) 308private static SyntaxToken GetAppropriatePreviousToken(SyntaxToken startToken, bool canTokenBeFirstInABlock = false) 310var previousToken = startToken.GetPreviousToken(); 346private static bool IsOpenBraceTokenOfABlockOrTypeOrNamespace(SyntaxToken previousToken) 407public static bool IsColonInSwitchLabel(SyntaxToken token) 414public static bool InBetweenTwoMembers(SyntaxToken previousToken, SyntaxToken currentToken) 434public static MemberDeclarationSyntax? GetEnclosingMember(SyntaxToken token)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\NameSyntaxComparer.cs (3)
12private readonly IComparer<SyntaxToken> _tokenComparer; 15internal NameSyntaxComparer(IComparer<SyntaxToken> tokenComparer) 24public static IComparer<NameSyntax?> Create(IComparer<SyntaxToken> tokenComparer)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TokenComparer.cs (7)
11internal class TokenComparer : IComparer<SyntaxToken> 13public static readonly IComparer<SyntaxToken> NormalInstance = new TokenComparer(specialCaseSystem: false); 14public static readonly IComparer<SyntaxToken> SystemFirstInstance = new TokenComparer(specialCaseSystem: true); 21public int Compare(SyntaxToken x, SyntaxToken y) 43private static int CompareWorker(SyntaxToken x, SyntaxToken y)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpTypeStyleHelper.cs (1)
80SyntaxToken identifier, TypeSyntax typeName, ExpressionSyntax initializer, SemanticModel semanticModel, CSharpSimplifierOptions options, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseExplicitTypeHelper.cs (1)
138SyntaxToken identifier,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
271SyntaxToken identifier,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeSyntaxComparer.cs (2)
12private readonly IComparer<SyntaxToken> _tokenComparer; 15internal TypeSyntaxComparer(IComparer<SyntaxToken> tokenComparer, IComparer<NameSyntax?> nameComparer)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesDirectiveComparer.cs (2)
23private readonly IComparer<SyntaxToken> _tokenComparer; 27IComparer<SyntaxToken> tokenComparer)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (355)
src\Analyzers\CSharp\CodeFixes\AddAnonymousTypeMemberName\CSharpAddAnonymousTypeMemberNameCodeFixProvider.cs (1)
36protected override AnonymousObjectMemberDeclaratorSyntax WithName(AnonymousObjectMemberDeclaratorSyntax declarator, SyntaxToken name)
src\Analyzers\CSharp\CodeFixes\AddInheritdoc\AddInheritdocCodeFixProvider.cs (2)
99var xmlSpaceAfterTripleSlash = Token(leading: [DocumentationCommentExterior("///")], SyntaxKind.XmlTextLiteralToken, text: " ", valueText: " ", trailing: default); 103var xmlNewLineToken = Token(leading: default, SyntaxKind.XmlTextLiteralNewLineToken, text: newLine, valueText: newLine, trailing: default);
src\Analyzers\CSharp\CodeFixes\ConditionalExpressionInStringInterpolation\CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider.cs (1)
110var endToken = sourceText.AreOnSameLine(conditional.ColonToken, conditional.WhenFalse.GetFirstToken())
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (5)
227var token = root.FindToken(textLine.Start, findInsideTrivia: true); 286var firstBodyToken = converted.OpenBraceToken.GetNextToken(includeZeroWidth: true, includeSkipped: true); 288&& HasLeadingBlankLine(firstBodyToken, out var firstBodyTokenWithoutBlankLine)) 303SyntaxToken token, out SyntaxToken withoutBlankLine)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (4)
380SyntaxToken recordKeyword, 386SyntaxToken openBrace, closeBrace, semicolon; 731SyntaxToken prevToken = default; 733foreach (var token in text.TextTokens)
src\Analyzers\CSharp\CodeFixes\DocumentationComments\CSharpRemoveDocCommentNodeCodeFixProvider.cs (2)
46protected override bool IsXmlWhitespaceToken(SyntaxToken token) 49protected override bool IsXmlNewLineToken(SyntaxToken token)
src\Analyzers\CSharp\CodeFixes\FixIncorrectConstraint\CSharpFixIncorrectConstraintCodeFixProvider.cs (1)
34out SyntaxToken enumOrDelegateKeyword)
src\Analyzers\CSharp\CodeFixes\GenerateConstructor\CSharpGenerateConstructorService.cs (5)
47out SyntaxToken token, 85out SyntaxToken token, 117out SyntaxToken token, 152out SyntaxToken token, 185protected override IMethodSymbol GetCurrentConstructor(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\GenerateConstructor\GenerateConstructorCodeFixProvider.cs (1)
50protected override bool IsCandidate(SyntaxNode node, SyntaxToken token, Diagnostic diagnostic)
src\Analyzers\CSharp\CodeFixes\GenerateDefaultConstructors\CSharpGenerateDefaultConstructorsCodeFixProvider.cs (1)
28protected override SyntaxToken? TryGetTypeName(SyntaxNode typeDeclaration)
src\Analyzers\CSharp\CodeFixes\GenerateEnumMember\CSharpGenerateEnumMemberService.cs (1)
27out SyntaxToken identifierToken, out ExpressionSyntax simpleNameOrMemberAccessExpression)
src\Analyzers\CSharp\CodeFixes\GenerateEnumMember\GenerateEnumMemberCodeFixProvider.cs (1)
38protected override bool IsCandidate(SyntaxNode node, SyntaxToken token, Diagnostic diagnostic)
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateConversionCodeFixProvider.cs (1)
35protected override bool IsCandidate(SyntaxNode node, SyntaxToken token, Diagnostic diagnostic)
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
53var token = root.FindToken(span.Start);
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateMethodCodeFixProvider.cs (1)
54protected override bool IsCandidate(SyntaxNode node, SyntaxToken token, Diagnostic diagnostic)
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateConversionService.cs (2)
59out SyntaxToken identifierToken, 85out SyntaxToken identifierToken,
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateMethodService.cs (2)
51out SyntaxToken identifierToken, 82out SyntaxToken identifierToken,
src\Analyzers\CSharp\CodeFixes\GenerateVariable\CSharpGenerateVariableCodeFixProvider.cs (1)
40protected override bool IsCandidate(SyntaxNode node, SyntaxToken token, Diagnostic diagnostic)
src\Analyzers\CSharp\CodeFixes\HideBase\HideBaseCodeFixProvider.AddNewKeywordAction.cs (3)
58int CompareModifiers(SyntaxToken left, SyntaxToken right) 61int GetOrder(SyntaxToken token)
src\Analyzers\CSharp\CodeFixes\ImplementAbstractClass\CSharpImplementAbstractClassCodeFixProvider.cs (1)
27protected override SyntaxToken GetClassIdentifier(TypeDeclarationSyntax classNode)
src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (1)
124var localDeclarationToken = localDeclarationStatement.GetFirstToken();
src\Analyzers\CSharp\CodeFixes\MakeMethodAsynchronous\CSharpMakeMethodAsynchronousCodeFixProvider.cs (2)
33private static readonly SyntaxToken s_asyncKeywordWithSpace = AsyncKeyword.WithoutTrivia().WithTrailingTrivia(Space); 48var token = root.FindToken(diagnostic.Location.SourceSpan.Start);
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (2)
431var firstToken = compilationUnit.GetFirstToken(includeZeroWidth: true); 433var newFirstToken = firstToken.WithLeadingTrivia(newLeadingTrivia);
src\Analyzers\CSharp\CodeFixes\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementCodeFixProvider.cs (1)
67SyntaxToken token,
src\Analyzers\CSharp\CodeFixes\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementCodeFixProvider.cs (1)
68SyntaxToken token,
src\Analyzers\CSharp\CodeFixes\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementCodeFixProvider.cs (8)
51using var _ = PooledDictionary<SyntaxToken, SyntaxToken>.GetInstance(out var tokenToToken); 63Dictionary<SyntaxToken, SyntaxToken> tokenToToken, 68var token = root.FindToken(diagnostic.Location.SourceSpan.Start); 75var firstBrace = token.GetPreviousToken(); 83text, firstBrace, out var secondBrace, out var lastEndOfLineTrivia)) 89var updatedSecondBrace = secondBrace.WithLeadingTrivia(
src\Analyzers\CSharp\CodeFixes\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementCodeFixProvider.cs (13)
48using var _ = PooledDictionary<SyntaxToken, SyntaxToken>.GetInstance(out var replacementMap); 53var colonToken = initializer.ColonToken; 54var thisBaseKeyword = initializer.ThisOrBaseKeyword; 55var parenToken = colonToken.GetPreviousToken(); 89Dictionary<SyntaxToken, SyntaxToken> replacementMap, SyntaxToken colonToken, SyntaxToken thisBaseKeyword) 92var closeParen = colonToken.GetPreviousToken(); 102static SyntaxToken ComputeNewCloseParen(SyntaxToken colonToken, SyntaxToken previousToken)
src\Analyzers\CSharp\CodeFixes\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementCodeFixProvider.cs (4)
107var openBrace = block.OpenBraceToken; 108var previousToken = openBrace.GetPreviousToken(); 131private static SyntaxToken AddLeadingTrivia(SyntaxToken token, SyntaxTrivia trivia)
src\Analyzers\CSharp\CodeFixes\RemoveUnusedParametersAndValues\CSharpRemoveUnusedValuesCodeFixProvider.cs (2)
39protected override SyntaxToken GetForEachStatementIdentifier(ForEachStatementSyntax node) 45protected override SyntaxNode? TryUpdateNameForFlaggedNode(SyntaxNode node, SyntaxToken newName)
src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (2)
38out SyntaxToken classOrStructKeyword, 39out SyntaxToken recordKeyword)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (9)
410var trailingComma = default(SyntaxToken); 554var expressionFirstToken = expression.GetFirstToken(); 588var firstToken = node.GetFirstToken(); 602SyntaxToken IndentToken( 603SyntaxToken token, 715string GetIndentationStringForToken(SyntaxToken token) 853private static SyntaxToken RemoveTrailingWhitespace(SyntaxToken token)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (1)
185var firstToken = firstArgument.GetFirstToken();
src\Analyzers\CSharp\CodeFixes\UseCompoundAssignment\CSharpUseCompoundAssignmentCodeFixProvider.cs (2)
22protected override SyntaxToken Token(SyntaxKind kind) 26SyntaxKind assignmentOpKind, ExpressionSyntax left, SyntaxToken syntaxToken, ExpressionSyntax right)
src\Analyzers\CSharp\CodeFixes\UseConditionalExpression\MultiLineConditionalExpressionFormattingRule.cs (4)
33private static bool IsQuestionOrColonOfNewConditional(SyntaxToken token) 37in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation) 57var baseToken = statement.GetFirstToken();
src\Analyzers\CSharp\CodeFixes\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationCodeFixProvider.cs (2)
77private static SyntaxToken WithoutTrailingWhitespace(SyntaxToken newKeyword)
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (1)
198var separatorBuilder = ArrayBuilder<SyntaxToken>.GetInstance(builder.Count - 1, Token(leading: default, SyntaxKind.CommaToken, trailing: default));
src\Analyzers\CSharp\CodeFixes\UseInterpolatedVerbatimString\CSharpUseInterpolatedVerbatimStringCodeFixProvider.cs (2)
56var oldStartToken = verbatimInterpolated.StringStartToken; 57var newStartToken = SyntaxFactory.Token(oldStartToken.LeadingTrivia, SyntaxKind.InterpolatedVerbatimStringStartToken,
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (2)
217var identifier = localDeclaration.Declaration.Variables[0].Identifier; 230var semicolonToken = anonymousFunction.Body is ExpressionSyntax
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpAsAndNullCheckCodeFixProvider.cs (1)
101var newIdentifier = declarator.Identifier
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
224var inKeyword = current.Modifiers.FirstOrDefault(t => t.Kind() == SyntaxKind.InKeyword);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\AttributeGenerator.cs (2)
24SyntaxToken? target = null) 49AttributeData attribute, SyntaxToken? target, CSharpCodeGenerationContextInfo info)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ConstructorGenerator.cs (1)
119using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var tokens);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (5)
38ArrayBuilder<SyntaxToken> tokens, 91var lastToken = destination.GetLastToken(); 92var updatedToken = lastToken.ReplaceTrivia(lastToken.TrailingTrivia, 127private static SyntaxToken ReplaceUnterminatedConstruct(SyntaxToken token)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (4)
319SyntaxToken? target, 461ComputePositionAndTriviaForRemoveAttributeFromAttributeList(attributeToRemove, (SyntaxToken t) => t.IsKind(SyntaxKind.CommaToken), out positionOfRemovedNode, out trivia); 726public override TDeclarationNode UpdateDeclarationModifiers<TDeclarationNode>(TDeclarationNode declaration, IEnumerable<SyntaxToken> newModifiers, CSharpCodeGenerationContextInfo info, CancellationToken cancellationToken) 738using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var newModifierTokens);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (4)
395private static bool EqualIdentifierName(SyntaxToken x, SyntaxToken y, out int comparisonResult) 401private static bool EqualOperatorPrecedence(SyntaxToken x, SyntaxToken y, out int comparisonResult)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EnumMemberGenerator.cs (1)
141var numericToken = numericLiteral.Token;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EventGenerator.cs (1)
195using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var tokens);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (2)
235Func<string, T, SyntaxToken> tokenFactory) 246Func<string, T, SyntaxToken> tokenFactory,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\FieldGenerator.cs (1)
124using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var tokens);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\MethodGenerator.cs (1)
257using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var tokens);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (2)
200var classOrStructKeyword = Token(isRecordClass ? default : SyntaxKind.StructKeyword); 271using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var tokens);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\OperatorGenerator.cs (2)
87var operatorToken = Token(operatorSyntaxKind); 111using var tokens = TemporaryArray<SyntaxToken>.Empty;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\PropertyGenerator.cs (6)
159[NotNullWhen(true)] out ArrowExpressionClauseSyntax? arrowExpression, out SyntaxToken semicolonToken) 188out var expressionBody, out var semicolonToken)) 207out var expressionBody, out var semicolonToken)) 238[NotNullWhen(true)] out ArrowExpressionClauseSyntax? arrowExpression, out SyntaxToken semicolonToken) 330using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var modifiers); 348var tokens = ArrayBuilder<SyntaxToken>.GetInstance();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeRefactorings\CSharpRefactoringHelpersService.cs (1)
31var token = root.FindToken(position);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\BaseArgumentListSyntaxExtensions.cs (2)
11public static SyntaxToken GetOpenToken(this BaseArgumentListSyntax node) 19public static SyntaxToken GetCloseToken(this BaseArgumentListSyntax node)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\BaseParameterListSyntaxExtensions.cs (2)
11public static SyntaxToken GetOpenToken(this BaseParameterListSyntax node) 19public static SyntaxToken GetCloseToken(this BaseParameterListSyntax node)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\BasePropertyDeclarationSyntaxExtensions.cs (2)
15public static SyntaxToken TryGetSemicolonToken(this BasePropertyDeclarationSyntax? node) 33public static BasePropertyDeclarationSyntax? TryWithSemicolonToken(this BasePropertyDeclarationSyntax? node, SyntaxToken semicolonToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\CSharpSyntaxContext.cs (5)
54SyntaxToken leftToken, 55SyntaxToken targetToken, 429private static bool IsLeftSideOfUsingAliasDirective(SyntaxToken leftToken) 480SyntaxToken leftToken, 481SyntaxToken targetToken,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (22)
16public static bool IsUsingOrExternKeyword(this SyntaxToken token) 23public static bool IsUsingKeywordInUsingDirective(this SyntaxToken token) 38public static bool IsStaticKeywordContextInUsingDirective(this SyntaxToken token) 56public static bool IsBeginningOfStatementContext(this SyntaxToken token) 191public static bool IsBeginningOfGlobalStatementContext(this SyntaxToken token) 270public static bool IsAfterPossibleCast(this SyntaxToken token) 293public static bool IsLastTokenOfQueryClause(this SyntaxToken token) 309public static bool IsPreProcessorExpressionContext(this SyntaxToken targetToken) 355public static bool IsOrderByDirectionContext(this SyntaxToken targetToken) 386public static bool IsSwitchLabelContext(this SyntaxToken targetToken) 428public static bool IsXmlCrefParameterModifierContext(this SyntaxToken targetToken) 434public static bool IsConstructorOrMethodParameterArgumentContext(this SyntaxToken targetToken) 491public static bool IsUnaryOperatorContext(this SyntaxToken targetToken) 502public static bool IsUnsafeContext(this SyntaxToken targetToken) 511public static bool IsAfterYieldKeyword(this SyntaxToken targetToken) 519public static bool IsAnyAccessorDeclarationContext(this SyntaxToken targetToken, int position, SyntaxKind kind = SyntaxKind.None) 526public static bool IsAccessorDeclarationContext<TMemberNode>(this SyntaxToken targetToken, int position, SyntaxKind kind = SyntaxKind.None) 559private static bool IsAccessorDeclarationContextWorker(ref SyntaxToken targetToken) 627public static bool IsTypeParameterVarianceContext(this SyntaxToken targetToken) 660public static bool IsMandatoryNamedParameterPosition(this SyntaxToken token) 686public static bool IsNumericTypeContext(this SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken) 697public static bool IsTypeNamedDynamic(this SyntaxToken token)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (75)
137this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 156var originalToken = tokenOnLeftOfPosition; 157var token = originalToken; 368this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition, CancellationToken cancellationToken) 409var originalToken = tokenOnLeftOfPosition; 410var token = originalToken; 417var nextToken = originalToken.GetNextToken(includeSkipped: true); 842this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 847var token = tokenOnLeftOfPosition; 860public static bool IsTypeParameterConstraintContext(this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 867var token = tokenOnLeftOfPosition; 891public static bool IsTypeOfExpressionContext(this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 903public static bool IsDefaultExpressionContext(this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 916this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 931SyntaxToken tokenOnLeftOfPosition, 934var token = tokenOnLeftOfPosition; 954public static bool IsGenericConstraintContext(this SyntaxTree syntaxTree, SyntaxToken targetToken) 961SyntaxToken tokenOnLeftOfPosition, 969var token = tokenOnLeftOfPosition; 983if (!syntaxTree.IsInPartiallyWrittenGeneric(position, cancellationToken, out var nameToken)) 1049SyntaxToken tokenOnLeftOfPosition, 1139SyntaxToken tokenOnLeftOfPosition, 1153var token = tokenOnLeftOfPosition; 1165this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 1167var token = tokenOnLeftOfPosition; 1180this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 1182var token = tokenOnLeftOfPosition; 1194public static bool IsParameterTypeContext(this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 1211public static bool IsPossibleExtensionMethodContext(this SyntaxTree syntaxTree, SyntaxToken tokenOnLeftOfPosition) 1223this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition, CancellationToken cancellationToken) 1225var token = tokenOnLeftOfPosition; 1255this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 1257var token = tokenOnLeftOfPosition; 1282this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition, CancellationToken cancellationToken) 1284var token = tokenOnLeftOfPosition; 1307public static bool IsPossibleTupleContext(this SyntaxTree syntaxTree, SyntaxToken leftToken, int position) 1327var possibleCommaOrParen = FindTokenOnLeftOfNode(leftToken.Parent); 1339var possibleCommaOrParen = FindTokenOnLeftOfNode(leftToken.Parent!); 1352var possibleCommaOrParen = FindTokenOnLeftOfNode(leftToken.Parent.Parent); 1362public static bool IsAtStartOfPattern(this SyntaxTree syntaxTree, SyntaxToken leftToken, int position) 1456public static bool IsAtEndOfPattern(this SyntaxTree syntaxTree, SyntaxToken leftToken, int position) 1458var originalLeftToken = leftToken; 1541static bool IsAtEndOfSwitchStatementPattern(SyntaxToken leftToken) 1563private static SyntaxToken FindTokenOnLeftOfNode(SyntaxNode node) 1566public static bool IsPossibleTupleOpenParenOrComma(this SyntaxToken possibleCommaOrParen) 1689private static bool IsPossibleVarDeconstructionOpenParenOrComma(SyntaxToken leftToken) 1711SyntaxToken tokenOnLeftOfPosition, 1734var token = tokenOnLeftOfPosition; 1749this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 1751var token = tokenOnLeftOfPosition; 1766this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition, CancellationToken cancellationToken) 1880this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 1885var token = tokenOnLeftOfPosition; 1914public static bool IsIsOrAsTypeContext(this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 1916var token = tokenOnLeftOfPosition; 1926this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition, CancellationToken cancellationToken) 1944private static bool IsNonConstantExpressionContext(SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition, CancellationToken cancellationToken) 1958public static bool IsStatementContext(this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition, CancellationToken cancellationToken) 1970var token = tokenOnLeftOfPosition; 1999public static bool IsInstanceContext(this SyntaxTree syntaxTree, SyntaxToken targetToken, SemanticModel semanticModel, CancellationToken cancellationToken) 2030this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition, CancellationToken cancellationToken) 2043public static bool IsDefiniteCastTypeContext(this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 2045var token = tokenOnLeftOfPosition; 2058SyntaxToken tokenOnLeftOfPosition) 2165SyntaxToken tokenOnLeftOfPosition, 2342var previousToken = tokenOnLeftOfPosition.GetPreviousToken(includeSkipped: true); 2737public static bool IsInvocationOfVarExpression(this SyntaxToken token) 2811SyntaxToken tokenOnLeftOfPosition, 2817var token = tokenOnLeftOfPosition; 2928this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 2945var token = tokenOnLeftOfPosition; 2963public static bool IsCatchFilterContext(this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 2971var token = tokenOnLeftOfPosition; 2988public static bool IsEnumBaseListContext(this SyntaxTree syntaxTree, SyntaxToken targetToken) 3055public static bool IsFunctionPointerCallingConventionContext(this SyntaxTree syntaxTree, SyntaxToken targetToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
256var name = element.IsImplicitlyDeclared ? default : Identifier(element.Name);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\NameSyntaxExtensions.cs (1)
25public static SyntaxToken GetNameToken(this NameSyntax nameSyntax)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\StringExtensions.cs (2)
31public static SyntaxToken ToIdentifierToken( 46var token = SyntaxFactory.Identifier(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SyntaxTokenListExtensions.cs (1)
12public static IEnumerable<SyntaxToken> SkipKinds(this SyntaxTokenList tokenList, params SyntaxKind[] kinds)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SyntaxTreeExtensions.cs (6)
15public static bool IsPrimaryFunctionExpressionContext(this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 42out SyntaxToken genericIdentifier) 51out SyntaxToken genericIdentifier, 52out SyntaxToken lessThanToken) 170private static bool IsFullyWrittenGeneric(SyntaxToken token, SyntaxToken lessThanToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (7)
55private static SyntaxToken GetEndToken(SyntaxNode node) 57var lastToken = node.GetLastToken(includeZeroWidth: true, includeSkipped: true); 61var nextToken = lastToken.GetNextToken(includeZeroWidth: true, includeSkipped: true); 98private static SyntaxToken EnsureToken(SyntaxToken token, SyntaxKind kind, bool prependNewLineIfMissing = false, bool appendNewLineIfMissing = false) 112var openBrace = EnsureToken(typeDeclaration.OpenBraceToken, SyntaxKind.OpenBraceToken); 113var closeBrace = EnsureToken(typeDeclaration.CloseBraceToken, SyntaxKind.CloseBraceToken, appendNewLineIfMissing: true);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeSyntaxExtensions.cs (1)
42var nameToken = nameSyntax.GetNameToken();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Indentation\CSharpIndentationService.cs (6)
52out SyntaxToken token) 87var previousToken = token.GetPreviousToken(includeZeroWidth: true); 107private static bool IsInvalidToken(SyntaxToken token) 180var startToken = section.Statements.First().GetFirstToken(includeZeroWidth: true); 181var endToken = section.Statements.Last().GetLastToken(includeZeroWidth: true); 199var baseToken = node.Parent.GetFirstToken(includeZeroWidth: true);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Indentation\CSharpIndentationService.Indenter.cs (14)
24protected override bool ShouldUseTokenIndenter(Indenter indenter, out SyntaxToken syntaxToken) 36protected override IndentationResult? GetDesiredIndentationWorker(Indenter indenter, SyntaxToken? tokenOpt, SyntaxTrivia? triviaOpt) 66private static IndentationResult? TryGetDesiredIndentation(Indenter indenter, SyntaxToken? tokenOpt) 74private static IndentationResult GetIndentationBasedOnToken(Indenter indenter, SyntaxToken token) 322private static IndentationResult GetIndentationFromCommaSeparatedList(Indenter indenter, SyntaxToken token) 335Indenter indenter, SeparatedSyntaxList<T> list, SyntaxToken token) where T : SyntaxNode 349var firstToken = node.GetFirstToken(includeZeroWidth: true); 362private static IndentationResult GetDefaultIndentationFromToken(Indenter indenter, SyntaxToken token) 372private static IndentationResult GetIndentationForQueryExpression(Indenter indenter, SyntaxToken token) 384var firstToken = queryExpressionClause.GetFirstToken(includeZeroWidth: true); 419var clauseToken = clause.GetFirstToken(includeZeroWidth: true); 431private static SyntaxNode? GetQueryExpressionClause(SyntaxToken token) 457private static bool IsPartOfQueryExpression(SyntaxToken token) 464Indenter indenter, SyntaxToken token, int? additionalSpace = null)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpMoveDeclarationNearReferenceService.cs (1)
49protected override SyntaxToken GetIdentifierOfVariableDeclarator(VariableDeclaratorSyntax variableDeclarator)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.Rewriter.cs (3)
187var firstToken = resultCompilationUnit.GetFirstToken(); 228var nextToken = namespaceDeclaration.Usings.Last().GetLastToken().GetNextToken(); 239var firstToken = resultNamespace.Members.First().GetFirstToken();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
78var discardToken = Identifier(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSemanticFactsService.cs (1)
37protected override SyntaxToken ToIdentifierToken(string identifier)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (10)
54public override SyntaxNode LocalDeclarationStatement(SyntaxNode? type, SyntaxToken name, SyntaxNode? initializer, bool isConst) 64public override SyntaxNode EqualsValueClause(SyntaxToken operatorToken, SyntaxNode value) 67internal static VariableDeclarationSyntax VariableDeclaration(SyntaxNode? type, SyntaxToken name, SyntaxNode? expression) 76public override SyntaxToken Identifier(string identifier) 108public override SyntaxNode InterpolatedStringExpression(SyntaxToken startToken, IEnumerable<SyntaxNode> content, SyntaxToken endToken) 111public override SyntaxNode InterpolatedStringText(SyntaxToken textToken) 114public override SyntaxToken InterpolatedStringTextToken(string content, string value) 169public override SyntaxNode IsPatternExpression(SyntaxNode expression, SyntaxToken isKeyword, SyntaxNode pattern) 210public override SyntaxNode UnaryPattern(SyntaxToken operatorToken, SyntaxNode pattern)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (52)
52private static bool DecomposeBinaryOrAssignmentExpression(SyntaxNode node, out SyntaxToken operatorToken, out ExpressionSyntax left, out ExpressionSyntax right) 78out var operatorToken, out var left, out var right)) 257private IEnumerable<TypeInferenceInfo> InferTypeInAnonymousObjectCreation(AnonymousObjectCreationExpressionSyntax expression, SyntaxToken previousToken) 268ArgumentSyntax argument, SyntaxToken? previousToken = null) 337TupleExpressionSyntax tupleExpression, SyntaxToken previousToken) 364private IEnumerable<TypeInferenceInfo> InferTypeInAttributeArgument(AttributeArgumentSyntax argument, SyntaxToken? previousToken = null) 392private IEnumerable<TypeInferenceInfo> InferTypeInObjectCreationExpression(BaseObjectCreationExpressionSyntax expression, SyntaxToken previousToken) 495private IEnumerable<TypeInferenceInfo> InferTypeInArgumentList(ArgumentListSyntax argumentList, SyntaxToken previousToken) 525private IEnumerable<TypeInferenceInfo> InferTypeInAttributeArgumentList(AttributeArgumentListSyntax attributeArgumentList, SyntaxToken previousToken) 794ArrayCreationExpressionSyntax arrayCreationExpression, SyntaxToken? previousToken = null) 821private IEnumerable<TypeInferenceInfo> InferTypeInArrayRankSpecifier(ArrayRankSpecifierSyntax arrayRankSpecifier, SyntaxToken? previousToken = null) 831private IEnumerable<TypeInferenceInfo> InferTypeInArrayType(ArrayTypeSyntax arrayType, SyntaxToken? previousToken = null) 854private IEnumerable<TypeInferenceInfo> InferTypeInAttributeDeclaration(AttributeListSyntax attributeDeclaration, SyntaxToken? previousToken) 865SyntaxToken? previousToken) 874private IEnumerable<TypeInferenceInfo> InferTypeInBracketedArgumentList(BracketedArgumentListSyntax bracketedArgumentList, SyntaxToken previousToken) 890private static int GetArgumentListIndex(BaseArgumentListSyntax argumentList, SyntaxToken previousToken) 909private static int GetArgumentListIndex(AttributeArgumentListSyntax attributeArgumentList, SyntaxToken previousToken) 928private IEnumerable<TypeInferenceInfo> InferTypeInBinaryOrAssignmentExpression(ExpressionSyntax binop, SyntaxToken operatorToken, ExpressionSyntax left, ExpressionSyntax right, ExpressionSyntax expressionOpt = null, SyntaxToken? previousToken = null) 1063private IEnumerable<TypeInferenceInfo> InferTypeInCastExpression(CastExpressionSyntax castExpression, ExpressionSyntax expressionOpt = null, SyntaxToken? previousToken = null) 1075private IEnumerable<TypeInferenceInfo> InferTypeInCatchDeclaration(CatchDeclarationSyntax catchDeclaration, SyntaxToken? previousToken = null) 1084private IEnumerable<TypeInferenceInfo> InferTypeInCatchFilterClause(CatchFilterClauseSyntax catchFilterClause, SyntaxToken? previousToken = null) 1096SyntaxToken? previousToken = null) 1150private IEnumerable<TypeInferenceInfo> InferTypeInConditionalExpression(ConditionalExpressionSyntax conditional, ExpressionSyntax expressionOpt = null, SyntaxToken? previousToken = null) 1183private IEnumerable<TypeInferenceInfo> InferTypeInDoStatement(DoStatementSyntax doStatement, SyntaxToken? previousToken = null) 1192private IEnumerable<TypeInferenceInfo> InferTypeInEqualsValueClause(EqualsValueClauseSyntax equalsValue, SyntaxToken? previousToken = null) 1221private IEnumerable<TypeInferenceInfo> InferTypeInExpressionStatement(SyntaxToken? previousToken = null) 1231private IEnumerable<TypeInferenceInfo> InferTypeInForEachStatement(ForEachStatementSyntax forEachStatementSyntax, ExpressionSyntax expressionOpt = null, SyntaxToken? previousToken = null) 1258private IEnumerable<TypeInferenceInfo> InferTypeInForStatement(ForStatementSyntax forStatement, ExpressionSyntax expressionOpt = null, SyntaxToken? previousToken = null) 1270private IEnumerable<TypeInferenceInfo> InferTypeInIfStatement(IfStatementSyntax ifStatement, SyntaxToken? previousToken = null) 1285SyntaxToken? previousToken = null) 1487var identifier = singleVariableDesignation.Identifier; 1579private IEnumerable<TypeInferenceInfo> InferTypeInLockStatement(LockStatementSyntax lockStatement, SyntaxToken? previousToken = null) 1588private IEnumerable<TypeInferenceInfo> InferTypeInLambdaExpression(LambdaExpressionSyntax lambdaExpression, SyntaxToken? previousToken = null) 1617private IEnumerable<TypeInferenceInfo> InferTypeInMemberDeclarator(AnonymousObjectMemberDeclaratorSyntax memberDeclarator, SyntaxToken? previousTokenOpt = null) 1636private IEnumerable<TypeInferenceInfo> InferTypeInNameColon(NameColonSyntax nameColon, SyntaxToken previousToken) 1652private IEnumerable<TypeInferenceInfo> InferTypeInExpressionColon(ExpressionColonSyntax expressionColon, SyntaxToken previousToken) 1670SyntaxToken? previousToken = null) 1853private IEnumerable<TypeInferenceInfo> InferTypeInNameEquals(NameEqualsSyntax nameEquals, SyntaxToken? previousToken = null) 1871private IEnumerable<TypeInferenceInfo> InferTypeInPostfixUnaryExpression(PostfixUnaryExpressionSyntax postfixUnaryExpressionSyntax, SyntaxToken? previousToken = null) 1887private IEnumerable<TypeInferenceInfo> InferTypeInPrefixUnaryExpression(PrefixUnaryExpressionSyntax prefixUnaryExpression, SyntaxToken? previousToken = null) 1943private IEnumerable<TypeInferenceInfo> InferTypeInAwaitExpression(AwaitExpressionSyntax awaitExpression, SyntaxToken? previousToken = null) 1965private IEnumerable<TypeInferenceInfo> InferTypeInYieldStatement(YieldStatementSyntax yieldStatement, SyntaxToken? previousToken = null) 2006ReturnStatementSyntax returnStatement, SyntaxToken? previousToken = null) 2084private IEnumerable<TypeInferenceInfo> InferTypeInSwitchExpression(SwitchExpressionSyntax switchExpression, SyntaxToken token) 2093SwitchLabelSyntax switchLabel, SyntaxToken? previousToken = null) 2109SwitchStatementSyntax switchStatement, SyntaxToken? previousToken = null) 2129private IEnumerable<TypeInferenceInfo> InferTypeInThrowExpression(ThrowExpressionSyntax throwExpression, SyntaxToken? previousToken = null) 2138private IEnumerable<TypeInferenceInfo> InferTypeInThrowStatement(ThrowStatementSyntax throwStatement, SyntaxToken? previousToken = null) 2147private IEnumerable<TypeInferenceInfo> InferTypeInUsingStatement(UsingStatementSyntax usingStatement, SyntaxToken? previousToken = null) 2352private IEnumerable<TypeInferenceInfo> InferTypeInWhenClause(WhenClauseSyntax whenClause, SyntaxToken? previousToken = null) 2361private IEnumerable<TypeInferenceInfo> InferTypeInWhileStatement(WhileStatementSyntax whileStatement, SyntaxToken? previousToken = null)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\CSharpSimplificationHelpers.cs (9)
15public static SyntaxToken TryEscapeIdentifierToken(SyntaxToken syntaxToken, SyntaxNode parentOfToken) 59var firstRewrittenToken = rewrittenNode.GetFirstToken(true, false, true, true); 60var firstOriginalToken = originalNode.GetFirstToken(true, false, true, true); 61if (TryAddLeadingElasticTriviaIfNecessary(firstRewrittenToken, firstOriginalToken, out var rewrittenTokenWithLeadingElasticTrivia)) 69public static bool TryAddLeadingElasticTriviaIfNecessary(SyntaxToken token, SyntaxToken originalToken, out SyntaxToken tokenWithLeadingWhitespace) 78var previousToken = originalToken.GetPreviousToken();
Microsoft.CodeAnalysis.CSharp.EditorFeatures (31)
AutomaticCompletion\AutomaticLineEnderCommandHandler.cs (9)
99var endToken = root.FindToken(position); 113private static TextSpan? GetFormattedTextSpan(SyntaxNode root, SyntaxToken endToken) 126var startToken = ranges.Value.Item1; 196private static bool CheckLocation(SourceText text, int position, SyntaxNode owningNode, SyntaxToken lastToken) 226var previousToken = lastToken.GetPreviousToken(); 253private static bool TryGetLastToken(SourceText text, int position, SyntaxNode owningNode, out SyntaxToken lastToken) 277private static bool LocatedAtTheEndOfLine(TextLine line, SyntaxToken lastToken) 587var annotatedOpenBraceToken = root.GetAnnotatedTokens(s_openBracePositionAnnotation).Single(); 627private static bool IsTokenPartOfExpression(SyntaxToken syntaxToken)
AutomaticCompletion\AutomaticLineEnderCommandHandler_Helpers.cs (5)
382var nextToken = baseObjectCreationExpressionNode.GetLastToken(includeZeroWidth: true).GetNextToken(includeZeroWidth: true); 431var newKeywordToken = baseObjectCreationExpressionNode.NewKeyword; 448var newKeywordToken = implicitObjectCreationExpressionNode.NewKeyword; 848private static SyntaxToken GetOpenBrace(SyntaxFormattingOptions formattingOptions) 855private static SyntaxToken GetCloseBrace(SyntaxFormattingOptions formattingOptions)
CompleteStatement\CompleteStatementCommandHandler.cs (1)
443var separator = forStatementSyntax.Initializers.GetSeparator(separatorIndex);
DocumentationComments\XmlTagCompletionCommandHandler.cs (1)
43protected override SyntaxToken GetLocalName(XmlNameSyntax name)
EventHookup\EventHookupSessionManager_EventHookupSession.cs (4)
187private async Task<SyntaxToken?> GetPlusEqualsTokenInsideAddAssignExpressionAsync(Document document, int position, CancellationToken cancellationToken) 206private IEventSymbol? GetEventSymbol(SemanticModel semanticModel, SyntaxToken plusEqualsToken, CancellationToken cancellationToken) 218IEventSymbol eventSymbol, SyntaxToken plusEqualsToken, SemanticModel semanticModel, 241private string? GetNameObjectPart(IEventSymbol eventSymbol, SyntaxToken plusEqualsToken, SemanticModel semanticModel, ISyntaxFactsService syntaxFactsService)
Interactive\CSharpSendToInteractiveSubmissionProvider.cs (4)
51GetSelectedTokens(selectionSpan, root, out var startToken, out var endToken); 121out SyntaxToken startToken, 122out SyntaxToken endToken)
RawStringLiteral\RawStringLiteralCommandHandler_TypeChar.cs (1)
225var endToken = interpolatedString.StringEndToken;
StringCopyPaste\StringCopyPasteData.cs (2)
88SyntaxToken token, 124SyntaxToken token,
TextStructureNavigation\CSharpTextStructureNavigatorProvider.cs (4)
30protected override bool IsWithinNaturalLanguage(SyntaxToken token, int position) 63private static int GetStartOfRawStringLiteralEndDelimiter(SyntaxToken token) 84private static bool IsAtClosingQuote(SyntaxToken token, int position) 92protected override TextExtent GetExtentOfWordFromToken(SyntaxToken token, SnapshotPoint position)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (5)
Completion\ArgumentProviders\AbstractCSharpArgumentProviderTests`1.cs (1)
19protected override (SyntaxNode argumentList, ImmutableArray<SyntaxNode> arguments) GetArgumentList(SyntaxToken token)
ExtractMethod\MiscTests.cs (2)
49var publicToken = rootWithAnnotation.DescendantTokens().First(t => t.Kind() == SyntaxKind.PublicKeyword); 94var publicToken = rootWithAnnotation.DescendantTokens().First(t => t.Kind() == SyntaxKind.PublicKeyword);
Formatting\Indentation\SmartTokenFormatterFormatRangeTests.cs (1)
3417var endToken = root.FindToken(position);
TypeInferrer\TypeInferrerTests.cs (1)
74var token = root.FindToken(textSpan.Start);
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (8)
EmbeddedLanguages\Json\CSharpJsonParserTests.cs (4)
32private static SyntaxToken GetStringToken(string text) 36var token = parsedStatement.DescendantTokens().ToArray()[3]; 129private protected (SyntaxToken, JsonTree?, VirtualCharSequence) JustParseTree( 132var token = GetStringToken(stringText);
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests.cs (4)
30private static SyntaxToken GetStringToken(string text) 34var token = parsedStatement.DescendantTokens().ToArray()[3]; 109private (SyntaxToken, RegexTree, VirtualCharSequence) JustParseTree( 112var token = GetStringToken(stringText);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (3)
CodeGen\CodeGenInterpolatedString.cs (3)
38var token1 = interpolatedStrings[0].StringStartToken; 42var token2 = interpolatedStrings[1].StringStartToken; 46foreach (var token in tree.GetRoot().DescendantTokens().Where(t => t.Kind() != SyntaxKind.EndOfFileToken))
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
Diagnostics\DiagnosticAnalyzerTests.cs (1)
3682var field1 = tree1.GetRoot().DescendantNodes().OfType<FieldDeclarationSyntax>().Single().Declaration.Variables.Single().Identifier;
FlowAnalysis\RegionAnalysisTests.cs (1)
4427var tok = tree.GetCompilationUnitRoot().FindToken(index);
Microsoft.CodeAnalysis.CSharp.Features (816)
BraceCompletion\AbstractCurlyBraceOrBracketCompletionService.cs (2)
281private SyntaxToken FindClosingBraceToken(SyntaxNode root, int closingBraceEndPoint) 283var closeBraceToken = root.FindToken(closingBraceEndPoint - 1);
BraceCompletion\BracketBraceCompletionService.cs (4)
31protected override bool IsValidOpeningBraceToken(SyntaxToken token) => token.IsKind(SyntaxKind.OpenBracketToken); 33protected override bool IsValidClosingBraceToken(SyntaxToken token) => token.IsKind(SyntaxKind.CloseBracketToken); 47public override AdjustNewLinesOperation? GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation)
BraceCompletion\CharLiteralBraceCompletionService.cs (2)
25protected override bool IsValidOpeningBraceToken(SyntaxToken token) => token.IsKind(SyntaxKind.CharacterLiteralToken); 27protected override bool IsValidClosingBraceToken(SyntaxToken token) => token.IsKind(SyntaxKind.CharacterLiteralToken);
BraceCompletion\CurlyBraceCompletionService.cs (5)
47protected override bool IsValidOpeningBraceToken(SyntaxToken token) 50protected override bool IsValidClosingBraceToken(SyntaxToken token) 124private static bool? NeedsNewLine(in SyntaxToken currentToken, CSharpSyntaxFormattingOptions options) 233public override AdjustNewLinesOperation? GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation)
BraceCompletion\InterpolatedStringBraceCompletionService.cs (3)
36protected override bool IsValidOpeningBraceToken(SyntaxToken leftToken) 39protected override bool IsValidClosingBraceToken(SyntaxToken rightToken) 42protected override bool IsValidOpenBraceTokenAtPosition(SourceText text, SyntaxToken token, int position)
BraceCompletion\InterpolationBraceCompletionService.cs (3)
38protected override bool IsValidOpenBraceTokenAtPosition(SourceText text, SyntaxToken token, int position) 41protected override bool IsValidOpeningBraceToken(SyntaxToken token) 44protected override bool IsValidClosingBraceToken(SyntaxToken token)
BraceCompletion\LessAndGreaterThanBraceCompletionService.cs (4)
31protected override bool IsValidOpeningBraceToken(SyntaxToken token) 34protected override bool IsValidClosingBraceToken(SyntaxToken token) 37protected override Task<bool> IsValidOpenBraceTokenAtPositionAsync(Document document, SyntaxToken token, int position, CancellationToken cancellationToken) 58var previousToken = token.GetPreviousToken();
BraceCompletion\ParenthesisBraceCompletionService.cs (3)
26protected override bool IsValidOpeningBraceToken(SyntaxToken token) => token.IsKind(SyntaxKind.OpenParenToken); 28protected override bool IsValidClosingBraceToken(SyntaxToken token) => token.IsKind(SyntaxKind.CloseParenToken); 30protected override bool IsValidOpenBraceTokenAtPosition(SourceText text, SyntaxToken token, int position)
BraceCompletion\StringLiteralBraceCompletionService.cs (4)
50protected override bool IsValidOpeningBraceToken(SyntaxToken token) => token.IsKind(SyntaxKind.StringLiteralToken); 52protected override bool IsValidClosingBraceToken(SyntaxToken token) => token.IsKind(SyntaxKind.StringLiteralToken); 54protected override bool IsValidOpenBraceTokenAtPosition(SourceText text, SyntaxToken token, int position) 93private static bool RestOfLineContainsDiagnostics(SyntaxToken token)
BraceMatching\StringLiteralBraceMatcher.cs (1)
60private static BraceMatchingResult GetSimpleStringBraceMatchingResult(SyntaxToken token, int endTokenLength)
ChangeSignature\ChangeSignatureFormattingRule.cs (5)
42var baseToken = node.Parent.GetFirstToken(); 43var startToken = node.GetFirstToken(); 44var endToken = node.GetLastToken(); 52public override AdjustNewLinesOperation GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation)
ChangeSignature\CSharpChangeSignatureService.cs (1)
919protected override SyntaxToken CommaTokenWithElasticSpace()
CodeFixes\GenerateType\GenerateTypeCodeFixProvider.cs (1)
46protected override bool IsCandidate(SyntaxNode node, SyntaxToken token, Diagnostic diagnostic)
CodeFixes\Suppression\CSharpSuppressionCodeFixProvider.cs (6)
51SyntaxToken disableOrRestoreKeyword, Diagnostic diagnostic, Func<SyntaxNode, CancellationToken, SyntaxNode> formatNode, bool needsLeadingEndOfLine, bool needsTrailingEndOfLine, CancellationToken cancellationToken) 96protected override bool IsEndOfFileToken(SyntaxToken token) 240var currentKeyword = pragmaWarning.DisableOrRestoreKeyword; 242var toggledToken = Token(currentKeyword.LeadingTrivia, toggledKeywordKind, currentKeyword.TrailingTrivia); 247protected override SyntaxNode GetContainingStatement(SyntaxToken token) 252protected override bool TokenHasTrailingLineContinuationChar(SyntaxToken token)
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.cs (9)
99var firstToken = GetFirstTokenOfInterest(root); 117private static (SyntaxNode root, SyntaxToken firstToken) RewriteExistingDirectives(SyntaxNode root, SyntaxToken firstToken) 119var firstNonDirectiveToken = root.GetFirstToken(); 161private static async Task<SyntaxNode> DisableNullableReferenceTypesInExistingDocumentIfNecessaryAsync(Document document, SyntaxNode root, SyntaxToken firstToken, CancellationToken cancellationToken) 217private static SyntaxToken GetFirstTokenOfInterest(SyntaxNode root) 219var firstToken = root.GetFirstToken(includeDirectives: true); 229var nextToken = firstToken.Parent.GetLastToken(includeDirectives: true).GetNextToken(includeDirectives: true); 247var firstSemanticToken = root.GetFirstToken();
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (1)
401var equalsToken = variableDeclarator.Initializer.EqualsToken;
CodeRefactorings\SyncNamespace\CSharpChangeNamespaceService.cs (1)
271var eofToken = root.EndOfFileToken
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (2)
290static SyntaxToken Flip(SyntaxToken token)
Completion\CompletionProviders\AttributeNamedParameterCompletionProvider.cs (4)
109private static bool IsAfterNameColonArgument(SyntaxToken token) 131private static bool IsAfterNameEqualsArgument(SyntaxToken token) 155SyntaxToken token, AttributeSyntax attributeSyntax, ISet<string> existingNamedParameters) 177CompletionContext context, SemanticModel semanticModel, SyntaxToken token, AttributeSyntax attributeSyntax, ISet<string> existingNamedParameters)
Completion\CompletionProviders\AwaitCompletionProvider.cs (2)
54protected override SyntaxNode? GetAsyncSupportingDeclaration(SyntaxToken leftToken, int position) 101protected override SyntaxToken? GetDotTokenLeftOfPosition(SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
Completion\CompletionProviders\CompletionUtilities.cs (2)
32public static bool TreatAsDot(SyntaxToken token, int characterPosition) 44public static SyntaxToken? GetDotTokenLeftOfPosition(SyntaxTree syntaxTree, int position, CancellationToken cancellationToken)
Completion\CompletionProviders\CrefCompletionProvider.cs (10)
89protected override async Task<(SyntaxToken, SemanticModel?, ImmutableArray<ISymbol>)> GetSymbolsAsync( 115private static bool IsCrefStartContext(SyntaxToken token) 125private static bool IsCrefParameterListContext(SyntaxToken token) 155private static bool IsCrefQualifiedNameContext(SyntaxToken token) 165SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken) 180SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken) 211QualifiedCrefSyntax parent, SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken) 237SemanticModel semanticModel, ImmutableArray<ISymbol> symbols, SyntaxToken token, int position, ImmutableArray<KeyValuePair<string, string>> options) 259SemanticModel semanticModel, ISymbol symbol, SyntaxToken token, int position, StringBuilder builder, 279SyntaxToken token,
Completion\CompletionProviders\CSharpSuggestionModeCompletionProvider.cs (3)
98private static bool IsAnonymousObjectCreation(SyntaxToken token) 110private static bool IsLambdaExpression(SemanticModel semanticModel, SyntaxTree tree, int position, SyntaxToken token, ITypeInferenceService typeInferrer, CancellationToken cancellationToken) 201private static bool IsPotentialPatternVariableDeclaration(SyntaxToken token)
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (23)
97SyntaxToken token, SemanticModel semanticModel, 111SyntaxToken token, SemanticModel semanticModel, 135private static bool IsPossibleOutVariableDeclaration(SyntaxToken token, SemanticModel semanticModel, 145if (argument is { RefOrOutKeyword: SyntaxToken(SyntaxKind.OutKeyword) }) 168SyntaxToken token, SemanticModel semanticModel, 190private static bool IsPropertyDeclaration(SyntaxToken token, SemanticModel semanticModel, 204private static bool IsMethodDeclaration(SyntaxToken token, SemanticModel semanticModel, 219SyntaxToken token, 268SyntaxToken token, 279SyntaxToken token, 309private static bool IsFieldDeclaration(SyntaxToken token, SemanticModel semanticModel, 320private static bool IsIncompleteMemberDeclaration(SyntaxToken token, SemanticModel semanticModel, 331private static bool IsLocalFunctionDeclaration(SyntaxToken token, SemanticModel semanticModel, 342private static bool IsLocalVariableDeclaration(SyntaxToken token, SemanticModel semanticModel, 387private static bool IsEmbeddedVariableDeclaration(SyntaxToken token, SemanticModel semanticModel, 400private static bool IsForEachVariableDeclaration(SyntaxToken token, SemanticModel semanticModel, 416private static bool IsTypeParameterDeclaration(SyntaxToken token, out NameDeclarationInfo result) 432private static bool IsPrimaryConstructorParameter(SyntaxToken token, SemanticModel semanticModel, 452private static bool IsParameterDeclaration(SyntaxToken token, SemanticModel semanticModel, 464private static bool IsPatternMatching(SyntaxToken token, SemanticModel semanticModel, 499private static bool IsPossibleTypeToken(SyntaxToken token) 547foreach (var modifer in modifiers) 594var modifier = modifiers[i];
Completion\CompletionProviders\DeclarationName\DeclarationNameRecommender.cs (1)
252var uniqueName = semanticFactsService.GenerateUniqueName(
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (3)
108CompletionContext context, SemanticModel semanticModel, SyntaxToken token, ITypeSymbol type, bool isParams, CancellationToken cancellationToken) 273SemanticModel semanticModel, SyntaxToken token, 297var previousToken = token.GetPreviousToken();
Completion\CompletionProviders\ExplicitInterfaceTypeCompletionProvider.cs (3)
71var targetToken = context.TargetToken; 99var tokenBeforeType = typeNode.GetFirstToken().GetPreviousToken(); 125private static bool IsPreviousTokenValid(SyntaxToken tokenBeforeType)
Completion\CompletionProviders\ImportCompletion\ExtensionMethodImportCompletionProvider.cs (1)
38protected override bool IsFinalSemicolonOfUsingOrExtern(SyntaxNode directive, SyntaxToken token)
Completion\CompletionProviders\ImportCompletion\TypeImportCompletionProvider.cs (1)
38protected override bool IsFinalSemicolonOfUsingOrExtern(SyntaxNode directive, SyntaxToken token)
Completion\CompletionProviders\ObjectAndWithInitializerCompletionProvider.cs (1)
145private static ITypeSymbol? GetInitializedType(SyntaxToken token, Document document, SemanticModel semanticModel, CancellationToken cancellationToken)
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider.cs (3)
78private static (SyntaxToken dotLikeToken, int expressionStart) GetDotAndExpressionStart(SyntaxNode root, int position, CancellationToken cancellationToken) 80if (CompletionUtilities.GetDotTokenLeftOfPosition(root.SyntaxTree, position, cancellationToken) is not SyntaxToken dotToken) 192: (SyntaxToken?)null;
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Conversions.cs (1)
86: (SyntaxToken?)null;
Completion\CompletionProviders\OverrideCompletionProvider.cs (7)
34protected override SyntaxNode GetSyntax(SyntaxToken token) 49protected override SyntaxToken GetToken(CompletionItem completionItem, SyntaxTree tree, CancellationToken cancellationToken) 55public override bool TryDetermineReturnType(SyntaxToken startToken, SemanticModel semanticModel, CancellationToken cancellationToken, out ITypeSymbol? returnType, out SyntaxToken nextToken) 78SyntaxToken startToken, 84var token = startToken; 191public override SyntaxToken FindStartingToken(SyntaxTree tree, int position, CancellationToken cancellationToken)
Completion\CompletionProviders\PartialMethodCompletionProvider.cs (6)
39foreach (var mod in declaration.Modifiers) 54protected override SyntaxNode GetSyntax(SyntaxToken token) 70protected override SyntaxToken GetToken(CompletionItem completionItem, SyntaxTree tree, CancellationToken cancellationToken) 88protected override bool IsPartialMethodCompletionContext(SyntaxTree tree, int position, CancellationToken cancellationToken, out DeclarationModifiers modifiers, out SyntaxToken token) 133private static bool IsOnSameLine(SyntaxToken syntaxToken, SyntaxToken touchingToken, SourceText text)
Completion\CompletionProviders\Scripting\DirectiveCompletionProviderUtilities.cs (2)
12internal static bool TryGetStringLiteralToken(SyntaxTree tree, int position, SyntaxKind directiveKind, out SyntaxToken stringLiteral, CancellationToken cancellationToken) 16var token = tree.GetRoot(cancellationToken).FindToken(position, findInsideTrivia: true);
Completion\CompletionProviders\Scripting\LoadDirectiveCompletionProvider.cs (1)
28protected override bool TryGetStringLiteralToken(SyntaxTree tree, int position, out SyntaxToken stringLiteral, CancellationToken cancellationToken)
Completion\CompletionProviders\Scripting\ReferenceDirectiveCompletionProvider.cs (1)
27protected override bool TryGetStringLiteralToken(SyntaxTree tree, int position, out SyntaxToken stringLiteral, CancellationToken cancellationToken)
Completion\CompletionProviders\SymbolCompletionProvider.cs (1)
169protected override bool IsTriggerOnDot(SyntaxToken token, int characterPosition)
Completion\CompletionProviders\TupleNameCompletionProvider.cs (1)
74var token = context.TargetToken;
Completion\CompletionProviders\XmlDocCommentCompletionProvider.cs (2)
211private bool IsAttributeNameContext(SyntaxToken token, int position, [NotNullWhen(true)] out string? elementName, [NotNullWhen(true)] out ISet<string>? attributeNames) 290private static bool IsAttributeValueContext(SyntaxToken token, [NotNullWhen(true)] out string? tagName, [NotNullWhen(true)] out string? attributeName)
Completion\KeywordRecommenders\AliasKeywordRecommender.cs (1)
24var token = context.TargetToken;
Completion\KeywordRecommenders\AllowsKeywordRecommender.cs (1)
38var token = context.TargetToken;
Completion\KeywordRecommenders\AnnotationsKeywordRecommender.cs (3)
19var previousToken1 = context.TargetToken; 20var previousToken2 = previousToken1.GetPreviousToken(includeSkipped: true); 21var previousToken3 = previousToken2.GetPreviousToken(includeSkipped: true);
Completion\KeywordRecommenders\AssemblyKeywordRecommender.cs (1)
21var token = context.TargetToken;
Completion\KeywordRecommenders\BaseKeywordRecommender.cs (1)
49var token = context.TargetToken;
Completion\KeywordRecommenders\BreakKeywordRecommender.cs (1)
36var token = context.LeftToken;
Completion\KeywordRecommenders\ByKeywordRecommender.cs (1)
26var token = context.LeftToken;
Completion\KeywordRecommenders\CaseKeywordRecommender.cs (1)
28var token = context.TargetToken;
Completion\KeywordRecommenders\CheckedKeywordRecommender.cs (3)
29var targetToken = context.TargetToken; 33var previousPossiblySkippedToken = targetToken.GetPreviousToken(includeSkipped: true); 40SyntaxToken previousToken;
Completion\KeywordRecommenders\ChecksumKeywordRecommender.cs (2)
21var previousToken1 = context.TargetToken; 22var previousToken2 = previousToken1.GetPreviousToken(includeSkipped: true);
Completion\KeywordRecommenders\ContinueKeywordRecommender.cs (1)
29var leaf = context.LeftToken;
Completion\KeywordRecommenders\DefaultKeywordRecommender.cs (2)
36var previousToken1 = context.TargetToken; 37var previousToken2 = previousToken1.GetPreviousToken(includeSkipped: true);
Completion\KeywordRecommenders\DisableKeywordRecommender.cs (3)
19var previousToken1 = context.TargetToken; 20var previousToken2 = previousToken1.GetPreviousToken(includeSkipped: true); 21var previousToken3 = previousToken2.GetPreviousToken(includeSkipped: true);
Completion\KeywordRecommenders\ElseKeywordRecommender.cs (1)
26var token = context.TargetToken;
Completion\KeywordRecommenders\EnableKeywordRecommender.cs (3)
19var previousToken1 = context.TargetToken; 20var previousToken2 = previousToken1.GetPreviousToken(includeSkipped: true); 30var previousToken3 = previousToken2.GetPreviousToken(includeSkipped: true);
Completion\KeywordRecommenders\EqualsKeywordRecommender.cs (1)
25var token = context.TargetToken;
Completion\KeywordRecommenders\ExternKeywordRecommender.cs (1)
81var token = context.TargetToken;
Completion\KeywordRecommenders\FieldKeywordRecommender.cs (1)
44private static bool IsInPropertyAccessor(SyntaxToken targetToken)
Completion\KeywordRecommenders\GlobalKeywordRecommender.cs (1)
25var token = context.TargetToken;
Completion\KeywordRecommenders\GroupKeywordRecommender.cs (1)
20var token = context.TargetToken;
Completion\KeywordRecommenders\HiddenKeywordRecommender.cs (2)
25var previousToken1 = context.TargetToken; 26var previousToken2 = previousToken1.GetPreviousToken(includeSkipped: true);
Completion\KeywordRecommenders\InKeywordRecommender.cs (3)
62var token = context.TargetToken; 85var token = context.TargetToken; 116var token = context.TargetToken;
Completion\KeywordRecommenders\IntoKeywordRecommender.cs (3)
30var token = context.TargetToken; 63var token = context.TargetToken; 93var token = context.TargetToken;
Completion\KeywordRecommenders\LetKeywordRecommender.cs (1)
20var token = context.TargetToken;
Completion\KeywordRecommenders\MethodKeywordRecommender.cs (1)
20var token = context.TargetToken;
Completion\KeywordRecommenders\ModuleKeywordRecommender.cs (1)
24var token = context.LeftToken;
Completion\KeywordRecommenders\NamespaceKeywordRecommender.cs (3)
65var leftToken = context.LeftToken; 66var token = context.TargetToken; 83var nextToken = leftToken.GetNextToken(includeSkipped: true);
Completion\KeywordRecommenders\NewKeywordRecommender.cs (2)
66var token = context.LeftToken; 99var token = context.TargetToken;
Completion\KeywordRecommenders\OnKeywordRecommender.cs (1)
27var token = context.TargetToken;
Completion\KeywordRecommenders\OperatorKeywordRecommender.cs (1)
22var token = context.TargetToken;
Completion\KeywordRecommenders\OrderByKeywordRecommender.cs (1)
20var token = context.TargetToken;
Completion\KeywordRecommenders\ParamKeywordRecommender.cs (1)
19var token = context.TargetToken;
Completion\KeywordRecommenders\PartialKeywordRecommender.cs (1)
41var token = context.LeftToken;
Completion\KeywordRecommenders\RefKeywordRecommender.cs (3)
103var token = context.TargetToken; 173var token = context.TargetToken; 200var previous = token.GetPreviousToken(includeSkipped: true);
Completion\KeywordRecommenders\RestoreKeywordRecommender.cs (3)
19var previousToken1 = context.TargetToken; 20var previousToken2 = previousToken1.GetPreviousToken(includeSkipped: true); 21var previousToken3 = previousToken2.GetPreviousToken(includeSkipped: true);
Completion\KeywordRecommenders\ReturnKeywordRecommender.cs (1)
39var token = context.TargetToken;
Completion\KeywordRecommenders\ScopedKeywordRecommender.cs (2)
31var token = context.TargetToken; 37var previous = token.GetPreviousToken(includeSkipped: true);
Completion\KeywordRecommenders\SelectKeywordRecommender.cs (1)
20var token = context.TargetToken;
Completion\KeywordRecommenders\StructKeywordRecommender.cs (1)
60var token = context.TargetToken;
Completion\KeywordRecommenders\ThisKeywordRecommender.cs (1)
43var token = context.TargetToken;
Completion\KeywordRecommenders\TypeVarKeywordRecommender.cs (1)
21var token = context.TargetToken;
Completion\KeywordRecommenders\UsingKeywordRecommender.cs (6)
77var originalToken = context.LeftToken; 78var token = context.TargetToken; 107var nextToken = originalToken.GetNextToken(includeSkipped: true); 138var previousToken = token.GetPreviousToken(includeSkipped: true); 167static bool IsValidContextAtTheRoot(CSharpSyntaxContext context, SyntaxToken originalToken, CancellationToken cancellationToken) 170var nextToken = originalToken.GetNextToken(includeSkipped: true);
Completion\KeywordRecommenders\VoidKeywordRecommender.cs (1)
73var token = context.TargetToken;
Completion\KeywordRecommenders\WarningKeywordRecommender.cs (2)
27var previousToken1 = context.TargetToken; 28var previousToken2 = previousToken1.GetPreviousToken(includeSkipped: true);
Completion\KeywordRecommenders\WarningsKeywordRecommender.cs (3)
19var previousToken1 = context.TargetToken; 20var previousToken2 = previousToken1.GetPreviousToken(includeSkipped: true); 21var previousToken3 = previousToken2.GetPreviousToken(includeSkipped: true);
Completion\KeywordRecommenders\WhereKeywordRecommender.cs (2)
39var token = context.TargetToken; 128var token = context.TargetToken;
Completion\KeywordRecommenders\WhileKeywordRecommender.cs (1)
38var token = context.TargetToken;
Completion\Providers\ContextVariableArgumentProvider.cs (1)
28protected override bool IsInstanceContext(SyntaxTree syntaxTree, SyntaxToken targetToken, SemanticModel semanticModel, CancellationToken cancellationToken)
ConvertAnonymousType\CSharpConvertAnonymousTypeToTupleCodeRefactoringProvider.cs (1)
41private static IEnumerable<SyntaxToken> GetSeparators(SeparatedSyntaxList<AnonymousObjectMemberDeclaratorSyntax> initializers)
ConvertBetweenRegularAndVerbatimString\AbstractConvertBetweenRegularAndVerbatimStringCodeRefactoringProvider.cs (5)
30protected abstract void AddSubStringTokens(TStringExpressionSyntax literalExpression, ArrayBuilder<SyntaxToken> subTokens); 45using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var subStringTokens); 101IVirtualCharService charService, StringBuilder sb, SyntaxToken stringToken) 133IVirtualCharService charService, StringBuilder sb, SyntaxToken stringToken) 157IVirtualCharService charService, ArrayBuilder<SyntaxToken> subTokens)
ConvertBetweenRegularAndVerbatimString\ConvertBetweenRegularAndVerbatimInterpolatedStringCodeRefactoringProvider.cs (6)
32protected override void AddSubStringTokens(InterpolatedStringExpressionSyntax literalExpression, ArrayBuilder<SyntaxToken> subStringTokens) 46SyntaxKind newStartKind, Action<IVirtualCharService, StringBuilder, SyntaxToken> addStringText) 67var startToken = stringExpression.StringStartToken; 68var newStartToken = SyntaxFactory.Token( 79private static SyntaxToken CreateTextToken(SyntaxToken textToken, StringBuilder sb)
ConvertBetweenRegularAndVerbatimString\ConvertBetweenRegularAndVerbatimStringCodeRefactoringProvider.cs (2)
32protected override void AddSubStringTokens(LiteralExpressionSyntax literalExpression, ArrayBuilder<SyntaxToken> subStringTokens) 57private static SyntaxToken CreateStringToken(StringBuilder sb)
ConvertForEachToFor\CSharpConvertForEachToForCodeRefactoringProvider.cs (1)
117SyntaxGenerator generator, ForEachInfo foreachInfo, SyntaxNode collectionVariableName, SyntaxToken indexVariable, bool donotCastElement)
ConvertForToForEach\CSharpConvertForToForEachCodeRefactoringProvider.cs (3)
43out SyntaxToken iterationVariable, 77SyntaxToken iterationVariable, ExpressionSyntax incrementor, out ExpressionSyntax? stepValue) 115SyntaxToken foreachIdentifier,
ConvertLinq\ConvertForEachToLinqQuery\AbstractConverter.cs (6)
40IEnumerable<SyntaxToken> leadingTokensForSelect, 41IEnumerable<SyntaxToken> trailingTokensForSelect, 58IEnumerable<SyntaxToken> leadingTokensForSelect, 59IEnumerable<SyntaxToken> trailingTokensForSelect) 127IEnumerable<SyntaxToken> leadingTokensForSelect, 128IEnumerable<SyntaxToken> trailingTokensForSelect)
ConvertLinq\ConvertForEachToLinqQuery\CSharpConvertForEachToLinqQueryProvider.cs (6)
42var identifiersBuilder = ArrayBuilder<SyntaxToken>.GetInstance(); 46var trailingTokensBuilder = ArrayBuilder<SyntaxToken>.GetInstance(); 47var currentLeadingTokens = ArrayBuilder<SyntaxToken>.GetInstance(); 103currentLeadingTokens = ArrayBuilder<SyntaxToken>.GetInstance(); 116currentLeadingTokens = ArrayBuilder<SyntaxToken>.GetInstance(); 187currentLeadingTokens = ArrayBuilder<SyntaxToken>.GetInstance();
ConvertLinq\ConvertForEachToLinqQuery\DefaultConverter.cs (1)
45IEnumerable<SyntaxToken> identifiers,
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (10)
134var variable = GetFreeSymbolNameAndMarkUsed(expressionName); 177var variable = GetFreeSymbolNameAndMarkUsed(expressionName); 213var identifier = ((QueryBodySyntax)selectClause.Parent).Continuation.Identifier; 421var symbolName = GetFreeSymbolNameAndMarkUsed(variableName); 517SyntaxToken identifier, 581var localFunctionToken = GetFreeSymbolNameAndMarkUsed(localFunctionNamePrefix); 604private SyntaxToken GetFreeSymbolNameAndMarkUsed(string prefix) 606var freeToken = _semanticFacts.GenerateUniqueName(_semanticModel, _source, container: null, baseName: prefix, _introducedLocalNames, _cancellationToken); 966public bool TryAdd(CSharpSyntaxNode node, SyntaxToken identifier) 981public bool ContainsIdentifier(SyntaxToken identifier)
ConvertNamespace\ConvertNamespaceCodeRefactoringProvider.cs (1)
43var token = root.FindToken(position);
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider_DocumentationComments.cs (1)
152foreach (var textToken in xmlText.TextTokens)
ConvertToRawString\ConvertInterpolatedStringToRawStringCodeRefactoringProvider.cs (6)
56private static VirtualCharSequence TryConvertToVirtualChars(SyntaxToken token) 186var token = stringExpression.StringStartToken; 268var firstToken = node.GetFirstToken(); 464private static string GetIndentationStringForToken(SourceText text, SyntaxFormattingOptions options, SyntaxToken token) 684public static SyntaxToken UpdateToken(SyntaxToken token, string text, string valueText = "", SyntaxKind? kind = null)
ConvertToRawString\ConvertRegularStringToRawStringCodeRefactoringProvider.cs (7)
45private static bool CanConvertStringLiteral(SyntaxToken token, out CanConvertParams convertParams) 132var newToken = GetReplacementToken( 137private static SyntaxToken GetReplacementToken( 139SyntaxToken token, 165var newToken = ConvertToMultiLineRawIndentedString(indentation); 179SyntaxToken ConvertToSingleLineRawString() 202SyntaxToken ConvertToMultiLineRawIndentedString(string indentation)
Debugging\BreakpointResolver.cs (2)
37var token = tree.GetRoot(cancellationToken).FindToken(location.SourceSpan.Start); 72var token = SyntaxFactory.ParseToken(text, lengthOfParsedText);
Debugging\CSharpProximityExpressionsService.cs (1)
57var token = root.FindToken(position);
Debugging\CSharpProximityExpressionsService.Worker.cs (1)
25private SyntaxToken _token;
Debugging\DataTipInfoGetter.cs (1)
31var token = root.FindToken(position);
DecompiledSource\CSharpDecompiledSourceFormattingRule.cs (4)
19in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation) 25private static AdjustNewLinesOperation? GetAdjustNewLinesOperation(SyntaxToken previousToken, SyntaxToken currentToken)
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (13)
83var firstToken = member.GetFirstToken(); 87var previousToken = firstToken.GetPreviousToken(); 228protected override SyntaxToken GetTokenToRight( 240protected override SyntaxToken GetTokenToLeft( 252protected override bool IsDocCommentNewLine(SyntaxToken token) 283var lastTextToken = textTokens.Last(); 284var firstTextToken = textTokens.First(); 302private static IList<SyntaxToken> GetTextTokensFollowingExteriorTrivia(XmlTextSyntax xmlText) 304var result = new List<SyntaxToken>(); 307foreach (var token in tokenList.Reverse()) 346var lastTextToken = textTokens.LastOrDefault(); 347var firstTextToken = textTokens.FirstOrDefault(); 359protected override bool HasSkippedTrailingTrivia(SyntaxToken token)
EditAndContinue\BreakpointSpans.cs (24)
109private static TextSpan CreateSpan(SyntaxToken startToken, SyntaxToken endToken) 115private static TextSpan CreateSpan(SyntaxNode node, SyntaxToken token) 118private static TextSpan CreateSpan(SyntaxToken token) 239var separator = parameters.GetSeparator(i); 474internal static IEnumerable<SyntaxToken> GetActiveTokensForImplicitConstructorInitializer(ConstructorDeclarationSyntax constructor) 480internal static IEnumerable<SyntaxToken> GetActiveTokensForExplicitConstructorInitializer(ConstructorInitializerSyntax constructorInitializer) 489internal static IEnumerable<SyntaxToken> GetActiveTokensForImplicitPrimaryConstructorInitializer(TypeDeclarationSyntax typeDeclaration) 497foreach (var token in typeDeclaration.TypeParameterList.DescendantTokens()) 501foreach (var token in typeDeclaration.ParameterList.DescendantTokens()) 508internal static IEnumerable<SyntaxToken> GetActiveTokensForExplicitPrimaryConstructorInitializer(PrimaryConstructorBaseTypeSyntax baseTypeSyntax) 516internal static IEnumerable<SyntaxToken> GetActiveTokensForCopyConstructor(RecordDeclarationSyntax recordDeclaration) 522foreach (var token in recordDeclaration.TypeParameterList.DescendantTokens()) 530internal static IEnumerable<SyntaxToken> GetActiveTokensForRecordParameter(ParameterSyntax parameter) 532foreach (var modifier in parameter.Modifiers) 537foreach (var token in parameter.Type.DescendantTokens()) 547internal static IEnumerable<SyntaxToken> GetActiveTokensForAutoPropertyAccessor(AccessorDeclarationSyntax accessor) 769private static SyntaxToken LastNotMissing(SyntaxToken token1, SyntaxToken token2) 784SyntaxToken semicolonOpt, 830SyntaxToken semicolon) 851internal static IEnumerable<SyntaxToken> GetActiveTokensForVariableDeclarator(VariableDeclaratorSyntax variableDeclarator, SyntaxTokenList modifiers, SyntaxToken semicolon)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (7)
600protected override bool TryGetEnclosingBreakpointSpan(SyntaxToken token, out TextSpan span) 914List<SyntaxToken>? oldTokens = null; 915List<SyntaxToken>? newTokens = null; 927protected override bool AreEquivalentImpl(SyntaxToken oldToken, SyntaxToken newToken) 3067private static bool DeclareSameIdentifiers(SyntaxToken[] oldVariables, SyntaxToken[] newVariables)
EditAndContinue\DeclarationBody\CopyConstructorDeclarationBody.cs (1)
48public override IEnumerable<SyntaxToken>? GetActiveTokens()
EditAndContinue\DeclarationBody\ExplicitAutoPropertyAccessorDeclarationBody.cs (1)
28public override IEnumerable<SyntaxToken>? GetActiveTokens()
EditAndContinue\DeclarationBody\FieldWithInitializerDeclarationBody.cs (1)
48public override IEnumerable<SyntaxToken> GetActiveTokens()
EditAndContinue\DeclarationBody\OrdinaryInstanceConstructorWithExplicitInitializerDeclarationBody.cs (1)
35public override IEnumerable<SyntaxToken> GetActiveTokens()
EditAndContinue\DeclarationBody\OrdinaryInstanceConstructorWithImplicitInitializerDeclarationBody.cs (1)
32public override IEnumerable<SyntaxToken> GetActiveTokens()
EditAndContinue\DeclarationBody\PrimaryConstructorWithExplicitInitializerDeclarationBody.cs (1)
35public override IEnumerable<SyntaxToken>? GetActiveTokens()
EditAndContinue\DeclarationBody\PrimaryConstructorWithImplicitInitializerDeclarationBody.cs (1)
35public override IEnumerable<SyntaxToken>? GetActiveTokens()
EditAndContinue\DeclarationBody\PropertyOrIndexerAccessorWithExplicitBodyDeclarationBody.cs (1)
41public sealed override IEnumerable<SyntaxToken>? GetActiveTokens()
EditAndContinue\DeclarationBody\PropertyOrIndexerWithExplicitBodyDeclarationBody.cs (1)
36public sealed override IEnumerable<SyntaxToken>? GetActiveTokens()
EditAndContinue\DeclarationBody\RecordParameterDeclarationBody.cs (1)
28public override IEnumerable<SyntaxToken>? GetActiveTokens()
EditAndContinue\DeclarationBody\TopLevelCodeDeclarationBody.cs (1)
38public override IEnumerable<SyntaxToken>? GetActiveTokens()
EditAndContinue\SyntaxComparer.cs (31)
966out IEnumerable<SyntaxToken> parameters, 967out SyntaxToken asyncKeyword, 971out SyntaxToken identifier, 1156List<SyntaxToken>? leftLocals = null; 1157List<SyntaxToken>? rightLocals = null; 1236List<SyntaxToken>? leftLocals = null; 1237List<SyntaxToken>? rightLocals = null; 1261List<SyntaxToken>? leftLocals = null; 1262List<SyntaxToken>? rightLocals = null; 1279private static void GetLocalNames(BlockSyntax block, ref List<SyntaxToken>? result) 1292private static void GetLocalNames(VariableDeclarationSyntax localDeclaration, ref List<SyntaxToken>? result) 1300internal static void GetLocalNames(CommonForEachStatementSyntax commonForEach, ref List<SyntaxToken>? result) 1318private static void GetLocalNames(ExpressionSyntax expression, ref List<SyntaxToken>? result) 1343private static void GetLocalNames(VariableDesignationSyntax designation, ref List<SyntaxToken>? result) 1368private static void GetLocalNames(SyntaxToken syntaxToken, [NotNull] ref List<SyntaxToken>? result) 1549var leftToken = oldNodeOrToken.AsToken(); 1550var rightToken = newNodeOrToken.AsToken(); 1570internal static IEnumerable<SyntaxToken> GetDescendantTokensIgnoringSeparators<TSyntaxNode>(SeparatedSyntaxList<TSyntaxNode> list) 1575foreach (var token in node.DescendantTokens()) 1604public static double ComputeDistance(SyntaxToken oldToken, SyntaxToken newToken) 1618public static double ComputeDistance(IEnumerable<SyntaxToken>? oldTokens, IEnumerable<SyntaxToken>? newTokens) 1645public static IEnumerable<SequenceEdit> GetSequenceEdits(IEnumerable<SyntaxToken>? oldTokens, IEnumerable<SyntaxToken>? newTokens) 1651public static IEnumerable<SequenceEdit> GetSequenceEdits(ImmutableArray<SyntaxToken> oldTokens, ImmutableArray<SyntaxToken> newTokens) 1654private sealed class LcsTokens : LongestCommonImmutableArraySubsequence<SyntaxToken> 1658protected override bool Equals(SyntaxToken oldElement, SyntaxToken newElement)
EmbeddedLanguages\CSharpEmbeddedLanguagesProvider.cs (1)
26public override string EscapeText(string text, SyntaxToken token)
EmbeddedLanguages\CSharpJsonDetectionCodeFixProvider.cs (1)
26protected override void AddComment(SyntaxEditor editor, SyntaxToken stringLiteral, string commentContents)
EmbeddedLanguages\CSharpTestEmbeddedLanguageClassifier.cs (1)
38var token = context.SyntaxToken;
EmbeddedLanguages\EmbeddedLanguageUtilities.cs (3)
12internal static void AddComment(SyntaxEditor editor, SyntaxToken stringLiteral, string commentContents) 17var newStringLiteral = stringLiteral.WithLeadingTrivia( 25public static string EscapeText(string text, SyntaxToken token)
EncapsulateField\CSharpEncapsulateFieldService.cs (1)
51var newIdentifier = Identifier(
ExternalAccess\Pythia\Api\IPythiaDeclarationNameRecommenderImplmentation.cs (1)
33public SyntaxToken LeftToken => _context.LeftToken;
ExtractMethod\CSharpMethodExtractor.cs (4)
164protected override SyntaxToken? GetInvocationNameToken(IEnumerable<SyntaxToken> methodNames) 170protected override async Task<(Document document, SyntaxToken? invocationNameToken)> InsertNewLineBeforeLocalFunctionIfNecessaryAsync( 172SyntaxToken? invocationNameToken,
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (12)
39private readonly SyntaxToken _methodName; 83var nameToken = CreateMethodName(); 353var identifier = ApplyTriviaFromDeclarationToAssignmentIdentifier(declarationStatement, firstVariableToAttachTrivia, variableDeclaration); 474var identifier = designation.Identifier; 476var newIdentifier = identifier.WithAdditionalAnnotations(annotation); 488private static SyntaxToken ApplyTriviaFromDeclarationToAssignmentIdentifier(LocalDeclarationStatementSyntax declarationStatement, bool firstVariableToAttachTrivia, VariableDeclaratorSyntax variable) 490var identifier = variable.Identifier; 522private static ExpressionSyntax CreateAssignmentExpression(SyntaxToken identifier, ExpressionSyntax rvalue) 558protected override SyntaxToken CreateIdentifier(string name) 580var refOrOut = modifier == SyntaxKind.None ? default : Token(modifier); 614protected override StatementSyntax CreateAssignmentExpressionStatement(SyntaxToken identifier, ExpressionSyntax rvalue) 786protected SyntaxToken GenerateMethodNameForStatementGenerators()
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.ExpressionCodeGenerator.cs (1)
30protected override SyntaxToken CreateMethodName()
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.MultipleStatementsCodeGenerator.cs (1)
29protected override SyntaxToken CreateMethodName()
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.SingleStatementCodeGenerator.cs (1)
26protected override SyntaxToken CreateMethodName() => GenerateMethodNameForStatementGenerators();
ExtractMethod\CSharpMethodExtractor.FormattingProvider.cs (2)
20public override AdjustNewLinesOperation? GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation)
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (3)
66var firstToken = firstStatement.GetFirstToken(includeZeroWidth: true); 70var lastToken = lastStatement.GetLastToken(includeZeroWidth: true); 210foreach (var token in statement.DescendantTokens())
ExtractMethod\CSharpMethodExtractor.TriviaResult.cs (4)
59private static SyntaxToken AnnotationResolver( 66var token = node.GetAnnotatedNodesAndTokens(annotation).FirstOrDefault().AsToken(); 90Dictionary<SyntaxToken, LeadingTrailingTriviaPair> triviaMap, 135private static (BlockSyntax body, ArrowExpressionClauseSyntax expressionBody, SyntaxToken semicolonToken) GetResolverElements(SyntaxNode method)
ExtractMethod\CSharpSelectionResult.cs (5)
29SyntaxToken firstToken, 30SyntaxToken lastToken, 87protected override bool UnderAnonymousOrLocalMethod(SyntaxToken token, SyntaxToken firstToken, SyntaxToken lastToken)
ExtractMethod\CSharpSelectionValidator.cs (2)
267private static bool UnderValidContext(SyntaxToken token) 473var lastToken = root.FindToken(textSpan.End);
ExtractMethod\Extensions.cs (9)
143public static bool ContainArgumentlessThrowWithoutEnclosingCatch(this IEnumerable<SyntaxToken> tokens, TextSpan textSpan) 145foreach (var token in tokens) 167public static bool ContainPreprocessorCrossOver(this IEnumerable<SyntaxToken> tokens, TextSpan textSpan) 217public static IEnumerable<SyntaxTrivia> GetAllTrivia(this IEnumerable<SyntaxToken> tokens) 219foreach (var token in tokens) 236public static bool HasHybridTriviaBetween(this SyntaxToken token1, SyntaxToken token2) 260public static bool BetweenFieldAndNonFieldMember(this SyntaxToken token1, SyntaxToken token2)
GenerateMember\GenerateVariable\CSharpGenerateVariableService.cs (5)
39private static bool IsProbablySyntacticConstruct(SyntaxToken token) 65out SyntaxToken identifierToken, out IPropertySymbol propertySymbol, out INamedTypeSymbol typeToGenerateIn) 90out SyntaxToken identifierToken, out ExpressionSyntax simpleNameOrMemberAccessExpression, out bool isInExecutableBlock, out bool isConditionalAccessExpression) 198protected override bool TryConvertToLocalDeclaration(ITypeSymbol type, SyntaxToken identifierToken, SemanticModel semanticModel, CancellationToken cancellationToken, out SyntaxNode newRoot) 200var token = identifierToken;
GenerateType\CSharpGenerateTypeService.cs (3)
226var token = simpleName.GetLastToken().GetNextToken(); 246var token = simpleName.GetLastToken().GetNextToken(); 265var nextToken = simpleName.GetLastToken().GetNextToken();
GoToDefinition\CSharpGoToDefinitionSymbolService.cs (1)
28protected override int? GetTargetPositionIfControlFlow(SemanticModel semanticModel, SyntaxToken token)
Highlighting\KeywordHighlighters\AsyncAwaitHighlighter.cs (4)
29protected override bool ContainsHighlightableToken(ref TemporaryArray<SyntaxToken> tokens) 85foreach (var mod in modifiers) 96private static bool TryAddAsyncOrAwaitKeyword(SyntaxToken mod, List<TextSpan> spans) 105var previousToken = mod.GetPreviousToken();
Highlighting\KeywordHighlighters\IfStatementHighlighter.cs (4)
27protected override bool ContainsHighlightableToken(ref TemporaryArray<SyntaxToken> tokens) 48var elseKeyword = ifStatement.Else.ElseKeyword; 78public static bool OnlySpacesBetween(SyntaxToken first, SyntaxToken second)
Highlighting\KeywordHighlighters\LoopHighlighter.cs (1)
24protected override bool ContainsHighlightableToken(ref TemporaryArray<SyntaxToken> tokens)
Highlighting\KeywordHighlighters\SwitchStatementHighlighter.cs (1)
25protected override bool ContainsHighlightableToken(ref TemporaryArray<SyntaxToken> tokens)
ImplementInterface\AbstractChangeImplementationCodeRefactoringProvider.cs (4)
128private static async Task<(SyntaxNode?, ExplicitInterfaceSpecifierSyntax?, SyntaxToken)> GetContainerAsync(CodeRefactoringContext context) 155private static (SyntaxNode? declaration, ExplicitInterfaceSpecifierSyntax?, SyntaxToken) GetContainer(SyntaxToken token) 164_ => default((SyntaxNode member, ExplicitInterfaceSpecifierSyntax?, SyntaxToken)),
InheritanceMargin\CSharpInheritanceMarginService.cs (1)
65protected override SyntaxToken GetDeclarationToken(SyntaxNode declarationNode)
InitializeParameter\InitializeParameterHelpers.cs (2)
40private static SyntaxToken? TryGetSemicolonToken(SyntaxNode functionDeclaration) 131SyntaxToken semicolonToken,
IntroduceVariable\CSharpIntroduceLocalForExpressionCodeRefactoringProvider.cs (2)
62var semicolonToken = expressionStatement.SemicolonToken; 78var semicolonToken = expressionStatement.SemicolonToken;
MetadataAsSource\FormattingRule.cs (4)
20protected override AdjustNewLinesOperation GetAdjustNewLinesOperationBetweenMembersAndUsings(SyntaxToken token1, SyntaxToken token2) 22var previousToken = token1; 23var currentToken = token2;
Organizing\Organizers\ModifiersOrganizer.Comparer.cs (5)
16private sealed class Comparer : IComparer<SyntaxToken> 26public int Compare(SyntaxToken x, SyntaxToken y) 36private static readonly ImmutableArray<Func<SyntaxToken, IComparable>> s_comparers = 39private static Ordering GetOrdering(SyntaxToken token)
Organizing\Organizers\ModifiersOrganizer.cs (1)
21var initialList = new List<SyntaxToken>(modifiers);
QuickInfo\CSharpDiagnosticAnalyzerQuickInfoProvider.cs (4)
34SyntaxToken token) 43SyntaxToken token) 50private QuickInfoItem? GetQuickinfoForPragmaWarning(Document document, SyntaxToken token) 91SyntaxToken token,
QuickInfo\CSharpSemanticQuickInfoProvider.cs (5)
37protected override bool GetBindableNodeForTokenIndicatingLambda(SyntaxToken token, [NotNullWhen(returnValue: true)] out SyntaxNode? found) 57protected override bool GetBindableNodeForTokenIndicatingPossibleIndexerAccess(SyntaxToken token, [NotNullWhen(returnValue: true)] out SyntaxNode? found) 70protected override bool GetBindableNodeForTokenIndicatingMemberAccess(SyntaxToken token, out SyntaxToken found) 83protected override bool ShouldCheckPreviousToken(SyntaxToken token)
QuickInfo\CSharpSyntacticQuickInfoProvider.cs (8)
31SyntaxToken token) 36SyntaxToken token) 39private static QuickInfoItem? BuildQuickInfo(SyntaxToken token, CancellationToken cancellationToken) 57private static QuickInfoItem? BuildQuickInfoCloseBrace(SyntaxToken token) 68var openBrace = parent.ChildNodesAndTokens().FirstOrDefault(n => n.Kind() == SyntaxKind.OpenBraceToken).AsToken(); 100private static void MarkInterestedSpanNearbyScopeBlock(SyntaxNode block, SyntaxToken openBrace, ref int spanStart, ref int spanEnd) 109var nextToken = block.FindToken(openBrace.FullSpan.End); 138private static QuickInfoItem? BuildQuickInfoDirectives(SyntaxToken token, CancellationToken cancellationToken)
RelatedDocuments\CSharpRelatedDocumentsService.cs (3)
24protected override IEnumerable<(ExpressionSyntax expression, SyntaxToken nameToken)> IteratePotentialTypeNodes(SyntaxNode root) 36if (IsPossibleTypeName(memberAccess.Expression, out var nameToken)) 67static bool IsPossibleTypeName(ExpressionSyntax expression, out SyntaxToken nameToken)
RemoveUnusedVariable\CSharpRemoveUnusedVariableCodeFixProvider.cs (1)
35protected override bool IsCatchDeclarationIdentifier(SyntaxToken token)
Rename\CSharpRenameIssuesService.cs (2)
25SemanticModel semanticModel, ISymbol symbol, SyntaxToken triggerToken, [NotNullWhen(true)] out string? langError) 56private static bool IsTypeNamedVarInVariableOrFieldDeclaration(SyntaxToken token)
ReplaceDocCommentTextWithTag\CSharpReplaceDocCommentTextWithTagCodeRefactoringProvider.cs (2)
23protected override bool IsXmlTextToken(SyntaxToken token) 26protected override bool IsInXMLAttribute(SyntaxToken token)
ReplaceMethodWithProperty\CSharpReplaceMethodWithPropertyService.cs (6)
125var nameToken = GetPropertyName(getMethodDeclaration.Identifier, propertyName, nameChanged); 158private static SyntaxToken GetPropertyName(SyntaxToken identifier, string propertyName, bool nameChanged) 350public void ReplaceGetReference(SyntaxEditor editor, SyntaxToken nameToken, string propertyName, bool nameChanged) 353public void ReplaceSetReference(SyntaxEditor editor, SyntaxToken nameToken, string propertyName, bool nameChanged) 356public static void ReplaceInvocation(SyntaxEditor editor, SyntaxToken nameToken, string propertyName, bool nameChanged,
ReplacePropertyWithMethods\CSharpReplacePropertyWithMethodsService.cs (1)
306protected override NameMemberCrefSyntax CreateCrefSyntax(NameMemberCrefSyntax originalCref, SyntaxToken identifierToken, SyntaxNode? parameterType)
ReverseForStatement\CSharpReverseForStatementCodeRefactoringProvider.cs (2)
374var newOperator = Token(newOperatorKind).WithTriviaFrom(condition.OperatorToken); 397var newOpToken = Token(newKind).WithTriviaFrom(opToken);
SignatureHelp\AttributeSignatureHelpProvider.cs (2)
58private bool IsTriggerToken(SyntaxToken token) 67private static bool IsArgumentListToken(AttributeSyntax expression, SyntaxToken token)
SignatureHelp\ConstructorInitializerSignatureHelpProvider.cs (3)
59private bool IsTriggerToken(SyntaxToken token) 62private static bool IsArgumentListToken(ConstructorInitializerSyntax expression, SyntaxToken token) 134SyntaxToken openToken,
SignatureHelp\ElementAccessExpressionSignatureHelpProvider.cs (16)
46private static bool TryGetElementAccessExpression(SyntaxNode root, int position, ISyntaxFactsService syntaxFacts, SignatureHelpTriggerReason triggerReason, CancellationToken cancellationToken, [NotNullWhen(true)] out ExpressionSyntax? identifier, out SyntaxToken openBrace) 56if (!TryGetElementAccessExpression(root, position, document.GetRequiredLanguageService<ISyntaxFactsService>(), triggerInfo.TriggerReason, cancellationToken, out var expression, out var openBrace)) 115private static TextSpan GetTextSpan(ExpressionSyntax expression, SyntaxToken openBracket) 145out var openBracket) || 227SyntaxToken openToken, 284internal static bool IsTriggerToken(SyntaxToken token) 293internal static bool IsArgumentListToken(ElementAccessExpressionSyntax expression, SyntaxToken token) 299internal static TextSpan GetTextSpan(SyntaxToken openBracket) 306internal static bool TryGetSyntax(SyntaxNode root, int position, ISyntaxFactsService syntaxFacts, SignatureHelpTriggerReason triggerReason, CancellationToken cancellationToken, [NotNullWhen(true)] out ExpressionSyntax? identifier, out SyntaxToken openBrace) 327internal static bool IsArgumentListToken(ArrayTypeSyntax node, SyntaxToken token) 333internal static bool IsTriggerToken(SyntaxToken token) 341internal static TextSpan GetTextSpan(SyntaxNode expression, SyntaxToken openBracket) 347internal static bool TryGetSyntax(SyntaxNode root, int position, ISyntaxFactsService syntaxFacts, SignatureHelpTriggerReason triggerReason, CancellationToken cancellationToken, [NotNullWhen(true)] out ExpressionSyntax? identifier, out SyntaxToken openBrace) 368internal static bool IsTriggerToken(SyntaxToken token) 378internal static bool IsArgumentListToken(ElementBindingExpressionSyntax expression, SyntaxToken token) 384internal static bool TryGetSyntax(SyntaxNode root, int position, ISyntaxFactsService syntaxFacts, SignatureHelpTriggerReason triggerReason, CancellationToken cancellationToken, [NotNullWhen(true)] out ExpressionSyntax? identifier, out SyntaxToken openBrace)
SignatureHelp\GenericNamePartiallyWrittenSignatureHelpProvider.cs (4)
26protected override bool TryGetGenericIdentifier(SyntaxNode root, int position, ISyntaxFactsService syntaxFacts, SignatureHelpTriggerReason triggerReason, CancellationToken cancellationToken, out SyntaxToken genericIdentifier, out SyntaxToken lessThanToken) 29protected override TextSpan GetTextSpan(SyntaxToken genericIdentifier, SyntaxToken lessThanToken)
SignatureHelp\GenericNameSignatureHelpProvider.cs (10)
45out SyntaxToken genericIdentifier, 46out SyntaxToken lessThanToken) 61private bool IsTriggerToken(SyntaxToken token) 70private bool IsArgumentListToken(GenericNameSyntax node, SyntaxToken token) 81out var genericIdentifier, out var lessThanToken)) 144out var genericIdentifier, out _)) 162protected virtual TextSpan GetTextSpan(SyntaxToken genericIdentifier, SyntaxToken lessThanToken) 170SyntaxToken lessThanToken,
SignatureHelp\InitializerExpressionSignatureHelpProvider.cs (2)
47private bool IsTriggerToken(SyntaxToken token) 53private static bool IsInitializerExpressionToken(InitializerExpressionSyntax expression, SyntaxToken token)
SignatureHelp\InvocationExpressionSignatureHelpProvider.cs (2)
56private bool IsTriggerToken(SyntaxToken token) 59private static bool IsArgumentListToken(InvocationExpressionSyntax expression, SyntaxToken token)
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.cs (2)
52private bool IsTriggerToken(SyntaxToken token) 55private static bool IsArgumentListToken(BaseObjectCreationExpressionSyntax expression, SyntaxToken token)
SignatureHelp\PrimaryConstructorBaseTypeSignatureHelpProvider.cs (3)
59static bool IsArgumentListToken(PrimaryConstructorBaseTypeSyntax expression, SyntaxToken token) 67private bool IsTriggerToken(SyntaxToken token) 122SyntaxToken openToken,
SignatureHelp\SignatureHelpUtilities.cs (9)
18private static readonly Func<BaseArgumentListSyntax, SyntaxToken> s_getBaseArgumentListOpenToken = list => list.GetOpenToken(); 19private static readonly Func<TypeArgumentListSyntax, SyntaxToken> s_getTypeArgumentListOpenToken = list => list.LessThanToken; 20private static readonly Func<InitializerExpressionSyntax, SyntaxToken> s_getInitializerExpressionOpenToken = e => e.OpenBraceToken; 21private static readonly Func<AttributeArgumentListSyntax, SyntaxToken> s_getAttributeArgumentListOpenToken = list => list.OpenParenToken; 23private static readonly Func<BaseArgumentListSyntax, SyntaxToken> s_getBaseArgumentListCloseToken = list => list.GetCloseToken(); 24private static readonly Func<TypeArgumentListSyntax, SyntaxToken> s_getTypeArgumentListCloseToken = list => list.GreaterThanToken; 25private static readonly Func<InitializerExpressionSyntax, SyntaxToken> s_getInitializerExpressionCloseToken = e => e.CloseBraceToken; 26private static readonly Func<AttributeArgumentListSyntax, SyntaxToken> s_getAttributeArgumentListCloseToken = list => list.CloseParenToken; 99internal static bool IsTriggerParenOrComma<TSyntaxNode>(SyntaxToken token, Func<char, bool> isTriggerCharacter) where TSyntaxNode : SyntaxNode
SignatureHelp\TupleConstructionSignatureHelpProvider.cs (6)
26private static readonly Func<TupleExpressionSyntax, SyntaxToken> s_getOpenToken = e => e.OpenParenToken; 27private static readonly Func<TupleExpressionSyntax, SyntaxToken> s_getCloseToken = e => e.CloseParenToken; 209private bool IsTupleExpressionTriggerToken(SyntaxToken token) 212private static bool IsTupleArgumentListToken(TupleExpressionSyntax? tupleExpression, SyntaxToken token) 226private bool IsParenthesizedExpressionTriggerToken(SyntaxToken token) 229private static bool IsParenthesizedExpressionToken(ParenthesizedExpressionSyntax? expr, SyntaxToken token)
Snippets\AbstractCSharpAutoPropertySnippetProvider.cs (2)
34protected virtual SyntaxToken[] GetAdditionalPropertyModifiers(CSharpSyntaxContext? syntaxContext) => []; 80var identifier = propertyDeclaration.Identifier;
Snippets\AbstractCSharpForLoopSnippetProvider.cs (3)
42protected override bool CanInsertStatementAfterToken(SyntaxToken token) 51var iteratorVariable = generator.Identifier(iteratorName); 97var declaratorIdentifier = variableDeclarator.Identifier;
Snippets\AbstractCSharpTypeSnippetProvider.cs (1)
110protected sealed override SyntaxToken GetTypeDeclarationIdentifier(TTypeDeclarationSyntax baseTypeDeclaration)
Snippets\CSharpConsoleSnippetProvider.cs (1)
52protected override SyntaxToken GetOpenParenToken(ArgumentListSyntax argumentList)
Snippets\CSharpDoWhileLoopSnippetProvider.cs (1)
30protected override bool CanInsertStatementAfterToken(SyntaxToken token)
Snippets\CSharpElseSnippetProvider.cs (1)
30var token = syntaxContext.TargetToken;
Snippets\CSharpForEachLoopSnippetProvider.cs (2)
41var token = syntaxContext.TargetToken; 55protected override bool CanInsertStatementAfterToken(SyntaxToken token)
Snippets\CSharpIfSnippetProvider.cs (1)
27protected override bool CanInsertStatementAfterToken(SyntaxToken token)
Snippets\CSharpProprSnippetProvider.cs (1)
28protected override SyntaxToken[] GetAdditionalPropertyModifiers(CSharpSyntaxContext? syntaxContext) => [RequiredKeyword];
Snippets\CSharpWhileLoopSnippetProvider.cs (1)
27protected override bool CanInsertStatementAfterToken(SyntaxToken token)
SpellCheck\CSharpSpellcheckCodeFixProvider.cs (3)
47protected override bool IsGeneric(SyntaxToken token) 56protected override SyntaxToken CreateIdentifier(SyntaxToken nameToken, string newName)
SplitStringLiteral\SimpleStringSplitter.cs (4)
19SyntaxToken token, 24private readonly SyntaxToken _token = token; 50var firstToken = SyntaxFactory.Token( 57var secondToken = SyntaxFactory.Token(
SplitStringLiteral\StringSplitter.cs (3)
26protected readonly SyntaxToken PlusNewLineToken = SyntaxFactory.Token( 59SyntaxToken token, int position) 70private static bool IsInterpolationOpenBrace(SyntaxToken token, int position)
src\Analyzers\CSharp\Analyzers\AddAccessibilityModifiers\CSharpAddAccessibilityModifiers.cs (1)
26out SyntaxToken name,
src\Analyzers\CSharp\Analyzers\AddAccessibilityModifiers\CSharpAddAccessibilityModifiersDiagnosticAnalyzer.cs (1)
68CSharpAccessibilityFacts.Instance, member, option.Value, out var name, out var modifiersAdded))
src\Analyzers\CSharp\Analyzers\AddBraces\CSharpAddBracesDiagnosticAnalyzer.cs (3)
109var firstToken = statement.GetFirstToken(); 173var lastTokenBeforeEmbeddedStatement = embeddedStatement.GetFirstToken().GetPreviousToken(); 215var firstTokenAfterEmbeddedStatement = embeddedStatement.GetLastToken().GetNextToken();
src\Analyzers\CSharp\Analyzers\AddRequiredParentheses\CSharpAddRequiredExpressionParenthesesDiagnosticAnalyzer.cs (1)
62protected override (ExpressionSyntax, SyntaxToken, ExpressionSyntax) GetPartsOfBinaryLike(ExpressionSyntax binaryLike)
src\Analyzers\CSharp\Analyzers\AddRequiredParentheses\CSharpAddRequiredPatternParenthesesDiagnosticAnalyzer.cs (1)
36protected override (PatternSyntax, SyntaxToken, PatternSyntax) GetPartsOfBinaryLike(BinaryPatternSyntax binaryPattern)
src\Analyzers\CSharp\Analyzers\InvokeDelegateWithConditionalAccess\InvokeDelegateWithConditionalAccessAnalyzer.cs (2)
178var previousToken = expressionStatement.GetFirstToken().GetPreviousToken(); 179var nextToken = expressionStatement.GetLastToken().GetNextToken();
src\Analyzers\CSharp\Analyzers\MakeStructMemberReadOnly\CSharpMakeStructMemberReadOnlyAnalyzer.cs (1)
204_ => (SyntaxToken?)null
src\Analyzers\CSharp\Analyzers\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementDiagnosticAnalyzer.cs (2)
88static bool IsOk(SyntaxToken token) 101var nextToken = token.GetNextToken();
src\Analyzers\CSharp\Analyzers\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementDiagnosticAnalyzer.cs (2)
69static bool IsOk(SyntaxToken token) 82var nextToken = token.GetNextToken();
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (6)
78private void ProcessToken(SyntaxTreeAnalysisContext context, NotificationOption2 notificationOption, SourceText text, SyntaxToken token) 80if (!HasExcessBlankLinesAfter(text, token, out var secondBrace, out _)) 93SourceText text, SyntaxToken token, 94out SyntaxToken secondBrace, 102var nextToken = token.GetNextToken(); 106var firstBrace = token;
src\Analyzers\CSharp\Analyzers\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementDiagnosticAnalyzer.cs (2)
71var colonToken = initializer.ColonToken; 72var thisOrBaseKeyword = initializer.ThisOrBaseKeyword;
src\Analyzers\CSharp\Analyzers\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementDiagnosticAnalyzer.cs (3)
100var statementStartToken = statement.GetFirstToken(); 126public static bool ContainsEndOfLineBetween(SyntaxToken previous, SyntaxToken next)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessaryImports\CSharpRemoveUnnecessaryImportsDiagnosticAnalyzer.cs (1)
46protected override SyntaxToken? TryGetLastToken(SyntaxNode node)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForBuilderDiagnosticAnalyzer.cs (2)
148var identifier = 211static InvocationExpressionSyntax? TryFindCreationExpression(SyntaxToken identifier, StatementSyntax statement)
src\Analyzers\CSharp\Analyzers\UseCollectionInitializer\CSharpUpdateExpressionSyntaxHelper.cs (2)
17out SyntaxToken awaitKeyword, 18out SyntaxToken identifier,
src\Analyzers\CSharp\Analyzers\UseDeconstruction\CSharpUseDeconstructionDiagnosticAnalyzer.cs (1)
138SyntaxToken identifier,
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForAccessorsHelper.cs (2)
44protected override SyntaxToken GetSemicolonToken(AccessorDeclarationSyntax declaration) 47protected override AccessorDeclarationSyntax WithSemicolonToken(AccessorDeclarationSyntax declaration, SyntaxToken token)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForConstructorsHelper.cs (2)
38protected override SyntaxToken GetSemicolonToken(ConstructorDeclarationSyntax declaration) 41protected override ConstructorDeclarationSyntax WithSemicolonToken(ConstructorDeclarationSyntax declaration, SyntaxToken token)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForConversionOperatorsHelper.cs (2)
38protected override SyntaxToken GetSemicolonToken(ConversionOperatorDeclarationSyntax declaration) 41protected override ConversionOperatorDeclarationSyntax WithSemicolonToken(ConversionOperatorDeclarationSyntax declaration, SyntaxToken token)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForIndexersHelper.cs (3)
42protected override SyntaxToken GetSemicolonToken(IndexerDeclarationSyntax declaration) 45protected override IndexerDeclarationSyntax WithSemicolonToken(IndexerDeclarationSyntax declaration, SyntaxToken token) 74out SyntaxToken semicolonToken)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForLocalFunctionHelper.cs (2)
41protected override SyntaxToken GetSemicolonToken(LocalFunctionStatementSyntax statement) 44protected override LocalFunctionStatementSyntax WithSemicolonToken(LocalFunctionStatementSyntax statement, SyntaxToken token)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForMethodsHelper.cs (2)
41protected override SyntaxToken GetSemicolonToken(MethodDeclarationSyntax declaration) 44protected override MethodDeclarationSyntax WithSemicolonToken(MethodDeclarationSyntax declaration, SyntaxToken token)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForOperatorsHelper.cs (2)
40protected override SyntaxToken GetSemicolonToken(OperatorDeclarationSyntax declaration) 43protected override OperatorDeclarationSyntax WithSemicolonToken(OperatorDeclarationSyntax declaration, SyntaxToken token)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyForPropertiesHelper.cs (3)
42protected override SyntaxToken GetSemicolonToken(PropertyDeclarationSyntax declaration) 45protected override PropertyDeclarationSyntax WithSemicolonToken(PropertyDeclarationSyntax declaration, SyntaxToken token) 74out SyntaxToken semicolonToken)
src\Analyzers\CSharp\Analyzers\UseExpressionBody\Helpers\UseExpressionBodyHelper`1.cs (7)
123out SyntaxToken semicolonWhenOnSingleLine) 132[NotNullWhen(true)] out ArrowExpressionClauseSyntax? expressionWhenOnSingleLine, out SyntaxToken semicolonWhenOnSingleLine) 154out SyntaxToken semicolonToken) 233TryConvertToExpressionBody(declaration, ExpressionBodyPreference.WhenPossible, cancellationToken, out var expressionBody, out var semicolonToken); 262protected abstract SyntaxToken GetSemicolonToken(TDeclaration declaration); 264protected abstract TDeclaration WithSemicolonToken(TDeclaration declaration, SyntaxToken token); 286var semicolonToken = GetSemicolonToken(declaration);
src\Analyzers\CSharp\Analyzers\UsePatternCombinators\CSharpUsePatternCombinatorsAnalyzer.cs (1)
75private static AnalyzedPattern? ParseBinaryPattern(IBinaryOperation op, bool isDisjunctive, SyntaxToken token)
src\Analyzers\CSharp\Analyzers\UsePatternMatching\CSharpUseNotPatternDiagnosticAnalyzer.cs (1)
73var isKeyword = parenthesizedExpression.Expression switch
src\Analyzers\CSharp\CodeFixes\AddAnonymousTypeMemberName\CSharpAddAnonymousTypeMemberNameCodeFixProvider.cs (1)
36protected override AnonymousObjectMemberDeclaratorSyntax WithName(AnonymousObjectMemberDeclaratorSyntax declarator, SyntaxToken name)
src\Analyzers\CSharp\CodeFixes\AddInheritdoc\AddInheritdocCodeFixProvider.cs (2)
99var xmlSpaceAfterTripleSlash = Token(leading: [DocumentationCommentExterior("///")], SyntaxKind.XmlTextLiteralToken, text: " ", valueText: " ", trailing: default); 103var xmlNewLineToken = Token(leading: default, SyntaxKind.XmlTextLiteralNewLineToken, text: newLine, valueText: newLine, trailing: default);
src\Analyzers\CSharp\CodeFixes\ConditionalExpressionInStringInterpolation\CSharpAddParenthesesAroundConditionalExpressionInInterpolatedStringCodeFixProvider.cs (1)
110var endToken = sourceText.AreOnSameLine(conditional.ColonToken, conditional.WhenFalse.GetFirstToken())
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (5)
227var token = root.FindToken(textLine.Start, findInsideTrivia: true); 286var firstBodyToken = converted.OpenBraceToken.GetNextToken(includeZeroWidth: true, includeSkipped: true); 288&& HasLeadingBlankLine(firstBodyToken, out var firstBodyTokenWithoutBlankLine)) 303SyntaxToken token, out SyntaxToken withoutBlankLine)
src\Analyzers\CSharp\CodeFixes\ConvertToRecord\ConvertToRecordEngine.cs (4)
380SyntaxToken recordKeyword, 386SyntaxToken openBrace, closeBrace, semicolon; 731SyntaxToken prevToken = default; 733foreach (var token in text.TextTokens)
src\Analyzers\CSharp\CodeFixes\DocumentationComments\CSharpRemoveDocCommentNodeCodeFixProvider.cs (2)
46protected override bool IsXmlWhitespaceToken(SyntaxToken token) 49protected override bool IsXmlNewLineToken(SyntaxToken token)
src\Analyzers\CSharp\CodeFixes\FixIncorrectConstraint\CSharpFixIncorrectConstraintCodeFixProvider.cs (1)
34out SyntaxToken enumOrDelegateKeyword)
src\Analyzers\CSharp\CodeFixes\GenerateConstructor\CSharpGenerateConstructorService.cs (5)
47out SyntaxToken token, 85out SyntaxToken token, 117out SyntaxToken token, 152out SyntaxToken token, 185protected override IMethodSymbol GetCurrentConstructor(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken)
src\Analyzers\CSharp\CodeFixes\GenerateConstructor\GenerateConstructorCodeFixProvider.cs (1)
50protected override bool IsCandidate(SyntaxNode node, SyntaxToken token, Diagnostic diagnostic)
src\Analyzers\CSharp\CodeFixes\GenerateDefaultConstructors\CSharpGenerateDefaultConstructorsCodeFixProvider.cs (1)
28protected override SyntaxToken? TryGetTypeName(SyntaxNode typeDeclaration)
src\Analyzers\CSharp\CodeFixes\GenerateEnumMember\CSharpGenerateEnumMemberService.cs (1)
27out SyntaxToken identifierToken, out ExpressionSyntax simpleNameOrMemberAccessExpression)
src\Analyzers\CSharp\CodeFixes\GenerateEnumMember\GenerateEnumMemberCodeFixProvider.cs (1)
38protected override bool IsCandidate(SyntaxNode node, SyntaxToken token, Diagnostic diagnostic)
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateConversionCodeFixProvider.cs (1)
35protected override bool IsCandidate(SyntaxNode node, SyntaxToken token, Diagnostic diagnostic)
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateDeconstructMethodCodeFixProvider.cs (1)
53var token = root.FindToken(span.Start);
src\Analyzers\CSharp\CodeFixes\GenerateMethod\GenerateMethodCodeFixProvider.cs (1)
54protected override bool IsCandidate(SyntaxNode node, SyntaxToken token, Diagnostic diagnostic)
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateConversionService.cs (2)
59out SyntaxToken identifierToken, 85out SyntaxToken identifierToken,
src\Analyzers\CSharp\CodeFixes\GenerateParameterizedMember\CSharpGenerateMethodService.cs (2)
51out SyntaxToken identifierToken, 82out SyntaxToken identifierToken,
src\Analyzers\CSharp\CodeFixes\GenerateVariable\CSharpGenerateVariableCodeFixProvider.cs (1)
40protected override bool IsCandidate(SyntaxNode node, SyntaxToken token, Diagnostic diagnostic)
src\Analyzers\CSharp\CodeFixes\HideBase\HideBaseCodeFixProvider.AddNewKeywordAction.cs (3)
58int CompareModifiers(SyntaxToken left, SyntaxToken right) 61int GetOrder(SyntaxToken token)
src\Analyzers\CSharp\CodeFixes\ImplementAbstractClass\CSharpImplementAbstractClassCodeFixProvider.cs (1)
27protected override SyntaxToken GetClassIdentifier(TypeDeclarationSyntax classNode)
src\Analyzers\CSharp\CodeFixes\InlineDeclaration\CSharpInlineDeclarationCodeFixProvider.cs (1)
124var localDeclarationToken = localDeclarationStatement.GetFirstToken();
src\Analyzers\CSharp\CodeFixes\MakeMethodAsynchronous\CSharpMakeMethodAsynchronousCodeFixProvider.cs (2)
33private static readonly SyntaxToken s_asyncKeywordWithSpace = AsyncKeyword.WithoutTrivia().WithTrailingTrivia(Space); 48var token = root.FindToken(diagnostic.Location.SourceSpan.Start);
src\Analyzers\CSharp\CodeFixes\MisplacedUsingDirectives\MisplacedUsingDirectivesCodeFixProvider.cs (2)
431var firstToken = compilationUnit.GetFirstToken(includeZeroWidth: true); 433var newFirstToken = firstToken.WithLeadingTrivia(newLeadingTrivia);
src\Analyzers\CSharp\CodeFixes\NewLines\ArrowExpressionClausePlacement\ArrowExpressionClausePlacementCodeFixProvider.cs (1)
67SyntaxToken token,
src\Analyzers\CSharp\CodeFixes\NewLines\ConditionalExpressionPlacement\ConditionalExpressionPlacementCodeFixProvider.cs (1)
68SyntaxToken token,
src\Analyzers\CSharp\CodeFixes\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementCodeFixProvider.cs (8)
51using var _ = PooledDictionary<SyntaxToken, SyntaxToken>.GetInstance(out var tokenToToken); 63Dictionary<SyntaxToken, SyntaxToken> tokenToToken, 68var token = root.FindToken(diagnostic.Location.SourceSpan.Start); 75var firstBrace = token.GetPreviousToken(); 83text, firstBrace, out var secondBrace, out var lastEndOfLineTrivia)) 89var updatedSecondBrace = secondBrace.WithLeadingTrivia(
src\Analyzers\CSharp\CodeFixes\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementCodeFixProvider.cs (13)
48using var _ = PooledDictionary<SyntaxToken, SyntaxToken>.GetInstance(out var replacementMap); 53var colonToken = initializer.ColonToken; 54var thisBaseKeyword = initializer.ThisOrBaseKeyword; 55var parenToken = colonToken.GetPreviousToken(); 89Dictionary<SyntaxToken, SyntaxToken> replacementMap, SyntaxToken colonToken, SyntaxToken thisBaseKeyword) 92var closeParen = colonToken.GetPreviousToken(); 102static SyntaxToken ComputeNewCloseParen(SyntaxToken colonToken, SyntaxToken previousToken)
src\Analyzers\CSharp\CodeFixes\NewLines\EmbeddedStatementPlacement\EmbeddedStatementPlacementCodeFixProvider.cs (4)
107var openBrace = block.OpenBraceToken; 108var previousToken = openBrace.GetPreviousToken(); 131private static SyntaxToken AddLeadingTrivia(SyntaxToken token, SyntaxTrivia trivia)
src\Analyzers\CSharp\CodeFixes\RemoveUnusedParametersAndValues\CSharpRemoveUnusedValuesCodeFixProvider.cs (2)
39protected override SyntaxToken GetForEachStatementIdentifier(ForEachStatementSyntax node) 45protected override SyntaxNode? TryUpdateNameForFlaggedNode(SyntaxNode node, SyntaxToken newName)
src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (2)
38out SyntaxToken classOrStructKeyword, 39out SyntaxToken recordKeyword)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (9)
410var trailingComma = default(SyntaxToken); 554var expressionFirstToken = expression.GetFirstToken(); 588var firstToken = node.GetFirstToken(); 602SyntaxToken IndentToken( 603SyntaxToken token, 715string GetIndentationStringForToken(SyntaxToken token) 853private static SyntaxToken RemoveTrailingWhitespace(SyntaxToken token)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (1)
185var firstToken = firstArgument.GetFirstToken();
src\Analyzers\CSharp\CodeFixes\UseCompoundAssignment\CSharpUseCompoundAssignmentCodeFixProvider.cs (2)
22protected override SyntaxToken Token(SyntaxKind kind) 26SyntaxKind assignmentOpKind, ExpressionSyntax left, SyntaxToken syntaxToken, ExpressionSyntax right)
src\Analyzers\CSharp\CodeFixes\UseConditionalExpression\MultiLineConditionalExpressionFormattingRule.cs (4)
33private static bool IsQuestionOrColonOfNewConditional(SyntaxToken token) 37in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation) 57var baseToken = statement.GetFirstToken();
src\Analyzers\CSharp\CodeFixes\UseImplicitObjectCreation\CSharpUseImplicitObjectCreationCodeFixProvider.cs (2)
77private static SyntaxToken WithoutTrailingWhitespace(SyntaxToken newKeyword)
src\Analyzers\CSharp\CodeFixes\UseImplicitOrExplicitType\UseExplicitTypeCodeFixProvider.cs (1)
198var separatorBuilder = ArrayBuilder<SyntaxToken>.GetInstance(builder.Count - 1, Token(leading: default, SyntaxKind.CommaToken, trailing: default));
src\Analyzers\CSharp\CodeFixes\UseInterpolatedVerbatimString\CSharpUseInterpolatedVerbatimStringCodeFixProvider.cs (2)
56var oldStartToken = verbatimInterpolated.StringStartToken; 57var newStartToken = SyntaxFactory.Token(oldStartToken.LeadingTrivia, SyntaxKind.InterpolatedVerbatimStringStartToken,
src\Analyzers\CSharp\CodeFixes\UseLocalFunction\CSharpUseLocalFunctionCodeFixProvider.cs (2)
217var identifier = localDeclaration.Declaration.Variables[0].Identifier; 230var semicolonToken = anonymousFunction.Body is ExpressionSyntax
src\Analyzers\CSharp\CodeFixes\UsePatternMatching\CSharpAsAndNullCheckCodeFixProvider.cs (1)
101var newIdentifier = declarator.Identifier
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
224var inKeyword = current.Modifiers.FirstOrDefault(t => t.Kind() == SyntaxKind.InKeyword);
src\Compilers\CSharp\Portable\Syntax\LambdaUtilities.cs (2)
223var selectorIdentifier = ((IdentifierNameSyntax)selectOrGroupExpression).Identifier; 225SyntaxToken sourceIdentifier;
StringIndentation\CSharpStringIndentationService.cs (1)
78SourceText text, SyntaxToken token, ref TemporaryArray<StringIndentationRegion> result, CancellationToken cancellationToken)
Structure\CSharpStructureHelpers.cs (17)
26private static int GetCollapsibleStart(SyntaxToken firstToken) 35private static (int spanEnd, int hintEnd) GetCollapsibleEnd(SyntaxToken lastToken, bool compressEmptyLines) 84public static SyntaxToken GetLastInlineMethodBlockToken(SyntaxNode node) 86var lastToken = node.GetLastToken(includeZeroWidth: true); 94var nextToken = lastToken.GetNextToken(includeSkipped: true); 235var startToken = node.GetFirstToken(); 236var endToken = GetEndToken(node); 252var hintTextEndToken = GetHintTextEndToken(node); 267static SyntaxToken GetEndToken(SyntaxNode node) 287static SyntaxToken GetHintTextEndToken(SyntaxNode node) 332SyntaxNode node, SyntaxToken syntaxToken, bool compressEmptyLines, 342SyntaxNode node, SyntaxToken startToken, 387SyntaxNode node, SyntaxToken startToken, 388SyntaxToken endToken, bool compressEmptyLines, string bannerText, bool autoCollapse, 411SyntaxNode node, SyntaxToken syntaxToken, bool compressEmptyLines, 425SyntaxNode node, SyntaxToken startToken, SyntaxToken endToken, bool compressEmptyLines,
Structure\Providers\AccessorDeclarationStructureProvider.cs (1)
15SyntaxToken previousToken,
Structure\Providers\AnonymousMethodExpressionStructureProvider.cs (3)
15SyntaxToken previousToken, 29var lastToken = CSharpStructureHelpers.GetLastInlineMethodBlockToken(anonymousMethod); 35var startToken = anonymousMethod.ParameterList != null
Structure\Providers\AnonymousObjectCreationExpressionStructureProvider.cs (1)
18SyntaxToken previousToken,
Structure\Providers\ArgumentListStructureProvider.cs (3)
14protected override void CollectBlockSpans(SyntaxToken previousToken, ArgumentListSyntax node, ArrayBuilder<BlockSpan> spans, BlockStructureOptions options, CancellationToken cancellationToken) 29var openToken = node.OpenParenToken; 30var closeToken = node.CloseParenToken;
Structure\Providers\ArrowExpressionClauseStructureProvider.cs (1)
19SyntaxToken previousToken,
Structure\Providers\BlockSyntaxStructureProvider.cs (2)
21SyntaxToken previousToken, 165var previousToken = node.GetFirstToken().GetPreviousToken();
Structure\Providers\CollectionExpressionStructureProvider.cs (2)
16SyntaxToken previousToken, 37var nextToken = node.CloseBracketToken.GetNextToken();
Structure\Providers\CompilationUnitStructureProvider.cs (1)
18SyntaxToken previousToken,
Structure\Providers\ConstructorDeclarationStructureProvider.cs (1)
15SyntaxToken previousToken,
Structure\Providers\ConversionOperatorDeclarationStructureProvider.cs (1)
17SyntaxToken previousToken,
Structure\Providers\DelegateDeclarationStructureProvider.cs (1)
15SyntaxToken previousToken,
Structure\Providers\DestructorDeclarationStructureProvider.cs (1)
15SyntaxToken previousToken,
Structure\Providers\DocumentationCommentStructureProvider.cs (1)
17SyntaxToken previousToken,
Structure\Providers\EnumDeclarationStructureProvider.cs (1)
15SyntaxToken previousToken,
Structure\Providers\EnumMemberDeclarationStructureProvider.cs (1)
15SyntaxToken previousToken,
Structure\Providers\EventDeclarationStructureProvider.cs (1)
15SyntaxToken previousToken,
Structure\Providers\EventFieldDeclarationStructureProvider.cs (1)
15SyntaxToken previousToken,
Structure\Providers\FieldDeclarationStructureProvider.cs (1)
15SyntaxToken previousToken,
Structure\Providers\FileScopedNamespaceDeclarationStructureProvider.cs (1)
18SyntaxToken previousToken,
Structure\Providers\IfDirectiveTriviaStructureProvider.cs (1)
20SyntaxToken previousToken,
Structure\Providers\IndexerDeclarationStructureProvider.cs (1)
15SyntaxToken previousToken,
Structure\Providers\InitializerExpressionStructureProvider.cs (2)
18SyntaxToken previousToken, 39var nextToken = node.CloseBraceToken.GetNextToken();
Structure\Providers\InterpolatedStringExpressionStructureProvider.cs (1)
15SyntaxToken previousToken,
Structure\Providers\MethodDeclarationStructureProvider.cs (1)
15SyntaxToken previousToken,
Structure\Providers\NamespaceDeclarationStructureProvider.cs (1)
16SyntaxToken previousToken,
Structure\Providers\OperatorDeclarationStructureProvider.cs (1)
15SyntaxToken previousToken,
Structure\Providers\ParenthesizedLambdaExpressionStructureProvider.cs (2)
15SyntaxToken previousToken, 34var lastToken = CSharpStructureHelpers.GetLastInlineMethodBlockToken(lambdaExpression);
Structure\Providers\PropertyDeclarationStructureProvider.cs (1)
15SyntaxToken previousToken,
Structure\Providers\RegionDirectiveStructureProvider.cs (2)
18var kw = simpleDirective.DirectiveNameToken; 33SyntaxToken previousToken,
Structure\Providers\SimpleLambdaExpressionStructureProvider.cs (2)
15SyntaxToken previousToken, 34var lastToken = CSharpStructureHelpers.GetLastInlineMethodBlockToken(lambdaExpression);
Structure\Providers\StringLiteralExpressionStructureProvider.cs (1)
15SyntaxToken previousToken,
Structure\Providers\SwitchStatementStructureProvider.cs (1)
16SyntaxToken previousToken,
Structure\Providers\TypeDeclarationStructureProvider.cs (2)
17SyntaxToken previousToken, 28var lastToken = typeDeclaration.TypeParameterList == null
UseAutoProperty\SingleLinePropertyFormattingRule.cs (6)
14private static bool ForceSingleSpace(SyntaxToken previousToken, SyntaxToken currentToken) 31public override AdjustNewLinesOperation? GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation) 39public override AdjustSpacesOperation? GetAdjustSpacesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustSpacesOperation nextOperation)
UseNamedArguments\CSharpUseNamedArgumentsCodeRefactoringProvider.cs (2)
70BaseArgumentListSyntax argumentList, IEnumerable<ArgumentSyntax> namedArguments, IEnumerable<SyntaxToken> separators) 90AttributeArgumentListSyntax argumentList, IEnumerable<AttributeArgumentSyntax> namedArguments, IEnumerable<SyntaxToken> separators)
UsePatternMatching\CSharpIsAndCastCheckWithoutNameDiagnosticAnalyzer.cs (1)
195var newLocalName = SyntaxFactory.Identifier(localName)
Wrapping\SeparatedSyntaxList\CSharpArgumentWrapper.cs (5)
38protected override SyntaxToken FirstToken(BaseArgumentListSyntax listSyntax) 41protected override SyntaxToken LastToken(BaseArgumentListSyntax listSyntax) 67var startToken = listSyntax.GetFirstToken(); 90var endToken = listSyntax.GetLastToken(); 97var token = root.FindToken(position);
Wrapping\SeparatedSyntaxList\CSharpCollectionExpressionWrapper.cs (2)
36protected override SyntaxToken FirstToken(CollectionExpressionSyntax listSyntax) 39protected override SyntaxToken LastToken(CollectionExpressionSyntax listSyntax)
Wrapping\SeparatedSyntaxList\CSharpInitializerExpressionWrapper.cs (2)
36protected override SyntaxToken FirstToken(InitializerExpressionSyntax listSyntax) 39protected override SyntaxToken LastToken(InitializerExpressionSyntax listSyntax)
Wrapping\SeparatedSyntaxList\CSharpParameterWrapper.cs (4)
38protected override SyntaxToken FirstToken(BaseParameterListSyntax listSyntax) 41protected override SyntaxToken LastToken(BaseParameterListSyntax listSyntax) 63var firstToken = attributes?.Count > 0 67var lastToken = listSyntax.GetLastToken();
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (3)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (1)
55var token = tree.GetRoot().FindToken(expected.Start);
EditAndContinue\SyntaxComparerTests.cs (2)
140Array.Empty<SyntaxToken>()); 145Array.Empty<SyntaxToken>(),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (5)
Semantics\LookupPositionTests.cs (1)
3129SyntaxToken token = model.SyntaxTree.GetCompilationUnitRoot().FindToken(position, findInsideTrivia: true);
Semantics\QueryTests.cs (1)
2299var selectExpression = tree.GetCompilationUnitRoot().FindToken(sourceCode.IndexOf('5'));
Semantics\SyntaxTreeRootTests.cs (1)
115Assert.Throws<InvalidOperationException>(() => { tree.GetDiagnostics(default(SyntaxToken)); });
Semantics\TargetTypedDefaultTests.cs (1)
2483var digit = tree.GetCompilationUnitRoot().FindToken(source.IndexOf('2'));
Semantics\UnsafeTests.cs (1)
8345foreach (var nullSyntax in tree.GetCompilationUnitRoot().DescendantTokens().Where(token => token.IsKind(SyntaxKind.NullKeyword)))
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (5)
Compilation\GetSemanticInfoTests.cs (1)
4910var equalsToken = tree.GetRoot().FindToken(position);
DeclarationTests.cs (1)
918var token = _countedSyntaxTree.GetCompilationUnitRoot(cancellationToken).FindToken(nodeInUnderlying.SpanStart);
DocumentationComments\DocumentationCommentCompilerTests.cs (3)
3217public override SyntaxToken VisitToken(SyntaxToken token) 3219var newToken = base.VisitToken(token);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (490)
Diagnostics\DiagnosticTest.cs (2)
1982var defineName = nodes.OfType<Syntax.DefineDirectiveTriviaSyntax>().Single().Name; 1983var errorCodeName = nodes.OfType<Syntax.PragmaWarningDirectiveTriviaSyntax>().First()
Diagnostics\LocationsTests.cs (2)
455var token = syntaxTree.GetCompilationUnitRoot().FindToken(sampleProgram.IndexOf("ct", StringComparison.Ordinal)); 583var node = SyntaxFactory.MissingToken(SyntaxKind.IdentifierToken);
Generated\Syntax.Test.xml.Generated.cs (54)
10278=> SyntaxFactory.TupleElement(GenerateIdentifierName(), default(SyntaxToken)); 10284=> SyntaxFactory.RefType(SyntaxFactory.Token(SyntaxKind.RefKeyword), default(SyntaxToken), GenerateIdentifierName()); 10377=> SyntaxFactory.Argument(default(NameColonSyntax), default(SyntaxToken), GenerateIdentifierName()); 10467=> SyntaxFactory.Ordering(SyntaxKind.AscendingOrdering, GenerateIdentifierName(), default(SyntaxToken)); 10557=> SyntaxFactory.LocalFunctionStatement(new SyntaxList<AttributeListSyntax>(), new SyntaxTokenList(), GenerateIdentifierName(), SyntaxFactory.Identifier("Identifier"), default(TypeParameterListSyntax), GenerateParameterList(), new SyntaxList<TypeParameterConstraintClauseSyntax>(), default(BlockSyntax), default(ArrowExpressionClauseSyntax), default(SyntaxToken)); 10560=> SyntaxFactory.LocalDeclarationStatement(new SyntaxList<AttributeListSyntax>(), default(SyntaxToken), default(SyntaxToken), new SyntaxTokenList(), GenerateVariableDeclaration(), SyntaxFactory.Token(SyntaxKind.SemicolonToken)); 10590=> SyntaxFactory.GotoStatement(SyntaxKind.GotoStatement, new SyntaxList<AttributeListSyntax>(), SyntaxFactory.Token(SyntaxKind.GotoKeyword), default(SyntaxToken), default(ExpressionSyntax), SyntaxFactory.Token(SyntaxKind.SemicolonToken)); 10617=> SyntaxFactory.ForEachStatement(new SyntaxList<AttributeListSyntax>(), default(SyntaxToken), SyntaxFactory.Token(SyntaxKind.ForEachKeyword), SyntaxFactory.Token(SyntaxKind.OpenParenToken), GenerateIdentifierName(), SyntaxFactory.Identifier("Identifier"), SyntaxFactory.Token(SyntaxKind.InKeyword), GenerateIdentifierName(), SyntaxFactory.Token(SyntaxKind.CloseParenToken), GenerateBlock()); 10620=> SyntaxFactory.ForEachVariableStatement(new SyntaxList<AttributeListSyntax>(), default(SyntaxToken), SyntaxFactory.Token(SyntaxKind.ForEachKeyword), SyntaxFactory.Token(SyntaxKind.OpenParenToken), GenerateIdentifierName(), SyntaxFactory.Token(SyntaxKind.InKeyword), GenerateIdentifierName(), SyntaxFactory.Token(SyntaxKind.CloseParenToken), GenerateBlock()); 10623=> SyntaxFactory.UsingStatement(new SyntaxList<AttributeListSyntax>(), default(SyntaxToken), SyntaxFactory.Token(SyntaxKind.UsingKeyword), SyntaxFactory.Token(SyntaxKind.OpenParenToken), default(VariableDeclarationSyntax), default(ExpressionSyntax), SyntaxFactory.Token(SyntaxKind.CloseParenToken), GenerateBlock()); 10644=> SyntaxFactory.SwitchStatement(new SyntaxList<AttributeListSyntax>(), SyntaxFactory.Token(SyntaxKind.SwitchKeyword), default(SyntaxToken), GenerateIdentifierName(), default(SyntaxToken), SyntaxFactory.Token(SyntaxKind.OpenBraceToken), new SyntaxList<SwitchSectionSyntax>(), SyntaxFactory.Token(SyntaxKind.CloseBraceToken)); 10671=> SyntaxFactory.CatchDeclaration(SyntaxFactory.Token(SyntaxKind.OpenParenToken), GenerateIdentifierName(), default(SyntaxToken), SyntaxFactory.Token(SyntaxKind.CloseParenToken)); 10686=> SyntaxFactory.UsingDirective(default(SyntaxToken), SyntaxFactory.Token(SyntaxKind.UsingKeyword), default(SyntaxToken), default(SyntaxToken), default(NameEqualsSyntax), GenerateIdentifierName(), SyntaxFactory.Token(SyntaxKind.SemicolonToken)); 10689=> SyntaxFactory.NamespaceDeclaration(new SyntaxList<AttributeListSyntax>(), new SyntaxTokenList(), SyntaxFactory.Token(SyntaxKind.NamespaceKeyword), GenerateIdentifierName(), SyntaxFactory.Token(SyntaxKind.OpenBraceToken), new SyntaxList<ExternAliasDirectiveSyntax>(), new SyntaxList<UsingDirectiveSyntax>(), new SyntaxList<MemberDeclarationSyntax>(), SyntaxFactory.Token(SyntaxKind.CloseBraceToken), default(SyntaxToken)); 10716=> SyntaxFactory.TypeParameter(new SyntaxList<AttributeListSyntax>(), default(SyntaxToken), SyntaxFactory.Identifier("Identifier")); 10719=> SyntaxFactory.ClassDeclaration(new SyntaxList<AttributeListSyntax>(), new SyntaxTokenList(), SyntaxFactory.Token(SyntaxKind.ClassKeyword), SyntaxFactory.Identifier("Identifier"), default(TypeParameterListSyntax), default(ParameterListSyntax), default(BaseListSyntax), new SyntaxList<TypeParameterConstraintClauseSyntax>(), default(SyntaxToken), new SyntaxList<MemberDeclarationSyntax>(), default(SyntaxToken), default(SyntaxToken)); 10722=> SyntaxFactory.StructDeclaration(new SyntaxList<AttributeListSyntax>(), new SyntaxTokenList(), SyntaxFactory.Token(SyntaxKind.StructKeyword), SyntaxFactory.Identifier("Identifier"), default(TypeParameterListSyntax), default(ParameterListSyntax), default(BaseListSyntax), new SyntaxList<TypeParameterConstraintClauseSyntax>(), default(SyntaxToken), new SyntaxList<MemberDeclarationSyntax>(), default(SyntaxToken), default(SyntaxToken)); 10725=> SyntaxFactory.InterfaceDeclaration(new SyntaxList<AttributeListSyntax>(), new SyntaxTokenList(), SyntaxFactory.Token(SyntaxKind.InterfaceKeyword), SyntaxFactory.Identifier("Identifier"), default(TypeParameterListSyntax), default(ParameterListSyntax), default(BaseListSyntax), new SyntaxList<TypeParameterConstraintClauseSyntax>(), default(SyntaxToken), new SyntaxList<MemberDeclarationSyntax>(), default(SyntaxToken), default(SyntaxToken)); 10728=> SyntaxFactory.RecordDeclaration(SyntaxKind.RecordDeclaration, new SyntaxList<AttributeListSyntax>(), new SyntaxTokenList(), SyntaxFactory.Identifier("Keyword"), default(SyntaxToken), SyntaxFactory.Identifier("Identifier"), default(TypeParameterListSyntax), default(ParameterListSyntax), default(BaseListSyntax), new SyntaxList<TypeParameterConstraintClauseSyntax>(), default(SyntaxToken), new SyntaxList<MemberDeclarationSyntax>(), default(SyntaxToken), default(SyntaxToken)); 10731=> SyntaxFactory.EnumDeclaration(new SyntaxList<AttributeListSyntax>(), new SyntaxTokenList(), SyntaxFactory.Token(SyntaxKind.EnumKeyword), SyntaxFactory.Identifier("Identifier"), default(BaseListSyntax), default(SyntaxToken), new SeparatedSyntaxList<EnumMemberDeclarationSyntax>(), default(SyntaxToken), default(SyntaxToken)); 10755=> SyntaxFactory.ClassOrStructConstraint(SyntaxKind.ClassConstraint, SyntaxFactory.Token(SyntaxKind.ClassKeyword), default(SyntaxToken)); 10779=> SyntaxFactory.MethodDeclaration(new SyntaxList<AttributeListSyntax>(), new SyntaxTokenList(), GenerateIdentifierName(), default(ExplicitInterfaceSpecifierSyntax), SyntaxFactory.Identifier("Identifier"), default(TypeParameterListSyntax), GenerateParameterList(), new SyntaxList<TypeParameterConstraintClauseSyntax>(), default(BlockSyntax), default(ArrowExpressionClauseSyntax), default(SyntaxToken)); 10782=> SyntaxFactory.OperatorDeclaration(new SyntaxList<AttributeListSyntax>(), new SyntaxTokenList(), GenerateIdentifierName(), default(ExplicitInterfaceSpecifierSyntax), SyntaxFactory.Token(SyntaxKind.OperatorKeyword), default(SyntaxToken), SyntaxFactory.Token(SyntaxKind.PlusToken), GenerateParameterList(), default(BlockSyntax), default(ArrowExpressionClauseSyntax), default(SyntaxToken)); 10785=> SyntaxFactory.ConversionOperatorDeclaration(new SyntaxList<AttributeListSyntax>(), new SyntaxTokenList(), SyntaxFactory.Token(SyntaxKind.ImplicitKeyword), default(ExplicitInterfaceSpecifierSyntax), SyntaxFactory.Token(SyntaxKind.OperatorKeyword), default(SyntaxToken), GenerateIdentifierName(), GenerateParameterList(), default(BlockSyntax), default(ArrowExpressionClauseSyntax), default(SyntaxToken)); 10788=> SyntaxFactory.ConstructorDeclaration(new SyntaxList<AttributeListSyntax>(), new SyntaxTokenList(), SyntaxFactory.Identifier("Identifier"), GenerateParameterList(), default(ConstructorInitializerSyntax), default(BlockSyntax), default(ArrowExpressionClauseSyntax), default(SyntaxToken)); 10794=> SyntaxFactory.DestructorDeclaration(new SyntaxList<AttributeListSyntax>(), new SyntaxTokenList(), SyntaxFactory.Token(SyntaxKind.TildeToken), SyntaxFactory.Identifier("Identifier"), GenerateParameterList(), default(BlockSyntax), default(ArrowExpressionClauseSyntax), default(SyntaxToken)); 10797=> SyntaxFactory.PropertyDeclaration(new SyntaxList<AttributeListSyntax>(), new SyntaxTokenList(), GenerateIdentifierName(), default(ExplicitInterfaceSpecifierSyntax), SyntaxFactory.Identifier("Identifier"), default(AccessorListSyntax), default(ArrowExpressionClauseSyntax), default(EqualsValueClauseSyntax), default(SyntaxToken)); 10803=> SyntaxFactory.EventDeclaration(new SyntaxList<AttributeListSyntax>(), new SyntaxTokenList(), SyntaxFactory.Token(SyntaxKind.EventKeyword), GenerateIdentifierName(), default(ExplicitInterfaceSpecifierSyntax), SyntaxFactory.Identifier("Identifier"), default(AccessorListSyntax), default(SyntaxToken)); 10806=> SyntaxFactory.IndexerDeclaration(new SyntaxList<AttributeListSyntax>(), new SyntaxTokenList(), GenerateIdentifierName(), default(ExplicitInterfaceSpecifierSyntax), SyntaxFactory.Token(SyntaxKind.ThisKeyword), GenerateBracketedParameterList(), default(AccessorListSyntax), default(ArrowExpressionClauseSyntax), default(SyntaxToken)); 10812=> SyntaxFactory.AccessorDeclaration(SyntaxKind.GetAccessorDeclaration, new SyntaxList<AttributeListSyntax>(), new SyntaxTokenList(), SyntaxFactory.Token(SyntaxKind.GetKeyword), default(BlockSyntax), default(ArrowExpressionClauseSyntax), default(SyntaxToken)); 10848=> SyntaxFactory.OperatorMemberCref(SyntaxFactory.Token(SyntaxKind.OperatorKeyword), default(SyntaxToken), SyntaxFactory.Token(SyntaxKind.PlusToken), default(CrefParameterListSyntax)); 10851=> SyntaxFactory.ConversionOperatorMemberCref(SyntaxFactory.Token(SyntaxKind.ImplicitKeyword), SyntaxFactory.Token(SyntaxKind.OperatorKeyword), default(SyntaxToken), GenerateIdentifierName(), default(CrefParameterListSyntax)); 10860=> SyntaxFactory.CrefParameter(default(SyntaxToken), default(SyntaxToken), GenerateIdentifierName()); 10935=> SyntaxFactory.LineDirectiveTrivia(SyntaxFactory.Token(SyntaxKind.HashToken), SyntaxFactory.Token(SyntaxKind.LineKeyword), SyntaxFactory.Literal("1", 1), default(SyntaxToken), SyntaxFactory.Token(SyntaxKind.EndOfDirectiveToken), new bool()); 10941=> SyntaxFactory.LineSpanDirectiveTrivia(SyntaxFactory.Token(SyntaxKind.HashToken), SyntaxFactory.Token(SyntaxKind.LineKeyword), GenerateLineDirectivePosition(), SyntaxFactory.Token(SyntaxKind.MinusToken), GenerateLineDirectivePosition(), default(SyntaxToken), SyntaxFactory.Literal("string", "string"), SyntaxFactory.Token(SyntaxKind.EndOfDirectiveToken), new bool()); 10959=> SyntaxFactory.NullableDirectiveTrivia(SyntaxFactory.Token(SyntaxKind.HashToken), SyntaxFactory.Token(SyntaxKind.NullableKeyword), SyntaxFactory.Token(SyntaxKind.EnableKeyword), default(SyntaxToken), SyntaxFactory.Token(SyntaxKind.EndOfDirectiveToken), new bool());
IncrementalParsing\IncrementalParsingTests.cs (4)
182var interfaceKeyword = SyntaxFactory.ParseToken("interface"); // prime the memoizer 200var interfaceKeyword = SyntaxFactory.ParseToken("struct"); // prime the memoizer 3055var tempToken = tempRoot.DescendantTokens().First(t => t.Kind() == SyntaxKind.IdentifierToken); 3116var interfaceKeyword = SyntaxFactory.ParseToken("interface"); // prime the memoizer
LexicalAndXml\LexicalTests.cs (200)
41private IEnumerable<SyntaxToken> Lex(string text, CSharpParseOptions options = null) 46private SyntaxToken LexToken(string text, CSharpParseOptions options = null) 48SyntaxToken result = default(SyntaxToken); 49foreach (var token in Lex(text, options)) 71private SyntaxToken DebuggerLex(string text) 79private SyntaxToken DebuggerLexToken(string text) 105var token = LexToken(text); 124var token = LexToken(text); 143var token = LexToken(text); 163var token = LexToken(text); 184var token = LexToken(text); 206var token = LexToken(text); 228var token = LexToken(text); 246var token = LexToken(text); 266var token = LexToken(text); 290var token = LexToken(text); 314var token = LexToken(text); 334var token = LexToken(text); 356var token = LexToken(text); 378var token = LexToken(text); 400var token = LexToken(text); 421var token = LexToken(text); 448var token = LexToken(text); 471var token = tokens[0]; 509var token = tokens[0]; 537var token = LexToken(text); 563var token = tokens[0]; 593var token = LexToken(text); 612var token = LexToken(text); 627var token = LexToken(text); 642var token = LexToken(text); 657var token = LexToken(text); 672var token = LexToken(text); 687var token = LexToken(text); 702var token = LexToken(text); 717var token = LexToken(text); 734var token = LexToken(text); 751var token = LexToken(text); 768var token = LexToken(text); 785var token = LexToken(text); 802var token = LexToken(text); 819var token = LexToken(text); 841var token = LexToken(text); 858var token = LexToken(text); 882var token = LexToken(text); 962var token = LexToken(text); 976var token = LexToken(text); 991var token = LexToken(text); 1006var token = LexToken(text); 1021var token = LexToken(text); 1036var token = Lex(text).First(); 1052var token = LexToken(text); 1068var token = LexToken(text); 1085var token = LexToken(text); 1101var token = LexToken(text); 1117var token = LexToken(text); 1133var token = LexToken(text); 1152var token = LexToken(text, TestOptions.Regular12); 1171var token = LexToken(text, TestOptions.Regular13); 1189var token = LexToken(text); 1205var token = LexToken(text); 1221var token = LexToken(text); 1237var token = LexToken(text); 1253var token = LexToken(text); 1269var token = LexToken(text); 1285var token = LexToken(text); 1301var token = LexToken(text); 1317var token = LexToken(text); 1333var token = LexToken(text, TestOptions.Regular12); 1350var token = LexToken(text, TestOptions.Regular13); 1366var token = LexToken(text); 1382var token = LexToken(text); 1398var token = LexToken(text); 1414var token = LexToken(text); 1430var token = LexToken(text); 1446var token = LexToken(text); 1462var token = LexToken(text); 1478var token = LexToken(text); 1494var token = LexToken(text); 1511var token = LexToken(text); 1528var token = Lex(text).First(); 1544var token = Lex(text).First(); 1562var token = Lex(text).First(); 1582var token = LexToken(text); 1597var token = LexToken(text); 1612var token = LexToken(text); 1627var token = LexToken(text); 1642var token = LexToken(text); 1657var token = LexToken(text); 1673var token = LexToken(text); 1689var token = LexToken(text); 1705var token = LexToken(text); 1721var token = LexToken(text); 1738var token = LexToken(text); 1754var token = LexToken(text); 1770var token = LexToken(text); 1786var token = LexToken(text); 1802var token = LexToken(text); 1817var token = LexToken(text); 1831var token = LexToken(text); 1846var token = LexToken(text); 1861var token = LexToken(text); 1876var token = LexToken(text); 1891var token = LexToken(text); 1906var token = LexToken(text); 1929var token = LexToken(text); 1944var token = LexToken(text); 1959var token = LexToken(text); 1974var token = LexToken(text); 1989var token = LexToken(text); 2005var token = LexToken(text); 2021var token = LexToken(text); 2037var token = LexToken(text); 2053var token = LexToken(text); 2069var token = LexToken(text); 2085var token = LexToken(text); 2101var token = LexToken(text); 2117var token = LexToken(text); 2133var token = LexToken(text); 2149var token = LexToken(text); 2165var token = LexToken(text); 2181var token = LexToken(text); 2197var token = LexToken(text); 2213var token = LexToken(text); 2229var token = LexToken(text); 2245var token = LexToken(text); 2261var token = LexToken(text); 2287var token = LexToken(text); 2313var token = LexToken(text); 2339var token = LexToken(text); 2365var token = LexToken(text); 2391var token = LexToken(text); 2416var token = LexToken(text); 2442var token = LexToken(text); 2467var token = LexToken(text, _options6); 2482var token = LexToken(text, _binaryOptions); 2508var token = LexToken(text, _binaryOptions); 2533var token = LexToken(text, _binaryOptions); 2559var token = LexToken(text, _binaryOptions); 2584var token = LexToken(text); 2599var token = LexToken(text); 2615var token = LexToken(text); 2631var token = LexToken(text); 2647var token = LexToken(text); 2662var token = LexToken(text); 2677var token = LexToken(text); 2692var token = LexToken(text); 2707var token = LexToken(text); 2722var token = LexToken(text); 2738var token = LexToken(text); 2754var token = LexToken(text); 2770var token = LexToken(text); 2786var token = LexToken(text); 2802var token = LexToken(text); 2818var token = LexToken(text); 2834var token = LexToken(text); 2850var token = LexToken(text); 2866var token = LexToken(text); 2882var token = LexToken(text, _binaryOptions); 2898var token = LexToken(text, _binaryOptions); 2914var token = LexToken(text, _binaryOptions); 2930var token = LexToken(text, _binaryOptions); 2946var token = LexToken(text, _binaryOptions); 2962var token = LexToken(text, _binaryOptions); 2978var token = LexToken(text, _binaryOptions); 2994var token = LexToken(text, _binaryOptions); 3010var token = LexToken(text, _binaryOptions); 3025var token = LexToken(text, _binaryOptions); 3041var token = LexToken(text, _binaryOptions); 3057var token = LexToken(text, _underscoreOptions); 3125var token = LexToken(text, _options6); 3139var token = LexToken(text, _options72); 3180var token = LexToken(text, _options7); 3222var token = LexToken(text, _underscoreOptions); 3383var token = Lex(text).First(); 3399var token = LexToken(text); 3415var token = LexToken(text); 3431var token = LexToken(text); 3452var token = DebuggerLexToken(text); 3485var token = Lex("@0x0").First(); 3554var token = DebuggerLexToken(text); 3611var token = LexToken(text); 3775var token = LexToken(text); 3783var token = LexToken(text); 3789private static void VerifyNoErrors(SyntaxToken token) 3795private static void VerifyError(SyntaxToken token, ErrorCode expected) 3833var token = Lex("<<<<<<<").First(); 3862var token = Lex("{\r\n<<<<<<<").Skip(1).First(); 3893var token = Lex(">>>>>>>").First(); 3916var token = Lex("{\r\n>>>>>>>").Skip(1).First(); 3937var token = Lex(" =======").First(); 4076var token = Lex("{\r\n =======").Skip(1).First(); 4162var token = Lex(""" 4202var token = Lex(""" 4242var token = Lex(" |||||||").First(); 4373var token = Lex(""" 4410var token = Lex(""" 4464var token = Lex(""" 4522var token = Lex("""
LexicalAndXml\PreprocessorTests.cs (5)
257var setting = nn.SettingToken; 258var target = nn.TargetToken; 340var token = (actualWarningNumber as LiteralExpressionSyntax).Token; 345var token = (actualWarningNumber as IdentifierNameSyntax).Identifier; 4567SyntaxToken token = nodes.OfType<NullableDirectiveTriviaSyntax>().Single().SettingToken;
LexicalAndXml\RawStringLiteralLexingTests.cs (1)
187var token = SyntaxFactory.ParseToken(input);
LexicalAndXml\XmlDocCommentTests.cs (21)
2082var bracket = (tree.GetCompilationUnitRoot().Members[0] as TypeDeclarationSyntax).CloseBraceToken; 2115var bracket = classDecl.CloseBraceToken; 2147var bracket = tree.GetCompilationUnitRoot().EndOfFileToken; 2177var bracket = tree.GetCompilationUnitRoot().EndOfFileToken; 2208var bracket = tree.GetCompilationUnitRoot().EndOfFileToken; 2257var classKeyword = (tree.GetCompilationUnitRoot().Members[0] as TypeDeclarationSyntax).Keyword; 2286var eofToken = tree.GetCompilationUnitRoot().EndOfFileToken; 2327var eofToken = tree.GetCompilationUnitRoot().EndOfFileToken; 2362var eofToken = tree.GetCompilationUnitRoot().EndOfFileToken; 2384var classKeyword = (tree.GetCompilationUnitRoot().Members[0] as TypeDeclarationSyntax).Keyword; 2414var classKeyword = (tree.GetCompilationUnitRoot().Members[0] as TypeDeclarationSyntax).Keyword; 2441var classKeyword = (tree.GetCompilationUnitRoot().Members[0] as TypeDeclarationSyntax).Keyword; 2467var classKeyword = (tree.GetCompilationUnitRoot().Members[0] as TypeDeclarationSyntax).Keyword; 2494var classKeyword = (tree.GetCompilationUnitRoot().Members[0] as TypeDeclarationSyntax).Keyword; 2519var classKeyword = (tree.GetCompilationUnitRoot().Members[0] as TypeDeclarationSyntax).Keyword; 2541var classKeyword = (tree.GetCompilationUnitRoot().Members[0] as TypeDeclarationSyntax).Keyword; 2567var classKeyword = (tree.GetCompilationUnitRoot().Members[0] as TypeDeclarationSyntax).Keyword; 2637var classKeyword = (tree.GetCompilationUnitRoot().Members[0] as TypeDeclarationSyntax).Keyword; 2655var classKeyword = (tree.GetCompilationUnitRoot().Members[0] as TypeDeclarationSyntax).Keyword; 2745var classKeyword = (tree.GetCompilationUnitRoot().Members[0] as TypeDeclarationSyntax).Keyword; 2769var classKeyword = (tree.GetCompilationUnitRoot().Members[0] as TypeDeclarationSyntax).Keyword;
ParentChecker.cs (3)
24var token = nodeOrToken.AsToken(); 28var parentToken = trivia.Token; 41var parentToken = trivia.Token;
Parsing\DeclarationParsingTests.cs (2)
67Assert.True(ud.StaticKeyword == default(SyntaxToken)); 155Assert.True(ud.StaticKeyword == default(SyntaxToken));
Parsing\ExpressionParsingTests.cs (4)
482SyntaxToken token; 795private void TestFunctionKeyword(SyntaxKind kind, SyntaxToken keyword) 801private void TestParenthesizedArgument(SyntaxToken openParen, CSharpSyntaxNode arg, SyntaxToken closeParen)
Parsing\NameParsingTests.cs (3)
479var tok = ((PredefinedTypeSyntax)tname).Keyword; 779var tok = SyntaxFactory.ParseToken(text); 795var tok = SyntaxFactory.ParseToken(text);
Parsing\ParsingErrorRecoveryTests.cs (1)
7919var eofToken = ((CompilationUnitSyntax)tree.GetRoot()).EndOfFileToken;
Parsing\ScriptParsingTests.cs (3)
9637var eof = root.EndOfFileToken; 9711var eof = root.EndOfFileToken; 9737var endOfDirective = shebang.EndOfDirectiveToken;
Parsing\StatementParsingTests.cs (1)
6003public override void VisitToken(SyntaxToken token)
Parsing\SyntaxExtensions.cs (5)
44public static SyntaxTriviaList GetLeadingTrivia(this SyntaxToken token) 49public static SyntaxTriviaList GetTrailingTrivia(this SyntaxToken token) 54internal static ImmutableArray<DiagnosticInfo> Errors(this SyntaxToken token) 59internal static ImmutableArray<DiagnosticInfo> Warnings(this SyntaxToken token) 64internal static ImmutableArray<DiagnosticInfo> ErrorsAndWarnings(this SyntaxToken token)
Syntax\RedNodeTests.cs (2)
17public override SyntaxToken VisitToken(SyntaxToken token)
Syntax\SeparatedSyntaxListTests.cs (1)
312var newComma = SyntaxFactory.Token(
Syntax\StructuredTriviaTests.cs (2)
67var ident = SyntaxFactory.Identifier(SyntaxTriviaList.Create(sTrivia), "banana", spaceTrivia); 77var result = identExpr.FindToken(3, true);
Syntax\SyntaxAnnotationTests.cs (31)
34var oldToken = default(SyntaxToken); 35var newToken = oldToken.WithAdditionalAnnotations(annotation); 71var fromToken = default(SyntaxToken); 72var toToken = SyntaxFactory.ParseSyntaxTree(_helloWorldCode).GetCompilationUnitRoot().DescendantTokens().First(); 73var annotatedToken = fromToken.CopyAnnotationsTo(toToken); 80var fromToken = SyntaxFactory.ParseSyntaxTree(_helloWorldCode).GetCompilationUnitRoot().DescendantTokens().First(); 81var toToken = default(SyntaxToken); 82var annotatedToken = fromToken.CopyAnnotationsTo(toToken); 83Assert.True(annotatedToken.IsEquivalentTo(default(SyntaxToken))); 89var fromToken = SyntaxFactory.ParseSyntaxTree(_helloWorldCode).GetCompilationUnitRoot().DescendantTokens().First(); 90var toToken = SyntaxFactory.ParseSyntaxTree(_helloWorldCode).GetCompilationUnitRoot().DescendantTokens().First(); 91var annotatedToken = fromToken.CopyAnnotationsTo(toToken); 193var token = GetAllNodesAndTokens(tree.GetCompilationUnitRoot()).First(t => t.IsToken).AsToken(); 196var annotatedToken = token.WithAdditionalAnnotations(annotation1); 203var token2 = newRoot.GetAnnotatedNodesAndTokens(annotation1).Single().AsToken(); 206var twiceAnnotatedToken = token2.WithAdditionalAnnotations(annotation2); 446var oldToken = destTreeNodeOrTokenEnumerator.Current.AsToken(); 447var newToken = sourceTreeNodeOrTokenEnumerator.Current.AsToken().CopyAnnotationsTo(oldToken); 589var newToken = nodeOrToken.AsToken().WithAdditionalAnnotations(annotation); 628private void TestAnnotation(SyntaxAnnotation annotation, SyntaxNode root, SyntaxToken oldToken) 634var annotatedToken = results.Single().AsToken(); 691public override void VisitToken(SyntaxToken token) 732public override SyntaxToken VisitToken(SyntaxToken token) 781public override SyntaxToken VisitToken(SyntaxToken token) 832public override SyntaxToken VisitToken(SyntaxToken token)
Syntax\SyntaxFactoryTests.cs (10)
25var token = SyntaxFactory.Token(SyntaxKind.InterpolatedVerbatimStringStartToken); 110Func<string, SyntaxToken> makeStringLiteral = value => 196var actualRed = SyntaxFactory.Token(SyntaxTriviaList.Create(SyntaxFactory.ElasticMarker), kind, defaultText, defaultText, SyntaxTriviaList.Create(SyntaxFactory.ElasticMarker)); 216var token = SyntaxFactory.Token(SyntaxTriviaList.Create(SyntaxFactory.ElasticMarker), kind, text, valueText, SyntaxTriviaList.Create(SyntaxFactory.ElasticMarker)); 376var literal = SyntaxFactory.Literal(3.14); 386var literal = SyntaxFactory.Literal("\u2028"); 394var literal = SyntaxFactory.Literal('\uDBFF'); 423var literal = tokens.First(); 437var literal = tokens.First(); 476var token = new SyntaxToken(null);
Syntax\SyntaxNodeTests.cs (92)
664var node = t1.GetCompilationUnitRoot().DescendantTokens(new TextSpan(6, 3)).First(); 674var token = tree.GetCompilationUnitRoot().FindToken("class\n #i".Length); 684var identifier = SyntaxFactory.Identifier("x"); 685var missingIdentifier = SyntaxFactory.MissingToken(SyntaxKind.IdentifierToken); 688var comma = SyntaxFactory.Token(SyntaxKind.CommaToken); 689var missingComma = SyntaxFactory.MissingToken(SyntaxKind.CommaToken); 716var token = node.FindToken(i); 945var first = tree.GetCompilationUnitRoot().GetFirstToken(); 953var first = tree.GetCompilationUnitRoot().GetFirstToken(includeZeroWidth: true); 961var last = tree.GetCompilationUnitRoot().GetLastToken(); 969var last = tree.GetCompilationUnitRoot().GetLastToken(includeZeroWidth: true); 1007var list = new List<SyntaxToken>(); 1008var token = tree.GetCompilationUnitRoot().GetFirstToken(includeSkipped: true); 1033var tokens = tree.GetCompilationUnitRoot().DescendantTokens(descendIntoTrivia: true).Where(SyntaxToken.NonZeroWidth).ToList(); 1037var list = new List<SyntaxToken>(tokens.Count); 1038var token = tree.GetCompilationUnitRoot().GetFirstToken(includeSkipped: true); 1062var list = new List<SyntaxToken>(tokens.Count); 1063var token = tree.GetCompilationUnitRoot().GetFirstToken(includeSkipped: false); 1082List<SyntaxToken> tokens = syntaxTree.GetRoot().DescendantTokens().ToList(); 1084List<SyntaxToken> list = new List<SyntaxToken>(); 1085SyntaxToken token = syntaxTree.GetRoot().GetFirstToken(); 1106var list = new List<SyntaxToken>(); 1107var token = tree.GetCompilationUnitRoot().GetLastToken(); // skip EOF 1133var tokens = tree.GetCompilationUnitRoot().DescendantTokens(descendIntoTrivia: true).Where(SyntaxToken.NonZeroWidth).ToList(); 1137var list = new List<SyntaxToken>(tokens.Count); 1138var token = tree.GetCompilationUnitRoot().GetLastToken(includeSkipped: true); 1166var list = new List<SyntaxToken>(tokens.Count); 1167var token = tree.GetCompilationUnitRoot().GetLastToken(includeSkipped: false); 1187List<SyntaxToken> tokens = syntaxTree.GetRoot().DescendantTokens().ToList(); 1189List<SyntaxToken> list = new List<SyntaxToken>(); 1190var token = syntaxTree.GetRoot().GetLastToken(includeZeroWidth: false); // skip EOF 1213var list = new List<SyntaxToken>(); 1214var token = tree.GetCompilationUnitRoot().GetFirstToken(includeZeroWidth: true); 1232List<SyntaxToken> tokens = syntaxTree.GetRoot().DescendantTokens().ToList(); 1234List<SyntaxToken> list = new List<SyntaxToken>(); 1235SyntaxToken token = syntaxTree.GetRoot().GetFirstToken(includeZeroWidth: true); 1255var list = new List<SyntaxToken>(); 1256var token = tree.GetCompilationUnitRoot().EndOfFileToken.GetPreviousToken(includeZeroWidth: true); 1277List<SyntaxToken> tokens = syntaxTree.GetRoot().DescendantTokens().ToList(); 1279List<SyntaxToken> list = new List<SyntaxToken>(); 1280SyntaxToken token = syntaxTree.GetCompilationUnitRoot().EndOfFileToken.GetPreviousToken(includeZeroWidth: true); 1341var name = member.Identifier; 1345var closeBraceToken = member.CloseBraceToken; 1346var closeBraceChild = member.GetLastToken(); 1389var token = SyntaxFactory.Identifier(default(SyntaxTriviaList), "x", SyntaxTriviaList.Create(trivia)); 1848var cc = SyntaxFactory.Token(SyntaxKind.ColonColonToken); 1849var lt = SyntaxFactory.Token(SyntaxKind.LessThanToken); 1850var gt = SyntaxFactory.Token(SyntaxKind.GreaterThanToken); 1851var dot = SyntaxFactory.Token(SyntaxKind.DotToken); 1899var someToken = SyntaxFactory.MissingToken(SyntaxKind.IntKeyword); 1910var missingComma = SyntaxFactory.MissingToken(SyntaxKind.CommaToken); 1942var someToken = SyntaxFactory.Identifier( 1984var someToken = SyntaxFactory.Identifier(default(SyntaxTriviaList), "", SyntaxFactory.TriviaList(SyntaxFactory.Trivia(zeroWidth), SyntaxFactory.Trivia(zeroWidth))); 2254var bToken = expr.DescendantTokens().First(t => t.Text == "b"); 2263var d = SyntaxFactory.ParseToken("d "); 2273var privateToken = ((ClassDeclarationSyntax)cu.Members[0]).Modifiers[0]; 2274var publicToken = SyntaxFactory.ParseToken("public "); 2275var partialToken = SyntaxFactory.ParseToken("partial "); 2283var cu3 = cu.ReplaceToken(privateToken, new SyntaxToken[] { }); 2291var identifierC = cu.DescendantTokens().First(t => t.Text == "C"); 2293var identifierA = SyntaxFactory.ParseToken("A"); 2294var identifierB = SyntaxFactory.ParseToken("B"); 2300Assert.Throws<InvalidOperationException>(() => cu.ReplaceToken(identifierC, new SyntaxToken[] { })); 2307var publicToken = ((ClassDeclarationSyntax)cu.Members[0]).Modifiers[0]; 2308var partialToken = SyntaxFactory.ParseToken("partial "); 2309var staticToken = SyntaxFactory.ParseToken("static "); 2322var identifierC = cu.DescendantTokens().First(t => t.Text == "C"); 2324var identifierA = SyntaxFactory.ParseToken("A"); 2325var identifierB = SyntaxFactory.ParseToken("B"); 2340var token = expr.DescendantTokens().First(t => t.IsMissing); 2355var token = tokens.First(t => t.Kind() == SyntaxKind.EndOfDocumentationCommentToken); 2368var token = cu.DescendantTokens().Single(t => t.Kind() == SyntaxKind.EndOfFileToken); 2455var id = SyntaxFactory.ParseToken("a "); 2458var id2 = id.ReplaceTrivia(trivia, twoSpace); 2465var id = SyntaxFactory.ParseToken("a // goo\r\n"); 2468var id2 = id.ReplaceTrivia(id.GetAllTrivia(), (tr, tr2) => SyntaxFactory.Space); 3297Assert.Equal(SyntaxKind.CommaToken, ((SyntaxToken)list.GetSeparator(0)).Kind()); 3298Assert.Equal(SyntaxKind.CommaToken, ((SyntaxToken)list.GetSeparator(1)).Kind()); 3305var unused = list.GetSeparator(2); 3377foreach (var t in syntaxTree.GetCompilationUnitRoot().DescendantTokens()) 3403var token = syntaxTree.GetCompilationUnitRoot().FindToken(code.IndexOf("using Lib;", StringComparison.Ordinal)); 3477var commaToken = SyntaxFactory.Token(SyntaxKind.CommaToken); 3526var token = (SyntaxToken)children.First(n => n.IsToken); 3562var emptyToken = SyntaxFactory.MissingToken(SyntaxKind.IdentifierToken).WithTrailingTrivia(emptyWhitespace, emptyWhitespace); 3713var idToken = SyntaxFactory.Identifier("goo"); 3964var newAsync = SyntaxFactory.Token(SyntaxKind.AsyncKeyword).WithTrailingTrivia(SyntaxFactory.Space); 4002var replacedKeyword = SyntaxFactory.Token(SyntaxKind.StackAllocKeyword).WithTrailingTrivia(SyntaxFactory.Space);
Syntax\SyntaxNormalizerTests.cs (1)
3554var token = SyntaxFactory.ParseToken(text.NormalizeLineEndings());
Syntax\SyntaxRewriterTests.cs (20)
146return default(SyntaxToken); 163(token.Kind() == SyntaxKind.CommaToken) ? default(SyntaxToken) : token); 337var tokenT = tree.GetCompilationUnitRoot().DescendantTokens().Where(t => t.ToString() == "T").Single(); 426var privateToken = root.DescendantTokens().First(); 427var publicToken = SyntaxFactory.ParseToken("public "); 428var partialToken = SyntaxFactory.ParseToken("partial "); 444var publicToken = root.DescendantTokens().First(); 445var partialToken = SyntaxFactory.ParseToken("partial "); 446var staticToken = SyntaxFactory.ParseToken("static "); 556var token1 = expr1.Identifier; 573var token2 = expr2.Identifier; 604var token1 = expr1.Identifier; 619var token2 = expr2.Identifier; 757private readonly Func<SyntaxToken, SyntaxToken> _rewriteToken; 762Func<SyntaxToken, SyntaxToken> rewriteToken = null, 776public override SyntaxToken VisitToken(SyntaxToken token) 778var visited = base.VisitToken(token);
Syntax\SyntaxTokenListTests.cs (16)
80var tokenD = SyntaxFactory.ParseToken("D "); 81var tokenE = SyntaxFactory.ParseToken("E "); 167newList = list.ReplaceRange(elementA, new SyntaxToken[] { }); 171newList = list.ReplaceRange(elementB, new SyntaxToken[] { }); 175newList = list.ReplaceRange(elementC, new SyntaxToken[] { }); 186Assert.Throws<ArgumentOutOfRangeException>(() => list.Add(default(SyntaxToken))); 187Assert.Throws<ArgumentOutOfRangeException>(() => list.Insert(0, default(SyntaxToken))); 188Assert.Throws<ArgumentNullException>(() => list.AddRange((IEnumerable<SyntaxToken>)null)); 189Assert.Throws<ArgumentNullException>(() => list.InsertRange(0, (IEnumerable<SyntaxToken>)null)); 190Assert.Throws<ArgumentNullException>(() => list.ReplaceRange(elementA, (IEnumerable<SyntaxToken>)null)); 205var tokenD = SyntaxFactory.ParseToken("D "); 206var tokenE = SyntaxFactory.ParseToken("E "); 235Assert.Throws<ArgumentOutOfRangeException>(() => list.Add(default(SyntaxToken))); 236Assert.Throws<ArgumentOutOfRangeException>(() => list.Insert(0, default(SyntaxToken))); 237Assert.Throws<ArgumentNullException>(() => list.AddRange((IEnumerable<SyntaxToken>)null)); 238Assert.Throws<ArgumentNullException>(() => list.InsertRange(0, (IEnumerable<SyntaxToken>)null));
Syntax\SyntaxTriviaListTests.cs (4)
21var node1 = SyntaxFactory.Token(SyntaxKind.AbstractKeyword); 22var node2 = SyntaxFactory.Token(SyntaxKind.VirtualKeyword); 37var node1 = SyntaxFactory.Token(SyntaxKind.AbstractKeyword); 38var node2 = SyntaxFactory.Token(SyntaxKind.VirtualKeyword);
Microsoft.CodeAnalysis.CSharp.Test.Utilities (2)
CompilationTestUtils.cs (2)
488foreach (var token in root.DescendantTokens()) 514ExpressionSyntax getEnclosingExpression(SyntaxToken token)
Microsoft.CodeAnalysis.CSharp.Workspaces (994)
CaseCorrection\CSharpCaseCorrectionService.cs (2)
30ConcurrentDictionary<SyntaxToken, SyntaxToken> replacements,
Classification\ClassificationHelpers.cs (10)
28public static string? GetClassification(SyntaxToken token) 61private static bool IsControlKeyword(SyntaxToken token) 138private static bool IsStringToken(SyntaxToken token) 157private static bool IsVerbatimStringToken(SyntaxToken token) 192public static string? GetSyntacticClassificationForIdentifier(SyntaxToken token) 304public static bool IsStaticallyDeclared(SyntaxToken token) 334private static string? GetClassificationForTypeDeclarationIdentifier(SyntaxToken identifier) 346private static string GetClassificationForPunctuation(SyntaxToken token) 444private static bool IsActualContextualKeyword(SyntaxToken token) 530var token = SyntaxFactory.ParseToken(text);
Classification\SyntaxClassification\CSharpSyntaxClassificationService.cs (1)
50public override string? GetSyntacticClassificationForIdentifier(SyntaxToken identifier)
Classification\SyntaxClassification\NameSyntaxClassifier.cs (2)
181SyntaxToken token; 291var token = name.Identifier;
Classification\SyntaxClassification\SyntaxTokenClassifier.cs (3)
27SyntaxToken lessThanToken, 35if (syntaxTree.IsInPartiallyWrittenGeneric(lessThanToken.Span.End, cancellationToken, out var identifier)) 57private static bool CouldBeGenericType(SyntaxToken identifier)
Classification\Worker.cs (6)
38IEnumerable<SyntaxToken> tokens, TextSpan textSpan, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken) 41foreach (var tk in tokens) 66private void AddClassification(SyntaxToken token, string type) 120private void ClassifyToken(SyntaxToken token) 267foreach (var tk in tokens) 285foreach (var token in SyntaxFactory.ParseTokens(text: trivia.ToFullString(), initialTokenPosition: trivia.SpanStart))
Classification\Worker_DocumentationComments.cs (3)
128private void AddXmlClassification(SyntaxToken token, string classificationType) 141foreach (var token in textTokens) 153private void ClassifyXmlTextToken(SyntaxToken token)
Classification\Worker_Preprocesser.cs (2)
80var lastToken = node.EndOfDirectiveToken.GetPreviousToken(includeSkipped: false); 263private void AddOptionalClassification(SyntaxToken token, string classification)
CodeGeneration\CSharpSyntaxGenerator.cs (21)
53internal override SyntaxToken CreateInterpolatedStringStartToken(bool isVerbatim) 62internal override SyntaxToken CreateInterpolatedStringEndToken() 65internal override SeparatedSyntaxList<TElement> SeparatedList<TElement>(IEnumerable<TElement> nodes, IEnumerable<SyntaxToken> separators) 211internal static SyntaxToken GetArgumentModifiers(RefKind refKind) 278var semicolon = !hasBody ? SemicolonToken : default; 716var nameToken = name.ToIdentifierToken(); 763var nameToken = name.ToIdentifierToken(); 1668using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var list); 1927var id = name.ToIdentifierToken(); 2211public override SyntaxToken VisitToken(SyntaxToken token) 2213var rewrittenToken = base.VisitToken(token); 2504var semicolon = statements == null ? SemicolonToken : default; 3073var firstToken = node.GetFirstToken(); 3074var previousToken = firstToken.GetPreviousToken(); 3078var newPreviousToken = previousToken.WithTrailingTrivia(default(SyntaxTriviaList)); 3218internal override SyntaxNode ObjectCreationExpression(SyntaxNode type, SyntaxToken openParen, SeparatedSyntaxList<SyntaxNode> arguments, SyntaxToken closeParen) 3239internal override SyntaxToken NumericLiteralToken(string text, ulong value) 3388internal override SyntaxNode GenericName(SyntaxToken identifier, IEnumerable<SyntaxNode> typeArguments) 3618internal override SyntaxNode IdentifierName(SyntaxToken identifier)
ExternalAccess\Pythia\Api\PythiaSyntaxExtensions.cs (3)
16public static SyntaxToken GetPreviousTokenIfTouchingWord(this SyntaxToken token, int position) 19public static SyntaxToken FindTokenOnLeftOfPosition(this SyntaxTree syntaxTree, int position, CancellationToken cancellationToken, bool includeSkipped = true, bool includeDirectives = false, bool includeDocumentationComments = false)
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (3)
485protected override SyntaxToken GetIdentifier(IdentifierNameSyntax node) 572foreach (var modifier in parameter.Modifiers) 600foreach (var modifier in modifiers)
Formatting\TypingFormattingRule.cs (2)
34var firstTokenOfNode = node.GetFirstToken(includeZeroWidth: true); 60var endToken = bracePair.Item2;
ReassignedVariable\CSharpReassignedVariableService.cs (2)
28protected override SyntaxToken GetIdentifierOfVariable(VariableDeclaratorSyntax variable) 31protected override SyntaxToken GetIdentifierOfSingleVariableDesignation(SingleVariableDesignationSyntax variable)
Rename\CSharpRenameRewriterLanguageService.cs (35)
70private readonly HashSet<SyntaxToken> _annotatedIdentifierTokens = []; 210public override SyntaxToken VisitToken(SyntaxToken token) 214var newToken = base.VisitToken(token); 255private bool IsPropertyAccessorNameConflict(SyntaxToken token) 260private bool IsGetPropertyAccessorNameConflict(SyntaxToken token) 264private bool IsSetPropertyAccessorNameConflict(SyntaxToken token) 268private bool IsInitPropertyAccessorNameConflict(SyntaxToken token) 277private bool IsPossiblyDestructorConflict(SyntaxToken token) 325private async Task<SyntaxToken> RenameAndAnnotateAsync(SyntaxToken token, SyntaxToken newToken, bool isRenameLocation, bool isOldText) 436var identifierToken = default(SyntaxToken); 522private bool IsRenameLocation(SyntaxToken token) 559private SyntaxToken UpdateAliasAnnotation(SyntaxToken newToken) 569private SyntaxToken RenameToken(SyntaxToken oldToken, SyntaxToken newToken, string? prefix, string? suffix) 640private SyntaxToken RenameInStringLiteral(SyntaxToken oldToken, SyntaxToken newToken, ImmutableSortedSet<TextSpan>? subSpansToReplace, Func<SyntaxTriviaList, string, string, SyntaxTriviaList, SyntaxToken> createNewStringLiteral) 655private SyntaxToken RenameInTrivia(SyntaxToken token, IEnumerable<SyntaxTrivia> leadingOrTrailingTriviaList) 683private SyntaxToken RenameWithinToken(SyntaxToken oldToken, SyntaxToken newToken) 714var newIdentifierToken = SyntaxFactory.Identifier(newToken.LeadingTrivia, _replacementText, newToken.TrailingTrivia); 721var updatedToken = RenameInTrivia(oldToken, oldToken.LeadingTrivia); 730var updatedToken = RenameInTrivia(oldToken, oldToken.TrailingTrivia); 747SyntaxToken token, 1151public override SyntaxNode? GetExpansionTargetForLocation(SyntaxToken token) 1154private static SyntaxNode? GetExpansionTarget(SyntaxToken token)
Rename\LabelConflictVisitor.cs (3)
18public LabelConflictVisitor(SyntaxToken tokenBeingRenamed) 31var tokens = new List<SyntaxToken>(); 47public IEnumerable<SyntaxToken> ConflictingTokens
Rename\LocalConflictVisitor.cs (7)
19public LocalConflictVisitor(SyntaxToken tokenBeingRenamed) 43var tokens = new List<SyntaxToken>(); 72var tokens = new List<SyntaxToken>(); 86var tokens = new List<SyntaxToken>(); 100var tokens = new List<SyntaxToken>(); 134var tokens = new List<SyntaxToken>(); 191public IEnumerable<SyntaxToken> ConflictingTokens
Simplification\CSharpSimplificationService.cs (10)
78public override SyntaxToken Expand(SyntaxToken token, SemanticModel semanticModel, Func<SyntaxNode, bool>? expandInsideNode, CancellationToken cancellationToken) 96public static SyntaxToken TryEscapeIdentifierToken(SyntaxToken syntaxToken, SyntaxNode parentOfToken) 140var firstRewrittenToken = rewrittenNode.GetFirstToken(true, false, true, true); 141var firstOriginalToken = originalNode.GetFirstToken(true, false, true, true); 150private static bool TryAddLeadingElasticTriviaIfNecessary(SyntaxToken token, SyntaxToken originalToken, out SyntaxToken tokenWithLeadingWhitespace) 159var previousToken = originalToken.GetPreviousToken();
Simplification\CSharpSimplificationService.Expander.cs (13)
260var identifier = Identifier(inferredName); 330var identifier = Identifier(SyntaxTriviaList.Empty, inferredName, SyntaxTriviaList.Empty); 447var identifier = rewrittenSimpleName.Identifier; 502var firstReplacementToken = replacement.GetFirstToken(true, false, true, true); 503var firstOriginalToken = originalSimpleName.GetFirstToken(true, false, true, true); 533SyntaxToken GetNewIdentifier(SyntaxToken _identifier) 535var newIdentifier = identifier.CopyAnnotationsTo(_identifier); 724var candidateTokens = new List<SyntaxToken>(); 726foreach (var candidateToken in leftTokens) 1005private SyntaxToken ReplaceTokenForCref(SyntaxToken oldToken, SyntaxToken dummySameToken)
Simplification\CSharpSimplificationService.NodesAndTokensToReduceComputer.cs (2)
87public override SyntaxToken VisitToken(SyntaxToken token)
Simplification\Reducers\AbstractCSharpReducer.AbstractReductionRewriter.cs (4)
159protected SyntaxToken SimplifyToken(SyntaxToken token, Func<SyntaxToken, SemanticModel, CSharpSimplifierOptions, CancellationToken, SyntaxToken> simplifier)
Simplification\Reducers\CSharpEscapingReducer.cs (7)
23private static readonly Func<SyntaxToken, SemanticModel, CSharpSimplifierOptions, CancellationToken, SyntaxToken> s_simplifyIdentifierToken = SimplifyIdentifierToken; 32private static SyntaxToken SimplifyIdentifierToken( 33SyntaxToken token, 106var result = token.Kind() == SyntaxKind.IdentifierToken ? CreateNewIdentifierTokenFromToken(token, escape: false) : token; 129private static SyntaxToken CreateNewIdentifierTokenFromToken(SyntaxToken originalToken, bool escape)
Simplification\Reducers\CSharpEscapingReducer.Rewriter.cs (3)
20public override SyntaxToken VisitToken(SyntaxToken token) 22var newToken = base.VisitToken(token);
Simplification\Simplifiers\AbstractCSharpSimplifier.cs (5)
37protected static SyntaxToken? TryGetPredefinedKeywordToken(SemanticModel semanticModel, SpecialType specialType) 314private static IAliasSymbol GetAliasForSymbol(INamespaceOrTypeSymbol symbol, SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken) 337private static int? GetNamespaceIdForAliasSearch(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 364private static SyntaxNode GetStartNodeForNamespaceId(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 375protected static TypeSyntax CreatePredefinedTypeSyntax(SyntaxNode nodeToReplace, SyntaxToken token)
Simplification\Simplifiers\ExpressionSimplifier.cs (1)
148var declIdentifier = ((UsingDirectiveSyntax)syntaxRef.GetSyntax(cancellationToken)).Alias!.Name.Identifier;
Simplification\Simplifiers\NameSimplifier.cs (7)
124var declIdentifier = ((UsingDirectiveSyntax)syntaxRef.GetSyntax(cancellationToken)).Alias.Name.Identifier; 128var identifierToken = Identifier( 334var identifier = ((IdentifierNameSyntax)name).Identifier; 343var identifier = ((GenericNameSyntax)name).Identifier; 463SyntaxToken? keywordToken, 486SyntaxToken identifierToken, 517var newIdentifierToken = identifierToken.CopyAnnotationsTo(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (90)
11public static readonly SyntaxToken AbstractKeyword = Token(SyntaxKind.AbstractKeyword); 12public static readonly SyntaxToken AssemblyKeyword = Token(SyntaxKind.AssemblyKeyword); 13public static readonly SyntaxToken AsyncKeyword = Token(SyntaxKind.AsyncKeyword); 14public static readonly SyntaxToken AwaitKeyword = Token(SyntaxKind.AwaitKeyword); 15public static readonly SyntaxToken BoolKeyword = Token(SyntaxKind.BoolKeyword); 16public static readonly SyntaxToken ByteKeyword = Token(SyntaxKind.ByteKeyword); 17public static readonly SyntaxToken CharKeyword = Token(SyntaxKind.CharKeyword); 18public static readonly SyntaxToken CheckedKeyword = Token(SyntaxKind.CheckedKeyword); 19public static readonly SyntaxToken CloseBraceToken = Token(SyntaxKind.CloseBraceToken); 20public static readonly SyntaxToken CloseBracketToken = Token(SyntaxKind.CloseBracketToken); 21public static readonly SyntaxToken CloseParenToken = Token(SyntaxKind.CloseParenToken); 22public static readonly SyntaxToken ColonToken = Token(SyntaxKind.ColonToken); 23public static readonly SyntaxToken CommaToken = Token(SyntaxKind.CommaToken); 24public static readonly SyntaxToken ConstKeyword = Token(SyntaxKind.ConstKeyword); 25public static readonly SyntaxToken DecimalKeyword = Token(SyntaxKind.DecimalKeyword); 26public static readonly SyntaxToken DisableKeyword = Token(SyntaxKind.DisableKeyword); 27public static readonly SyntaxToken DotDotToken = Token(SyntaxKind.DotDotToken); 28public static readonly SyntaxToken DoubleKeyword = Token(SyntaxKind.DoubleKeyword); 29public static readonly SyntaxToken EndOfDocumentationCommentToken = Token(SyntaxKind.EndOfDocumentationCommentToken); 30public static readonly SyntaxToken EqualsToken = Token(SyntaxKind.EqualsToken); 31public static readonly SyntaxToken ExplicitKeyword = Token(SyntaxKind.ExplicitKeyword); 32public static readonly SyntaxToken ExternKeyword = Token(SyntaxKind.ExternKeyword); 33public static readonly SyntaxToken FileKeyword = Token(SyntaxKind.FileKeyword); 34public static readonly SyntaxToken FloatKeyword = Token(SyntaxKind.FloatKeyword); 35public static readonly SyntaxToken ForEachKeyword = Token(SyntaxKind.ForEachKeyword); 36public static readonly SyntaxToken FromKeyword = Token(SyntaxKind.FromKeyword); 37public static readonly SyntaxToken GlobalKeyword = Token(SyntaxKind.GlobalKeyword); 38public static readonly SyntaxToken GreaterThanEqualsToken = Token(SyntaxKind.GreaterThanEqualsToken); 39public static readonly SyntaxToken GreaterThanToken = Token(SyntaxKind.GreaterThanToken); 40public static readonly SyntaxToken IfKeyword = Token(SyntaxKind.IfKeyword); 41public static readonly SyntaxToken ImplicitKeyword = Token(SyntaxKind.ImplicitKeyword); 42public static readonly SyntaxToken InKeyword = Token(SyntaxKind.InKeyword); 43public static readonly SyntaxToken InterfaceKeyword = Token(SyntaxKind.InterfaceKeyword); 44public static readonly SyntaxToken InternalKeyword = Token(SyntaxKind.InternalKeyword); 45public static readonly SyntaxToken InterpolatedStringEndToken = Token(SyntaxKind.InterpolatedStringEndToken); 46public static readonly SyntaxToken InterpolatedStringStartToken = Token(SyntaxKind.InterpolatedStringStartToken); 47public static readonly SyntaxToken IntKeyword = Token(SyntaxKind.IntKeyword); 48public static readonly SyntaxToken IsKeyword = Token(SyntaxKind.IsKeyword); 49public static readonly SyntaxToken LessThanEqualsToken = Token(SyntaxKind.LessThanEqualsToken); 50public static readonly SyntaxToken LessThanToken = Token(SyntaxKind.LessThanToken); 51public static readonly SyntaxToken LetKeyword = Token(SyntaxKind.LetKeyword); 52public static readonly SyntaxToken LongKeyword = Token(SyntaxKind.LongKeyword); 53public static readonly SyntaxToken MethodKeyword = Token(SyntaxKind.MethodKeyword); 54public static readonly SyntaxToken NewKeyword = Token(SyntaxKind.NewKeyword); 55public static readonly SyntaxToken NotKeyword = Token(SyntaxKind.NotKeyword); 56public static readonly SyntaxToken NullKeyword = Token(SyntaxKind.NullKeyword); 57public static readonly SyntaxToken ObjectKeyword = Token(SyntaxKind.ObjectKeyword); 58public static readonly SyntaxToken OpenBraceToken = Token(SyntaxKind.OpenBraceToken); 59public static readonly SyntaxToken OpenBracketToken = Token(SyntaxKind.OpenBracketToken); 60public static readonly SyntaxToken OpenParenToken = Token(SyntaxKind.OpenParenToken); 61public static readonly SyntaxToken OperatorKeyword = Token(SyntaxKind.OperatorKeyword); 62public static readonly SyntaxToken OutKeyword = Token(SyntaxKind.OutKeyword); 63public static readonly SyntaxToken OverrideKeyword = Token(SyntaxKind.OverrideKeyword); 64public static readonly SyntaxToken ParamsKeyword = Token(SyntaxKind.ParamsKeyword); 65public static readonly SyntaxToken PartialKeyword = Token(SyntaxKind.PartialKeyword); 66public static readonly SyntaxToken PlusToken = Token(SyntaxKind.PlusToken); 67public static readonly SyntaxToken PrivateKeyword = Token(SyntaxKind.PrivateKeyword); 68public static readonly SyntaxToken PropertyKeyword = Token(SyntaxKind.PropertyKeyword); 69public static readonly SyntaxToken ProtectedKeyword = Token(SyntaxKind.ProtectedKeyword); 70public static readonly SyntaxToken PublicKeyword = Token(SyntaxKind.PublicKeyword); 71public static readonly SyntaxToken QuestionQuestionEqualsToken = Token(SyntaxKind.QuestionQuestionEqualsToken); 72public static readonly SyntaxToken QuestionToken = Token(SyntaxKind.QuestionToken); 73public static readonly SyntaxToken ReadOnlyKeyword = Token(SyntaxKind.ReadOnlyKeyword); 74public static readonly SyntaxToken RecordKeyword = Token(SyntaxKind.RecordKeyword); 75public static readonly SyntaxToken RefKeyword = Token(SyntaxKind.RefKeyword); 76public static readonly SyntaxToken RequiredKeyword = Token(SyntaxKind.RequiredKeyword); 77public static readonly SyntaxToken RestoreKeyword = Token(SyntaxKind.RestoreKeyword); 78public static readonly SyntaxToken ReturnKeyword = Token(SyntaxKind.ReturnKeyword); 79public static readonly SyntaxToken SByteKeyword = Token(SyntaxKind.SByteKeyword); 80public static readonly SyntaxToken ScopedKeyword = Token(SyntaxKind.ScopedKeyword); 81public static readonly SyntaxToken SealedKeyword = Token(SyntaxKind.SealedKeyword); 82public static readonly SyntaxToken SemicolonToken = Token(SyntaxKind.SemicolonToken); 83public static readonly SyntaxToken ShortKeyword = Token(SyntaxKind.ShortKeyword); 84public static readonly SyntaxToken SlashGreaterThanToken = Token(SyntaxKind.SlashGreaterThanToken); 85public static readonly SyntaxToken StaticKeyword = Token(SyntaxKind.StaticKeyword); 86public static readonly SyntaxToken StringKeyword = Token(SyntaxKind.StringKeyword); 87public static readonly SyntaxToken StructKeyword = Token(SyntaxKind.StructKeyword); 88public static readonly SyntaxToken SwitchKeyword = Token(SyntaxKind.SwitchKeyword); 89public static readonly SyntaxToken ThisKeyword = Token(SyntaxKind.ThisKeyword); 90public static readonly SyntaxToken TildeToken = Token(SyntaxKind.TildeToken); 91public static readonly SyntaxToken UIntKeyword = Token(SyntaxKind.UIntKeyword); 92public static readonly SyntaxToken ULongKeyword = Token(SyntaxKind.ULongKeyword); 93public static readonly SyntaxToken UnmanagedKeyword = Token(SyntaxKind.UnmanagedKeyword); 94public static readonly SyntaxToken UnsafeKeyword = Token(SyntaxKind.UnsafeKeyword); 95public static readonly SyntaxToken UShortKeyword = Token(SyntaxKind.UShortKeyword); 96public static readonly SyntaxToken UsingKeyword = Token(SyntaxKind.UsingKeyword); 97public static readonly SyntaxToken VirtualKeyword = Token(SyntaxKind.VirtualKeyword); 98public static readonly SyntaxToken VoidKeyword = Token(SyntaxKind.VoidKeyword); 99public static readonly SyntaxToken VolatileKeyword = Token(SyntaxKind.VolatileKeyword); 100public static readonly SyntaxToken WhereKeyword = Token(SyntaxKind.WhereKeyword);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (6)
34protected override bool IsMultiLineRawStringToken(SyntaxToken token) 45protected override VirtualCharSequence TryConvertToVirtualCharsWorker(SyntaxToken token) 127private static VirtualCharSequence TryConvertVerbatimStringToVirtualChars(SyntaxToken token, string startDelimiter, string endDelimiter, bool escapeBraces) 130private static VirtualCharSequence TryConvertSingleLineRawStringToVirtualChars(SyntaxToken token) 175SyntaxToken token, ExpressionSyntax parentExpression, bool tokenIncludeDelimiters) 232SyntaxToken token, string startDelimiter, string endDelimiter, bool escapeBraces)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ArrowExpressionClauseSyntaxExtensions.cs (2)
17SyntaxToken semicolonToken, 33SyntaxToken semicolonToken,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\BlockSyntaxExtensions.cs (5)
26out SyntaxToken semicolonToken) 51bool HasAcceptableDirectiveShape(StatementSyntax statement, SyntaxToken closeBrace) 86var parentToken = parentTrivia.Token; 120out SyntaxToken semicolonToken) 181private static bool TryGetExpression(StatementSyntax firstStatement, LanguageVersion languageVersion, [NotNullWhen(true)] out ExpressionSyntax? expression, out SyntaxToken semicolonToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (2)
20public static bool IsPreProcessorDirectiveContext(this SyntaxTree syntaxTree, int position, SyntaxToken preProcessorTokenOnLeftOfPosition, CancellationToken cancellationToken) 22var token = preProcessorTokenOnLeftOfPosition;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (6)
84var firstToken = expression.GetFirstToken(); 198=> expression?.Parent is ArgumentSyntax { RefOrOutKeyword: SyntaxToken(SyntaxKind.OutKeyword) } argument && 225=> expression?.Parent is ArgumentSyntax { RefKindKeyword: SyntaxToken(SyntaxKind.InKeyword) }; 854SyntaxToken? semicolonTokenOpt, 867var semicolonToken = semicolonTokenOpt ?? SemicolonToken; 873private static StatementSyntax ConvertToStatement(ExpressionSyntax expression, SyntaxToken semicolonToken, bool createReturnStatementForExpression)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.cs (2)
18private static readonly ConditionalWeakTable<MemberDeclarationSyntax, Dictionary<string, ImmutableArray<SyntaxToken>>> s_declarationCache = new(); 27public static SyntaxToken GetNameToken(this MemberDeclarationSyntax member)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.DeclarationFinder.cs (3)
16private readonly Dictionary<string, List<SyntaxToken>> _map = []; 23public static Dictionary<string, List<SyntaxToken>> GetAllDeclarations(SyntaxNode syntax) 30private void Add(SyntaxToken syntaxToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.LocalDeclarationMap.cs (3)
16private readonly Dictionary<string, ImmutableArray<SyntaxToken>> _dictionary; 18internal LocalDeclarationMap(Dictionary<string, ImmutableArray<SyntaxToken>> dictionary) 21public ImmutableArray<SyntaxToken> this[string identifier]
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (2)
46var tokenBeforeParen = node.GetFirstToken().GetPreviousToken(); 47var tokenAfterParen = node.Expression.GetFirstToken();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (4)
24SyntaxToken name, 41SyntaxToken name, 128public static SymbolInfo GetSymbolInfo(this SemanticModel semanticModel, SyntaxToken token) 148private static bool CanBindToken(SyntaxToken token)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\StatementSyntaxExtensions.cs (2)
20var previousToken = statement.GetFirstToken().GetPreviousToken(); 31var nextToken = statement.GetLastToken().GetNextToken();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (13)
69this SyntaxToken token, SourceText? sourceText = null, 72var prevToken = token.GetPreviousToken(includeSkipped: true); 97public static (SyntaxToken openBrace, SyntaxToken closeBrace) GetBraces(this SyntaxNode? node) 518this SyntaxToken token, 694public static (SyntaxToken openParen, SyntaxToken closeParen) GetParentheses(this SyntaxNode node) 724public static (SyntaxToken openBracket, SyntaxToken closeBracket) GetBrackets(this SyntaxNode? node) 862public static T WithCommentsFrom<T>(this T node, SyntaxToken leadingToken, SyntaxToken trailingToken) 870IEnumerable<SyntaxToken> leadingTokens, 871IEnumerable<SyntaxToken> trailingTokens)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.SingleLineRewriter.cs (2)
24public override SyntaxToken VisitToken(SyntaxToken token)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (32)
20public static void Deconstruct(this SyntaxToken token, out SyntaxKind kind) 23public static bool IsLastTokenOfNode<T>(this SyntaxToken token) where T : SyntaxNode 26public static bool IsLastTokenOfNode<T>(this SyntaxToken token, [NotNullWhen(true)] out T? node) where T : SyntaxNode 39public static bool IsKindOrHasMatchingText(this SyntaxToken token, SyntaxKind kind) 42public static bool HasMatchingText(this SyntaxToken token, SyntaxKind kind) 45public static bool IsOpenBraceOrCommaOfObjectInitializer(this SyntaxToken token) 49public static bool IsOpenBraceOfAccessorList(this SyntaxToken token) 58public static bool CouldBeKeyword(this SyntaxToken token) 76public static bool IsPotentialModifier(this SyntaxToken token, out SyntaxKind modifierKind) 125public static bool IsLiteral(this SyntaxToken token) 141public static bool IntersectsWith(this SyntaxToken token, int position) 144public static SyntaxToken GetPreviousTokenIfTouchingWord(this SyntaxToken token, int position) 151private static bool IsWord(SyntaxToken token) 154public static SyntaxToken GetNextNonZeroWidthTokenOrEndOfFile(this SyntaxToken token) 160public static bool IsFirstTokenOnLine(this SyntaxToken token, SourceText text) 162var previousToken = token.GetPreviousToken(includeSkipped: true, includeDirectives: true, includeDocumentationComments: true); 173public static bool SpansPreprocessorDirective(this IEnumerable<SyntaxToken> tokens) 180public static IEnumerable<SyntaxTrivia> GetAllTrailingTrivia(this SyntaxToken token) 195public static bool IsRegularStringLiteral(this SyntaxToken token) 198public static bool IsValidAttributeTarget(this SyntaxToken token) 218public static SyntaxToken WithCommentsFrom( 219this SyntaxToken token, 228public static SyntaxToken KeepCommentsAndAddElasticMarkers(this SyntaxToken token) 232public static bool TryParseGenericName(this SyntaxToken genericIdentifier, CancellationToken cancellationToken, [NotNullWhen(true)] out GenericNameSyntax? genericName) 236var lastToken = genericIdentifier.FindLastTokenOfPartialGenericName(); 256public static SyntaxToken FindLastTokenOfPartialGenericName(this SyntaxToken genericIdentifier) 261var token = genericIdentifier.GetNextToken(includeSkipped: true); 270var next = token.GetNextToken(includeSkipped: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (9)
28var token = tokenOnLeftOfPosition.GetPreviousTokenIfTouchingWord(position); 91public static bool IsRightOfDotOrArrowOrColonColon(this SyntaxTree syntaxTree, int position, SyntaxToken targetToken, CancellationToken cancellationToken) 186var eof = root.EndOfFileToken; 318private static bool AtEndOfIncompleteStringOrCharLiteral(SyntaxToken token, int position, char lastChar, CancellationToken cancellationToken) 389this SyntaxTree syntaxTree, int position, out SyntaxToken stringLiteral, CancellationToken cancellationToken) 391var token = syntaxTree.GetRoot(cancellationToken).FindToken(position, findInsideTrivia: true); 441var token = root.FindToken(position, findInsideTrivia: true); 536public static bool IsPreProcessorKeywordContext(this SyntaxTree syntaxTree, int position, SyntaxToken preProcessorTokenOnLeftOfPosition) 546var token = preProcessorTokenOnLeftOfPosition;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpSyntaxFormatting.cs (2)
48protected override AbstractFormattingResult Format(SyntaxNode node, SyntaxFormattingOptions options, ImmutableArray<AbstractFormattingRule> formattingRules, SyntaxToken startToken, SyntaxToken endToken, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\DefaultOperationProvider.cs (4)
39public override AdjustNewLinesOperation? GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation) 43public override AdjustSpacesOperation GetAdjustSpacesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustSpacesOperation nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\AggregatedFormattingResult.cs (2)
21protected override SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\CSharpFormatEngine.cs (2)
19SyntaxToken startToken, 20SyntaxToken endToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\CSharpStructuredTriviaFormatEngine.cs (2)
33SyntaxToken startToken, 34SyntaxToken endToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\FormattingResult.cs (2)
24protected override SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> changeMap, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\CSharpTriviaFormatter.cs (2)
25SyntaxToken token1, 26SyntaxToken token2,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.Analyzer.cs (6)
16public static AnalysisResult Leading(SyntaxToken token) 24public static AnalysisResult Trailing(SyntaxToken token) 32public static AnalysisResult Between(SyntaxToken token1, SyntaxToken token2) 66for (var currentToken = token1; !currentToken.IsKind(SyntaxKind.None);) 68var previousToken = currentToken.GetPreviousToken(includeSkipped: false, includeZeroWidth: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.CodeShapeAnalyzer.cs (1)
330foreach (var token in xmlComment.DescendantTokens())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.ComplexTrivia.cs (2)
24public ComplexTrivia(LineFormattingOptions options, TreeData treeInfo, SyntaxToken token1, SyntaxToken token2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.cs (8)
29public override TriviaData CreateLeadingTrivia(SyntaxToken token) 49public override TriviaData CreateTrailingTrivia(SyntaxToken token) 69public override TriviaData Create(SyntaxToken token1, SyntaxToken token2) 99private TriviaData? GetWhitespaceOnlyTriviaInfo(SyntaxToken token1, SyntaxToken token2, Analyzer.AnalysisResult result) 130private int CalculateSpaces(SyntaxToken token1, SyntaxToken token2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaDataFactory.FormattedComplexTrivia.cs (2)
24SyntaxToken token1, 25SyntaxToken token2,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Engine\Trivia\TriviaRewriter.cs (16)
25private readonly Dictionary<SyntaxToken, SyntaxTriviaList> _trailingTriviaMap = []; 26private readonly Dictionary<SyntaxToken, SyntaxTriviaList> _leadingTriviaMap = []; 31Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, 48Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, 70KeyValuePair<ValueTuple<SyntaxToken, SyntaxToken>, 99private TextSpan GetTextSpan(ValueTuple<SyntaxToken, SyntaxToken> pair) 135ValueTuple<SyntaxToken, SyntaxToken> pair, 163public override SyntaxToken VisitToken(SyntaxToken token) 208private static SyntaxToken CreateNewToken(SyntaxTriviaList leadingTrivia, SyntaxToken token, SyntaxTriviaList trailingTrivia)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\FormattingHelpers.cs (53)
20public static string GetIndent(this SyntaxToken token) 48public static (SyntaxToken openBrace, SyntaxToken closeBrace) GetBracePair(this SyntaxNode? node) 51public static (SyntaxToken openBracket, SyntaxToken closeBracket) GetBracketPair(this SyntaxNode? node) 54public static bool IsValidBracketOrBracePair(this (SyntaxToken openBracketOrBrace, SyntaxToken closeBracketOrBrace) bracketOrBracePair) 76public static bool IsOpenParenInParameterListOfAConversionOperatorDeclaration(this SyntaxToken token) 79public static bool IsOpenParenInParameterListOfAOperationDeclaration(this SyntaxToken token) 82public static bool IsOpenParenInParameterList(this SyntaxToken token) 85public static bool IsCloseParenInParameterList(this SyntaxToken token) 88public static bool IsOpenParenInArgumentListOrPositionalPattern(this SyntaxToken token) 94public static bool IsCloseParenInArgumentListOrPositionalPattern(this SyntaxToken token) 100private static bool IsTokenInArgumentListOrPositionalPattern(SyntaxToken token) 118public static bool IsColonInTypeBaseList(this SyntaxToken token) 121public static bool IsCommaInArgumentOrParameterList(this SyntaxToken token) 124public static bool IsOpenParenInParameterListOfParenthesizedLambdaExpression(this SyntaxToken token) 147public static bool IsSemicolonInForStatement(this SyntaxToken token) 155public static bool IsSemicolonOfEmbeddedStatement(this SyntaxToken token) 171public static bool IsCloseBraceOfExpression(this SyntaxToken token) 181public static bool IsCloseBraceOfEmbeddedBlock(this SyntaxToken token) 207public static bool IsCommaInEnumDeclaration(this SyntaxToken token) 213public static bool IsCommaInAnyArgumentsList(this SyntaxToken token) 219public static bool IsParenInParenthesizedExpression(this SyntaxToken token) 229public static bool IsParenInArgumentList(this SyntaxToken token) 275public static bool IsEqualsTokenInAutoPropertyInitializers(this SyntaxToken token) 282public static bool IsCloseParenInStatement(this SyntaxToken token) 304public static bool IsDotInMemberAccessOrQualifiedName(this SyntaxToken token) 307public static bool IsDotInMemberAccess(this SyntaxToken token) 318public static bool IsGenericGreaterThanToken(this SyntaxToken token) 326public static bool IsCommaInInitializerExpression(this SyntaxToken token) 333public static bool IsColonInCasePatternSwitchLabel(this SyntaxToken token) 336public static bool IsColonInSwitchExpressionArm(this SyntaxToken token) 339public static bool IsCommaInSwitchExpression(this SyntaxToken token) 342public static bool IsCommaInPropertyPatternClause(this SyntaxToken token) 345public static bool IsIdentifierInLabeledStatement(this SyntaxToken token) 352public static bool IsColonInSwitchLabel(this SyntaxToken token) 355public static bool IsColonInLabeledStatement(this SyntaxToken token) 373public static bool IsNestedQueryExpression(this SyntaxToken token) 380public static bool IsFirstFromKeywordInExpression(this SyntaxToken token) 465public static bool ParenOrBracketContainsNothing(this SyntaxToken token1, SyntaxToken token2) 471public static bool IsLastTokenInLabelStatement(this SyntaxToken token) 486public static (SyntaxToken firstToken, SyntaxToken lastToken) GetFirstAndLastMemberDeclarationTokensAfterAttributes(this MemberDeclarationSyntax node) 497var lastToken = node.GetLastToken(includeZeroWidth: true); 498var lastAttributeToken = attributes.Last().GetLastToken(includeZeroWidth: true); 504var firstTokenAfterAttribute = lastAttributeToken.GetNextToken(includeZeroWidth: true); 510public static bool IsPlusOrMinusExpression(this SyntaxToken token) 520public static bool IsInterpolation(this SyntaxToken currentToken) 526public static bool IsOpenParenInVarDeconstructionDeclaration(this SyntaxToken currentToken) 536public static bool IsCommaInTupleExpression(this SyntaxToken currentToken) 542public static bool IsCommaInCollectionExpression(this SyntaxToken token)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\BaseFormattingRule.cs (27)
19SyntaxToken startToken, 20SyntaxToken endToken, 34SyntaxToken startToken, 35SyntaxToken endToken, 59SyntaxToken startToken, 60SyntaxToken endToken, 73SyntaxToken startToken, 74SyntaxToken endToken, 87SyntaxToken startToken, 88SyntaxToken endToken, 102SyntaxToken baseToken, 103SyntaxToken startToken, 104SyntaxToken endToken, 112SyntaxToken baseToken, 113SyntaxToken startToken, 114SyntaxToken endToken, 120protected static void AddSuppressWrappingIfOnSingleLineOperation(ArrayBuilder<SuppressOperation> list, SyntaxToken startToken, SyntaxToken endToken, SuppressOption extraOption = SuppressOption.None) 123protected static void AddSuppressAllOperationIfOnMultipleLine(ArrayBuilder<SuppressOperation> list, SyntaxToken startToken, SyntaxToken endToken, SuppressOption extraOption = SuppressOption.None) 126protected static void AddSuppressOperation(ArrayBuilder<SuppressOperation> list, SyntaxToken startToken, SyntaxToken endToken, SuppressOption option) 136protected static void AddAnchorIndentationOperation(List<AnchorIndentationOperation> list, SyntaxToken anchorToken, SyntaxToken endToken) 146protected static void AddAlignIndentationOfTokensToBaseTokenOperation(List<AlignTokensOperation> list, SyntaxNode containingNode, SyntaxToken baseNode, IEnumerable<SyntaxToken> tokens, AlignTokensOption option = AlignTokensOption.AlignIndentationOfTokensToBaseToken) 170var firstTokenOfNode = node.GetFirstToken(includeZeroWidth: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (17)
88private static SyntaxToken? GetLastTokenOfType(SyntaxNode node) 108public override AdjustNewLinesOperation? GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation) 127var firstTokenAfterTypeConstraint = currentToken.Parent.GetLastToken().GetNextToken(); 128var lastTokenForTypeConstraint = currentToken.Parent.GetLastToken().GetNextToken(); 174private static AdjustNewLinesOperation? GetAdjustNewLinesOperationAfterFileScopedNamespace(SyntaxToken previousToken, SyntaxToken currentToken) 194private static AdjustNewLinesOperation? GetAdjustNewLinesOperationBetweenMembers(SyntaxToken previousToken, SyntaxToken currentToken) 251private static bool TryGetOperationBeforeDocComment(SyntaxToken currentToken, [NotNullWhen(true)] out AdjustNewLinesOperation? operation) 270public override AdjustSpacesOperation? GetAdjustSpacesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustSpacesOperation nextOperation) 308private static int LineBreaksAfter(SyntaxToken previousToken, SyntaxToken currentToken) 423private static int LineBreaksAfterCloseBrace(SyntaxToken nextToken) 452private static int LineBreaksAfterSemicolon(SyntaxToken previousToken, SyntaxToken currentToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\EndOfFileTokenFormattingRule.cs (4)
13public override AdjustNewLinesOperation? GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation) 25public override AdjustSpacesOperation? GetAdjustSpacesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustSpacesOperation nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (16)
69var baseToken = declaringNode.GetFirstToken(); 115var lastTokenOfLabel = section.Labels.Last().GetLastToken(includeZeroWidth: true); 116var nextToken = lastTokenOfLabel.GetNextToken(includeZeroWidth: true); 124var startToken = section.Statements.First().GetFirstToken(includeZeroWidth: true); 125var endToken = section.Statements.Last().GetLastToken(includeZeroWidth: true); 190var baseTokenForAlignment = recursivePatternParent.GetFirstToken(); 209var baseToken = baseNode.GetFirstToken(includeZeroWidth: true); 210var firstToken = body.GetFirstToken(includeZeroWidth: true); 211var lastToken = body.GetLastToken(includeZeroWidth: true); 274var firstToken = node.GetFirstToken(includeZeroWidth: true); 275var lastToken = node.GetLastToken(includeZeroWidth: true); 276var baseToken = firstToken.GetPreviousToken(includeZeroWidth: true); 282private static void AddAlignmentBlockOperationRelativeToFirstTokenOnBaseTokenLine(List<IndentBlockOperation> list, (SyntaxToken openBrace, SyntaxToken closeBrace) bracePair) 352var firstToken = statement.GetFirstToken(includeZeroWidth: true); 353var lastToken = statement.GetLastToken(includeZeroWidth: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\NewLineUserSettingFormattingRule.cs (4)
76public override AdjustSpacesOperation? GetAdjustSpacesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustSpacesOperation nextOperation) 237public override AdjustNewLinesOperation? GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\QueryExpressionFormattingRule.cs (10)
75var baseToken = fromClause.FromKeyword; 76var startToken = fromClause.Expression.GetFirstToken(includeZeroWidth: true); 77var endToken = fromClause.Expression.GetLastToken(includeZeroWidth: true); 100var baseToken = queryExpression.GetFirstToken(includeZeroWidth: true); 101var endToken = queryExpression.GetLastToken(includeZeroWidth: true); 104var startToken = baseToken.GetNextToken(includeZeroWidth: true); 117var firstToken = queryClause.GetFirstToken(includeZeroWidth: true); 124var firstToken = selectOrGroupClause.GetFirstToken(includeZeroWidth: true); 135public override AdjustNewLinesOperation? GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (5)
43public override AdjustSpacesOperation? GetAdjustSpacesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustSpacesOperation nextOperation) 585var firstToken = node.GetFirstToken(includeZeroWidth: true); 586var lastToken = node.GetLastToken(includeZeroWidth: true); 605private static bool HasFormattableBracketParent(SyntaxToken token)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\StructuredTriviaFormattingRule.cs (4)
14public override AdjustNewLinesOperation? GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation) 24public override AdjustSpacesOperation? GetAdjustSpacesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustSpacesOperation nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SuppressFormattingRule.cs (12)
57var openParenToken = positional.OpenParenToken; 58var closeParenToken = positional.CloseParenToken; 70var openBraceToken = property.OpenBraceToken; 71var closeBraceToken = property.CloseBraceToken; 161var endToken = node.GetLastToken(includeZeroWidth: true); 225var anchorToken = parameterNode.AttributeLists.First().OpenBracketToken; 270var firstToken = statementNode.GetFirstToken(includeZeroWidth: true); 271var lastToken = statementNode.GetLastToken(includeZeroWidth: true); 327var startToken = pragmaWarningDirectiveTrivia.GetLastToken(includeZeroWidth: true, includeDirectives: true); 330var endToken = endDirective is null 407var firstToken = item.GetFirstToken(includeZeroWidth: true); 408var lastToken = item.GetLastToken(includeZeroWidth: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\TokenBasedFormattingRule.cs (6)
43public override AdjustNewLinesOperation? GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation) 219SyntaxToken previousToken, SyntaxToken currentToken) 256public override AdjustSpacesOperation? GetAdjustSpacesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustSpacesOperation nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\WrappingFormattingRule.cs (13)
67private static (SyntaxToken firstToken, SyntaxToken lastToken) GetSpecificNodeSuppressionTokenRange(SyntaxNode node) 72var firstTokenOfEmbeddedStatement = embeddedStatement.GetFirstToken(includeZeroWidth: true); 73var firstToken = firstTokenOfEmbeddedStatement.GetPreviousToken(includeZeroWidth: true); 108var firstToken = statementNode.GetFirstToken(includeZeroWidth: true); 109var lastToken = statementNode.GetLastToken(includeZeroWidth: true); 118var firstToken = statementNode.GetFirstToken(includeZeroWidth: true); 119var lastToken = statementNode.GetLastToken(includeZeroWidth: true); 145var firstTokenOfNode = node.GetFirstToken(includeZeroWidth: true); 158private static (SyntaxToken openBrace, SyntaxToken closeBrace) GetBracePair(SyntaxNode node) 180SyntaxToken startToken, 181SyntaxToken endToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Indentation\CSharpSmartTokenFormatter.cs (10)
47SyntaxToken startToken, SyntaxToken endToken, CancellationToken cancellationToken) 71private static bool CloseBraceOfTryOrDoBlock(SyntaxToken endToken) 78public IList<TextChange> FormatToken(SyntaxToken token, CancellationToken cancellationToken) 83var previousToken = token.GetPreviousToken(includeZeroWidth: true); 99var nextToken = token.GetNextToken(includeZeroWidth: true); 127public override AdjustNewLinesOperation? GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation) 155public override AdjustSpacesOperation? GetAdjustSpacesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustSpacesOperation nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SelectedMembers\CSharpSelectedMembers.cs (1)
30protected override ImmutableArray<(SyntaxNode declarator, SyntaxToken identifier)> GetDeclaratorsAndIdentifiers(MemberDeclarationSyntax member)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (4)
58public ISymbol? GetDeclaredSymbol(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 270public ImmutableArray<ISymbol> GetBestOrAllSymbols(SemanticModel semanticModel, SyntaxNode? node, SyntaxToken token, CancellationToken cancellationToken) 296private ImmutableArray<ISymbol> GetSymbolInfo(SemanticModel semanticModel, SyntaxNode node, SyntaxToken token, CancellationToken cancellationToken) 407private static IPreprocessingSymbol? CreatePreprocessingSymbol(SemanticModel model, SyntaxToken identifier)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (1)
109foreach (var token in modifierList)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpDocumentationCommentService.cs (1)
37protected override SyntaxToken GetIdentifier(XmlNameAttributeSyntax xmlName)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (64)
75public SyntaxToken ParseToken(string text) 93public bool IsVerbatimIdentifier(SyntaxToken token) 96public bool IsOperator(SyntaxToken token) 107public bool IsReservedKeyword(SyntaxToken token) 110public bool IsContextualKeyword(SyntaxToken token) 113public bool IsPreprocessorKeyword(SyntaxToken token) 198public void GetPartsOfUsingAliasDirective(SyntaxNode node, out SyntaxToken globalKeyword, out SyntaxToken alias, out SyntaxNode name) 271public bool IsThisConstructorInitializer(SyntaxToken token) 275public bool IsBaseConstructorInitializer(SyntaxToken token) 279public bool IsQueryKeyword(SyntaxToken token) 306public bool IsPredefinedType(SyntaxToken token) 309public bool IsPredefinedType(SyntaxToken token, PredefinedType type) 318public bool TryGetPredefinedType(SyntaxToken token, out PredefinedType type) 324private static PredefinedType GetPredefinedType(SyntaxToken token) 352public bool IsPredefinedOperator(SyntaxToken token) 355public bool IsPredefinedOperator(SyntaxToken token, PredefinedOperator op) 358public bool TryGetPredefinedOperator(SyntaxToken token, out PredefinedOperator op) 364private static PredefinedOperator GetPredefinedOperator(SyntaxToken token) 460var token = SyntaxFactory.ParseToken(identifier); 466var token = SyntaxFactory.ParseToken(identifier); 475public bool IsLiteral(SyntaxToken token) 503public bool IsStringLiteralOrInterpolatedStringLiteral(SyntaxToken token) 506public bool IsBindableToken(SyntaxToken token) 821var identifier = ((IdentifierNameSyntax)node).Identifier; 842var nameToken = memberDeclaration.GetNameToken(); 871var nameToken = fieldDeclarator.Identifier; 996public SyntaxNode? TryGetBindableParent(SyntaxToken token) 1196public bool IsVerbatimStringLiteral(SyntaxToken token) 1199public bool IsNumericLiteral(SyntaxToken token) 1302SyntaxNode statement, out SyntaxNode left, out SyntaxToken operatorToken, out SyntaxNode right) 1309SyntaxNode statement, out SyntaxNode left, out SyntaxToken operatorToken, out SyntaxNode right) 1327public SyntaxToken GetIdentifierOfSimpleName(SyntaxNode node) 1330public SyntaxToken GetIdentifierOfVariableDeclarator(SyntaxNode node) 1333public SyntaxToken GetIdentifierOfTypeDeclaration(SyntaxNode node) 1345public bool AreEquivalent(SyntaxToken token1, SyntaxToken token2) 1361out SyntaxToken openParen, out SeparatedSyntaxList<TArgumentSyntax> arguments, out SyntaxToken closeParen) where TArgumentSyntax : SyntaxNode 1372public bool ContainsInterleavedDirective(TextSpan span, SyntaxToken token, CancellationToken cancellationToken) 1413public SyntaxToken? GetDeclarationIdentifierIfOverride(SyntaxToken token) 1447public void GetPartsOfIsPatternExpression(SyntaxNode node, out SyntaxNode left, out SyntaxToken isToken, out SyntaxNode right) 1490public void GetPartsOfParenthesizedPattern(SyntaxNode node, out SyntaxToken openParen, out SyntaxNode pattern, out SyntaxToken closeParen) 1498public void GetPartsOfBinaryPattern(SyntaxNode node, out SyntaxNode left, out SyntaxToken operatorToken, out SyntaxNode right) 1506public void GetPartsOfUnaryPattern(SyntaxNode node, out SyntaxToken operatorToken, out SyntaxNode pattern) 1513public void GetPartsOfRelationalPattern(SyntaxNode node, out SyntaxToken operatorToken, out SyntaxNode expression) 1581public void GetPartsOfArgumentList(SyntaxNode node, out SyntaxToken openParenToken, out SeparatedSyntaxList<SyntaxNode> arguments, out SyntaxToken closeParenToken) 1603public void GetPartsOfBinaryExpression(SyntaxNode node, out SyntaxNode left, out SyntaxToken operatorToken, out SyntaxNode right) 1620SyntaxNode node, out SyntaxNode expression, out SyntaxToken operatorToken, out SyntaxNode whenNotNull) 1642public void GetPartsOfGenericName(SyntaxNode node, out SyntaxToken identifier, out SeparatedSyntaxList<SyntaxNode> typeArguments) 1650out SyntaxToken stringStartToken, out SyntaxList<SyntaxNode> contents, out SyntaxToken stringEndToken) 1665public void GetPartsOfMemberAccessExpression(SyntaxNode node, out SyntaxNode expression, out SyntaxToken operatorToken, out SyntaxNode name) 1688public void GetPartsOfObjectCreationExpression(SyntaxNode node, out SyntaxToken keyword, out SyntaxNode type, out SyntaxNode? argumentList, out SyntaxNode? initializer) 1697public void GetPartsOfImplicitObjectCreationExpression(SyntaxNode node, out SyntaxToken keyword, out SyntaxNode argumentList, out SyntaxNode? initializer) 1705public void GetPartsOfParameter(SyntaxNode node, out SyntaxToken identifier, out SyntaxNode? @default) 1713SyntaxNode node, out SyntaxToken openParen, out SyntaxNode expression, out SyntaxToken closeParen) 1721public void GetPartsOfPrefixUnaryExpression(SyntaxNode node, out SyntaxToken operatorToken, out SyntaxNode operand) 1728public void GetPartsOfQualifiedName(SyntaxNode node, out SyntaxNode left, out SyntaxToken operatorToken, out SyntaxNode right) 1761public SyntaxToken GetTokenOfLiteralExpression(SyntaxNode node)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\FormattingRangeHelper.cs (38)
20public static ValueTuple<SyntaxToken, SyntaxToken>? FindAppropriateRange(SyntaxToken endToken, bool useDefaultRange = true) 27private static ValueTuple<SyntaxToken, SyntaxToken>? FixupOpenBrace(ValueTuple<SyntaxToken, SyntaxToken>? tokenRange) 37var currentToken = tokenRange.Value.Item1; 38var previousToken = currentToken.GetPreviousToken(); 55private static ValueTuple<SyntaxToken, SyntaxToken>? FindAppropriateRangeWorker(SyntaxToken endToken, bool useDefaultRange) 112private static ValueTuple<SyntaxToken, SyntaxToken>? FindAppropriateRangeForSemicolon(SyntaxToken endToken) 168private static ValueTuple<SyntaxToken, SyntaxToken>? FindAppropriateRangeForCloseBrace(SyntaxToken endToken) 215var firstTokenOfInnerBlock = parent.GetFirstToken(); 216var lastTokenOfInnerBlock = parent.GetLastToken(); 250var firstTokenOfInnerBlock = parent.GetFirstToken(); 251var lastTokenOfInnerBlock = parent.GetLastToken(); 268private static ValueTuple<SyntaxToken, SyntaxToken>? FindAppropriateRangeForColon(SyntaxToken endToken) 286private static SyntaxToken GetPreviousTokenIfNotFirstTokenInTree(SyntaxToken token) 288var previousToken = token.GetPreviousToken(); 292public static bool AreTwoTokensOnSameLine(SyntaxToken token1, SyntaxToken token2) 308private static SyntaxToken GetAppropriatePreviousToken(SyntaxToken startToken, bool canTokenBeFirstInABlock = false) 310var previousToken = startToken.GetPreviousToken(); 346private static bool IsOpenBraceTokenOfABlockOrTypeOrNamespace(SyntaxToken previousToken) 407public static bool IsColonInSwitchLabel(SyntaxToken token) 414public static bool InBetweenTwoMembers(SyntaxToken previousToken, SyntaxToken currentToken) 434public static MemberDeclarationSyntax? GetEnclosingMember(SyntaxToken token)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\NameSyntaxComparer.cs (3)
12private readonly IComparer<SyntaxToken> _tokenComparer; 15internal NameSyntaxComparer(IComparer<SyntaxToken> tokenComparer) 24public static IComparer<NameSyntax?> Create(IComparer<SyntaxToken> tokenComparer)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TokenComparer.cs (7)
11internal class TokenComparer : IComparer<SyntaxToken> 13public static readonly IComparer<SyntaxToken> NormalInstance = new TokenComparer(specialCaseSystem: false); 14public static readonly IComparer<SyntaxToken> SystemFirstInstance = new TokenComparer(specialCaseSystem: true); 21public int Compare(SyntaxToken x, SyntaxToken y) 43private static int CompareWorker(SyntaxToken x, SyntaxToken y)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpTypeStyleHelper.cs (1)
80SyntaxToken identifier, TypeSyntax typeName, ExpressionSyntax initializer, SemanticModel semanticModel, CSharpSimplifierOptions options, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseExplicitTypeHelper.cs (1)
138SyntaxToken identifier,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeStyle\CSharpUseImplicitTypeHelper.cs (1)
271SyntaxToken identifier,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TypeSyntaxComparer.cs (2)
12private readonly IComparer<SyntaxToken> _tokenComparer; 15internal TypeSyntaxComparer(IComparer<SyntaxToken> tokenComparer, IComparer<NameSyntax?> nameComparer)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\UsingsAndExternAliasesDirectiveComparer.cs (2)
23private readonly IComparer<SyntaxToken> _tokenComparer; 27IComparer<SyntaxToken> tokenComparer)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\AttributeGenerator.cs (2)
24SyntaxToken? target = null) 49AttributeData attribute, SyntaxToken? target, CSharpCodeGenerationContextInfo info)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ConstructorGenerator.cs (2)
78out var expressionBody, out var semicolonToken) == true) 119using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var tokens);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ConversionGenerator.cs (3)
59var keyword = method.MetadataName == WellKnownMemberNames.ImplicitConversionName 63var checkedToken = SyntaxFacts.IsCheckedOperator(method.MetadataName) 92out var expressionBody, out var semicolonToken) == true)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (5)
38ArrayBuilder<SyntaxToken> tokens, 91var lastToken = destination.GetLastToken(); 92var updatedToken = lastToken.ReplaceTrivia(lastToken.TrailingTrivia, 127private static SyntaxToken ReplaceUnterminatedConstruct(SyntaxToken token)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationService.cs (5)
319SyntaxToken? target, 461ComputePositionAndTriviaForRemoveAttributeFromAttributeList(attributeToRemove, (SyntaxToken t) => t.IsKind(SyntaxKind.CommaToken), out positionOfRemovedNode, out trivia); 614var semicolonToken = SemicolonToken; 726public override TDeclarationNode UpdateDeclarationModifiers<TDeclarationNode>(TDeclarationNode declaration, IEnumerable<SyntaxToken> newModifiers, CSharpCodeGenerationContextInfo info, CancellationToken cancellationToken) 738using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var newModifierTokens);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (4)
395private static bool EqualIdentifierName(SyntaxToken x, SyntaxToken y, out int comparisonResult) 401private static bool EqualOperatorPrecedence(SyntaxToken x, SyntaxToken y, out int comparisonResult)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EnumMemberGenerator.cs (1)
141var numericToken = numericLiteral.Token;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\EventGenerator.cs (1)
195using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var tokens);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\ExpressionGenerator.cs (2)
235Func<string, T, SyntaxToken> tokenFactory) 246Func<string, T, SyntaxToken> tokenFactory,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\FieldGenerator.cs (1)
124using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var tokens);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\MethodGenerator.cs (3)
165out var expressionBody, out var semicolonToken) == true) 183out var expressionBody, out var semicolonToken) == true) 257using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var tokens);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (2)
200var classOrStructKeyword = Token(isRecordClass ? default : SyntaxKind.StructKeyword); 271using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var tokens);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\OperatorGenerator.cs (4)
62out var expressionBody, out var semicolonToken) == true) 87var operatorToken = Token(operatorSyntaxKind); 88var checkedToken = SyntaxFacts.IsCheckedOperator(method.MetadataName) 111using var tokens = TemporaryArray<SyntaxToken>.Empty;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\PropertyGenerator.cs (7)
159[NotNullWhen(true)] out ArrowExpressionClauseSyntax? arrowExpression, out SyntaxToken semicolonToken) 188out var expressionBody, out var semicolonToken)) 207out var expressionBody, out var semicolonToken)) 225out var expressionBody, out var semicolonToken) == true) 238[NotNullWhen(true)] out ArrowExpressionClauseSyntax? arrowExpression, out SyntaxToken semicolonToken) 330using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var modifiers); 348var tokens = ArrayBuilder<SyntaxToken>.GetInstance();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\TypeParameterGenerator.cs (1)
29var varianceKeyword =
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeRefactorings\CSharpRefactoringHelpersService.cs (1)
31var token = root.FindToken(position);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\BaseArgumentListSyntaxExtensions.cs (2)
11public static SyntaxToken GetOpenToken(this BaseArgumentListSyntax node) 19public static SyntaxToken GetCloseToken(this BaseArgumentListSyntax node)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\BaseParameterListSyntaxExtensions.cs (2)
11public static SyntaxToken GetOpenToken(this BaseParameterListSyntax node) 19public static SyntaxToken GetCloseToken(this BaseParameterListSyntax node)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\BasePropertyDeclarationSyntaxExtensions.cs (2)
15public static SyntaxToken TryGetSemicolonToken(this BasePropertyDeclarationSyntax? node) 33public static BasePropertyDeclarationSyntax? TryWithSemicolonToken(this BasePropertyDeclarationSyntax? node, SyntaxToken semicolonToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\CSharpSyntaxContext.cs (9)
54SyntaxToken leftToken, 55SyntaxToken targetToken, 196var targetToken = leftToken.GetPreviousTokenIfTouchingWord(position); 349var previousToken = LeftToken.GetPreviousTokenIfTouchingWord(Position); 429private static bool IsLeftSideOfUsingAliasDirective(SyntaxToken leftToken) 453var targetToken = leftToken.GetPreviousTokenIfTouchingWord(position); 456var previousToken = targetToken.GetPreviousToken(); 480SyntaxToken leftToken, 481SyntaxToken targetToken,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (22)
16public static bool IsUsingOrExternKeyword(this SyntaxToken token) 23public static bool IsUsingKeywordInUsingDirective(this SyntaxToken token) 38public static bool IsStaticKeywordContextInUsingDirective(this SyntaxToken token) 56public static bool IsBeginningOfStatementContext(this SyntaxToken token) 191public static bool IsBeginningOfGlobalStatementContext(this SyntaxToken token) 270public static bool IsAfterPossibleCast(this SyntaxToken token) 293public static bool IsLastTokenOfQueryClause(this SyntaxToken token) 309public static bool IsPreProcessorExpressionContext(this SyntaxToken targetToken) 355public static bool IsOrderByDirectionContext(this SyntaxToken targetToken) 386public static bool IsSwitchLabelContext(this SyntaxToken targetToken) 428public static bool IsXmlCrefParameterModifierContext(this SyntaxToken targetToken) 434public static bool IsConstructorOrMethodParameterArgumentContext(this SyntaxToken targetToken) 491public static bool IsUnaryOperatorContext(this SyntaxToken targetToken) 502public static bool IsUnsafeContext(this SyntaxToken targetToken) 511public static bool IsAfterYieldKeyword(this SyntaxToken targetToken) 519public static bool IsAnyAccessorDeclarationContext(this SyntaxToken targetToken, int position, SyntaxKind kind = SyntaxKind.None) 526public static bool IsAccessorDeclarationContext<TMemberNode>(this SyntaxToken targetToken, int position, SyntaxKind kind = SyntaxKind.None) 559private static bool IsAccessorDeclarationContextWorker(ref SyntaxToken targetToken) 627public static bool IsTypeParameterVarianceContext(this SyntaxToken targetToken) 660public static bool IsMandatoryNamedParameterPosition(this SyntaxToken token) 686public static bool IsNumericTypeContext(this SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken) 697public static bool IsTypeNamedDynamic(this SyntaxToken token)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (93)
88var token = tokenOnLeftOfPosition.GetPreviousTokenIfTouchingWord(position); 137this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 156var originalToken = tokenOnLeftOfPosition; 157var token = originalToken; 355var token = leftToken.GetPreviousTokenIfTouchingWord(position); 368this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition, CancellationToken cancellationToken) 409var originalToken = tokenOnLeftOfPosition; 410var token = originalToken; 417var nextToken = originalToken.GetNextToken(includeSkipped: true); 626var token = syntaxTree.FindTokenOnLeftOfPosition(position, cancellationToken) 673var token = syntaxTree.FindTokenOnLeftOfPosition(position, cancellationToken) 689var token = syntaxTree.FindTokenOnLeftOfPosition(position, cancellationToken) 842this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 847var token = tokenOnLeftOfPosition; 860public static bool IsTypeParameterConstraintContext(this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 867var token = tokenOnLeftOfPosition; 891public static bool IsTypeOfExpressionContext(this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 893var token = tokenOnLeftOfPosition.GetPreviousTokenIfTouchingWord(position); 903public static bool IsDefaultExpressionContext(this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 905var token = tokenOnLeftOfPosition.GetPreviousTokenIfTouchingWord(position); 916this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 918var token = tokenOnLeftOfPosition.GetPreviousTokenIfTouchingWord(position); 931SyntaxToken tokenOnLeftOfPosition, 934var token = tokenOnLeftOfPosition; 954public static bool IsGenericConstraintContext(this SyntaxTree syntaxTree, SyntaxToken targetToken) 961SyntaxToken tokenOnLeftOfPosition, 969var token = tokenOnLeftOfPosition; 983if (!syntaxTree.IsInPartiallyWrittenGeneric(position, cancellationToken, out var nameToken)) 1049SyntaxToken tokenOnLeftOfPosition, 1058var token = tokenOnLeftOfPosition.GetPreviousTokenIfTouchingWord(position); 1139SyntaxToken tokenOnLeftOfPosition, 1153var token = tokenOnLeftOfPosition; 1165this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 1167var token = tokenOnLeftOfPosition; 1180this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 1182var token = tokenOnLeftOfPosition; 1194public static bool IsParameterTypeContext(this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 1196var token = tokenOnLeftOfPosition.GetPreviousTokenIfTouchingWord(position); 1211public static bool IsPossibleExtensionMethodContext(this SyntaxTree syntaxTree, SyntaxToken tokenOnLeftOfPosition) 1223this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition, CancellationToken cancellationToken) 1225var token = tokenOnLeftOfPosition; 1255this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 1257var token = tokenOnLeftOfPosition; 1282this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition, CancellationToken cancellationToken) 1284var token = tokenOnLeftOfPosition; 1307public static bool IsPossibleTupleContext(this SyntaxTree syntaxTree, SyntaxToken leftToken, int position) 1327var possibleCommaOrParen = FindTokenOnLeftOfNode(leftToken.Parent); 1339var possibleCommaOrParen = FindTokenOnLeftOfNode(leftToken.Parent!); 1352var possibleCommaOrParen = FindTokenOnLeftOfNode(leftToken.Parent.Parent); 1362public static bool IsAtStartOfPattern(this SyntaxTree syntaxTree, SyntaxToken leftToken, int position) 1456public static bool IsAtEndOfPattern(this SyntaxTree syntaxTree, SyntaxToken leftToken, int position) 1458var originalLeftToken = leftToken; 1541static bool IsAtEndOfSwitchStatementPattern(SyntaxToken leftToken) 1563private static SyntaxToken FindTokenOnLeftOfNode(SyntaxNode node) 1566public static bool IsPossibleTupleOpenParenOrComma(this SyntaxToken possibleCommaOrParen) 1689private static bool IsPossibleVarDeconstructionOpenParenOrComma(SyntaxToken leftToken) 1711SyntaxToken tokenOnLeftOfPosition, 1734var token = tokenOnLeftOfPosition; 1749this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 1751var token = tokenOnLeftOfPosition; 1766this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition, CancellationToken cancellationToken) 1782var token = tokenOnLeftOfPosition.GetPreviousTokenIfTouchingWord(position); 1831var previous = token.GetPreviousToken(includeSkipped: true); 1880this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 1885var token = tokenOnLeftOfPosition; 1914public static bool IsIsOrAsTypeContext(this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 1916var token = tokenOnLeftOfPosition; 1926this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition, CancellationToken cancellationToken) 1928var token = tokenOnLeftOfPosition.GetPreviousTokenIfTouchingWord(position); 1944private static bool IsNonConstantExpressionContext(SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition, CancellationToken cancellationToken) 1958public static bool IsStatementContext(this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition, CancellationToken cancellationToken) 1970var token = tokenOnLeftOfPosition; 1981var token = syntaxTree.FindTokenOnLeftOfPosition(position, cancellationToken) 1999public static bool IsInstanceContext(this SyntaxTree syntaxTree, SyntaxToken targetToken, SemanticModel semanticModel, CancellationToken cancellationToken) 2030this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition, CancellationToken cancellationToken) 2032var token = tokenOnLeftOfPosition.GetPreviousTokenIfTouchingWord(position); 2043public static bool IsDefiniteCastTypeContext(this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 2045var token = tokenOnLeftOfPosition; 2058SyntaxToken tokenOnLeftOfPosition) 2065var token = tokenOnLeftOfPosition.GetPreviousTokenIfTouchingWord(position); 2165SyntaxToken tokenOnLeftOfPosition, 2175var token = tokenOnLeftOfPosition.GetPreviousTokenIfTouchingWord(position); 2342var previousToken = tokenOnLeftOfPosition.GetPreviousToken(includeSkipped: true); 2737public static bool IsInvocationOfVarExpression(this SyntaxToken token) 2811SyntaxToken tokenOnLeftOfPosition, 2817var token = tokenOnLeftOfPosition; 2928this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 2945var token = tokenOnLeftOfPosition; 2963public static bool IsCatchFilterContext(this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 2971var token = tokenOnLeftOfPosition; 2988public static bool IsEnumBaseListContext(this SyntaxTree syntaxTree, SyntaxToken targetToken) 3002var token = syntaxTree 3055public static bool IsFunctionPointerCallingConventionContext(this SyntaxTree syntaxTree, SyntaxToken targetToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.cs (3)
80var refKeyword = RefKeyword; 90var refKeyword = RefKeyword; 91var readOnlyKeyword = ReadOnlyKeyword;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ITypeSymbolExtensions.TypeSyntaxGeneratorVisitor.cs (1)
256var name = element.IsImplicitlyDeclared ? default : Identifier(element.Name);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\NameSyntaxExtensions.cs (1)
25public static SyntaxToken GetNameToken(this NameSyntax nameSyntax)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\StringExtensions.cs (2)
31public static SyntaxToken ToIdentifierToken( 46var token = SyntaxFactory.Identifier(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SyntaxTokenListExtensions.cs (1)
12public static IEnumerable<SyntaxToken> SkipKinds(this SyntaxTokenList tokenList, params SyntaxKind[] kinds)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SyntaxTreeExtensions.cs (6)
15public static bool IsPrimaryFunctionExpressionContext(this SyntaxTree syntaxTree, int position, SyntaxToken tokenOnLeftOfPosition) 42out SyntaxToken genericIdentifier) 51out SyntaxToken genericIdentifier, 52out SyntaxToken lessThanToken) 170private static bool IsFullyWrittenGeneric(SyntaxToken token, SyntaxToken lessThanToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeDeclarationSyntaxExtensions.cs (7)
55private static SyntaxToken GetEndToken(SyntaxNode node) 57var lastToken = node.GetLastToken(includeZeroWidth: true, includeSkipped: true); 61var nextToken = lastToken.GetNextToken(includeZeroWidth: true, includeSkipped: true); 98private static SyntaxToken EnsureToken(SyntaxToken token, SyntaxKind kind, bool prependNewLineIfMissing = false, bool appendNewLineIfMissing = false) 112var openBrace = EnsureToken(typeDeclaration.OpenBraceToken, SyntaxKind.OpenBraceToken); 113var closeBrace = EnsureToken(typeDeclaration.CloseBraceToken, SyntaxKind.CloseBraceToken, appendNewLineIfMissing: true);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\TypeSyntaxExtensions.cs (1)
42var nameToken = nameSyntax.GetNameToken();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Indentation\CSharpIndentationService.cs (6)
52out SyntaxToken token) 87var previousToken = token.GetPreviousToken(includeZeroWidth: true); 107private static bool IsInvalidToken(SyntaxToken token) 180var startToken = section.Statements.First().GetFirstToken(includeZeroWidth: true); 181var endToken = section.Statements.Last().GetLastToken(includeZeroWidth: true); 199var baseToken = node.Parent.GetFirstToken(includeZeroWidth: true);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Indentation\CSharpIndentationService.Indenter.cs (14)
24protected override bool ShouldUseTokenIndenter(Indenter indenter, out SyntaxToken syntaxToken) 36protected override IndentationResult? GetDesiredIndentationWorker(Indenter indenter, SyntaxToken? tokenOpt, SyntaxTrivia? triviaOpt) 66private static IndentationResult? TryGetDesiredIndentation(Indenter indenter, SyntaxToken? tokenOpt) 74private static IndentationResult GetIndentationBasedOnToken(Indenter indenter, SyntaxToken token) 322private static IndentationResult GetIndentationFromCommaSeparatedList(Indenter indenter, SyntaxToken token) 335Indenter indenter, SeparatedSyntaxList<T> list, SyntaxToken token) where T : SyntaxNode 349var firstToken = node.GetFirstToken(includeZeroWidth: true); 362private static IndentationResult GetDefaultIndentationFromToken(Indenter indenter, SyntaxToken token) 372private static IndentationResult GetIndentationForQueryExpression(Indenter indenter, SyntaxToken token) 384var firstToken = queryExpressionClause.GetFirstToken(includeZeroWidth: true); 419var clauseToken = clause.GetFirstToken(includeZeroWidth: true); 431private static SyntaxNode? GetQueryExpressionClause(SyntaxToken token) 457private static bool IsPartOfQueryExpression(SyntaxToken token) 464Indenter indenter, SyntaxToken token, int? additionalSpace = null)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpMoveDeclarationNearReferenceService.cs (1)
49protected override SyntaxToken GetIdentifierOfVariableDeclarator(VariableDeclaratorSyntax variableDeclarator)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpRemoveUnnecessaryImportsService.Rewriter.cs (5)
187var firstToken = resultCompilationUnit.GetFirstToken(); 188var newFirstToken = RemoveUnnecessaryImportsHelpers.StripNewLines(CSharpSyntaxFacts.Instance, firstToken); 228var nextToken = namespaceDeclaration.Usings.Last().GetLastToken().GetNextToken(); 239var firstToken = resultNamespace.Members.First().GetFirstToken(); 240var newFirstToken = RemoveUnnecessaryImportsHelpers.StripNewLines(CSharpSyntaxFacts.Instance, firstToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
78var discardToken = Identifier(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSemanticFactsService.cs (1)
37protected override SyntaxToken ToIdentifierToken(string identifier)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxFactsService.cs (1)
98var closeBrace = CloseBraceToken
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxGeneratorInternal.cs (10)
54public override SyntaxNode LocalDeclarationStatement(SyntaxNode? type, SyntaxToken name, SyntaxNode? initializer, bool isConst) 64public override SyntaxNode EqualsValueClause(SyntaxToken operatorToken, SyntaxNode value) 67internal static VariableDeclarationSyntax VariableDeclaration(SyntaxNode? type, SyntaxToken name, SyntaxNode? expression) 76public override SyntaxToken Identifier(string identifier) 108public override SyntaxNode InterpolatedStringExpression(SyntaxToken startToken, IEnumerable<SyntaxNode> content, SyntaxToken endToken) 111public override SyntaxNode InterpolatedStringText(SyntaxToken textToken) 114public override SyntaxToken InterpolatedStringTextToken(string content, string value) 169public override SyntaxNode IsPatternExpression(SyntaxNode expression, SyntaxToken isKeyword, SyntaxNode pattern) 210public override SyntaxNode UnaryPattern(SyntaxToken operatorToken, SyntaxNode pattern)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (52)
52private static bool DecomposeBinaryOrAssignmentExpression(SyntaxNode node, out SyntaxToken operatorToken, out ExpressionSyntax left, out ExpressionSyntax right) 78out var operatorToken, out var left, out var right)) 257private IEnumerable<TypeInferenceInfo> InferTypeInAnonymousObjectCreation(AnonymousObjectCreationExpressionSyntax expression, SyntaxToken previousToken) 268ArgumentSyntax argument, SyntaxToken? previousToken = null) 337TupleExpressionSyntax tupleExpression, SyntaxToken previousToken) 364private IEnumerable<TypeInferenceInfo> InferTypeInAttributeArgument(AttributeArgumentSyntax argument, SyntaxToken? previousToken = null) 392private IEnumerable<TypeInferenceInfo> InferTypeInObjectCreationExpression(BaseObjectCreationExpressionSyntax expression, SyntaxToken previousToken) 495private IEnumerable<TypeInferenceInfo> InferTypeInArgumentList(ArgumentListSyntax argumentList, SyntaxToken previousToken) 525private IEnumerable<TypeInferenceInfo> InferTypeInAttributeArgumentList(AttributeArgumentListSyntax attributeArgumentList, SyntaxToken previousToken) 794ArrayCreationExpressionSyntax arrayCreationExpression, SyntaxToken? previousToken = null) 821private IEnumerable<TypeInferenceInfo> InferTypeInArrayRankSpecifier(ArrayRankSpecifierSyntax arrayRankSpecifier, SyntaxToken? previousToken = null) 831private IEnumerable<TypeInferenceInfo> InferTypeInArrayType(ArrayTypeSyntax arrayType, SyntaxToken? previousToken = null) 854private IEnumerable<TypeInferenceInfo> InferTypeInAttributeDeclaration(AttributeListSyntax attributeDeclaration, SyntaxToken? previousToken) 865SyntaxToken? previousToken) 874private IEnumerable<TypeInferenceInfo> InferTypeInBracketedArgumentList(BracketedArgumentListSyntax bracketedArgumentList, SyntaxToken previousToken) 890private static int GetArgumentListIndex(BaseArgumentListSyntax argumentList, SyntaxToken previousToken) 909private static int GetArgumentListIndex(AttributeArgumentListSyntax attributeArgumentList, SyntaxToken previousToken) 928private IEnumerable<TypeInferenceInfo> InferTypeInBinaryOrAssignmentExpression(ExpressionSyntax binop, SyntaxToken operatorToken, ExpressionSyntax left, ExpressionSyntax right, ExpressionSyntax expressionOpt = null, SyntaxToken? previousToken = null) 1063private IEnumerable<TypeInferenceInfo> InferTypeInCastExpression(CastExpressionSyntax castExpression, ExpressionSyntax expressionOpt = null, SyntaxToken? previousToken = null) 1075private IEnumerable<TypeInferenceInfo> InferTypeInCatchDeclaration(CatchDeclarationSyntax catchDeclaration, SyntaxToken? previousToken = null) 1084private IEnumerable<TypeInferenceInfo> InferTypeInCatchFilterClause(CatchFilterClauseSyntax catchFilterClause, SyntaxToken? previousToken = null) 1096SyntaxToken? previousToken = null) 1150private IEnumerable<TypeInferenceInfo> InferTypeInConditionalExpression(ConditionalExpressionSyntax conditional, ExpressionSyntax expressionOpt = null, SyntaxToken? previousToken = null) 1183private IEnumerable<TypeInferenceInfo> InferTypeInDoStatement(DoStatementSyntax doStatement, SyntaxToken? previousToken = null) 1192private IEnumerable<TypeInferenceInfo> InferTypeInEqualsValueClause(EqualsValueClauseSyntax equalsValue, SyntaxToken? previousToken = null) 1221private IEnumerable<TypeInferenceInfo> InferTypeInExpressionStatement(SyntaxToken? previousToken = null) 1231private IEnumerable<TypeInferenceInfo> InferTypeInForEachStatement(ForEachStatementSyntax forEachStatementSyntax, ExpressionSyntax expressionOpt = null, SyntaxToken? previousToken = null) 1258private IEnumerable<TypeInferenceInfo> InferTypeInForStatement(ForStatementSyntax forStatement, ExpressionSyntax expressionOpt = null, SyntaxToken? previousToken = null) 1270private IEnumerable<TypeInferenceInfo> InferTypeInIfStatement(IfStatementSyntax ifStatement, SyntaxToken? previousToken = null) 1285SyntaxToken? previousToken = null) 1487var identifier = singleVariableDesignation.Identifier; 1579private IEnumerable<TypeInferenceInfo> InferTypeInLockStatement(LockStatementSyntax lockStatement, SyntaxToken? previousToken = null) 1588private IEnumerable<TypeInferenceInfo> InferTypeInLambdaExpression(LambdaExpressionSyntax lambdaExpression, SyntaxToken? previousToken = null) 1617private IEnumerable<TypeInferenceInfo> InferTypeInMemberDeclarator(AnonymousObjectMemberDeclaratorSyntax memberDeclarator, SyntaxToken? previousTokenOpt = null) 1636private IEnumerable<TypeInferenceInfo> InferTypeInNameColon(NameColonSyntax nameColon, SyntaxToken previousToken) 1652private IEnumerable<TypeInferenceInfo> InferTypeInExpressionColon(ExpressionColonSyntax expressionColon, SyntaxToken previousToken) 1670SyntaxToken? previousToken = null) 1853private IEnumerable<TypeInferenceInfo> InferTypeInNameEquals(NameEqualsSyntax nameEquals, SyntaxToken? previousToken = null) 1871private IEnumerable<TypeInferenceInfo> InferTypeInPostfixUnaryExpression(PostfixUnaryExpressionSyntax postfixUnaryExpressionSyntax, SyntaxToken? previousToken = null) 1887private IEnumerable<TypeInferenceInfo> InferTypeInPrefixUnaryExpression(PrefixUnaryExpressionSyntax prefixUnaryExpression, SyntaxToken? previousToken = null) 1943private IEnumerable<TypeInferenceInfo> InferTypeInAwaitExpression(AwaitExpressionSyntax awaitExpression, SyntaxToken? previousToken = null) 1965private IEnumerable<TypeInferenceInfo> InferTypeInYieldStatement(YieldStatementSyntax yieldStatement, SyntaxToken? previousToken = null) 2006ReturnStatementSyntax returnStatement, SyntaxToken? previousToken = null) 2084private IEnumerable<TypeInferenceInfo> InferTypeInSwitchExpression(SwitchExpressionSyntax switchExpression, SyntaxToken token) 2093SwitchLabelSyntax switchLabel, SyntaxToken? previousToken = null) 2109SwitchStatementSyntax switchStatement, SyntaxToken? previousToken = null) 2129private IEnumerable<TypeInferenceInfo> InferTypeInThrowExpression(ThrowExpressionSyntax throwExpression, SyntaxToken? previousToken = null) 2138private IEnumerable<TypeInferenceInfo> InferTypeInThrowStatement(ThrowStatementSyntax throwStatement, SyntaxToken? previousToken = null) 2147private IEnumerable<TypeInferenceInfo> InferTypeInUsingStatement(UsingStatementSyntax usingStatement, SyntaxToken? previousToken = null) 2352private IEnumerable<TypeInferenceInfo> InferTypeInWhenClause(WhenClauseSyntax whenClause, SyntaxToken? previousToken = null) 2361private IEnumerable<TypeInferenceInfo> InferTypeInWhileStatement(WhileStatementSyntax whileStatement, SyntaxToken? previousToken = null)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\CSharpSimplificationHelpers.cs (9)
15public static SyntaxToken TryEscapeIdentifierToken(SyntaxToken syntaxToken, SyntaxNode parentOfToken) 59var firstRewrittenToken = rewrittenNode.GetFirstToken(true, false, true, true); 60var firstOriginalToken = originalNode.GetFirstToken(true, false, true, true); 61if (TryAddLeadingElasticTriviaIfNecessary(firstRewrittenToken, firstOriginalToken, out var rewrittenTokenWithLeadingElasticTrivia)) 69public static bool TryAddLeadingElasticTriviaIfNecessary(SyntaxToken token, SyntaxToken originalToken, out SyntaxToken tokenWithLeadingWhitespace) 78var previousToken = originalToken.GetPreviousToken();
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (4)
CSharpSyntaxFactsServiceTests.cs (1)
19var token = tree.GetRoot().FindToken(position);
EmbeddedLanguages\VirtualChars\CSharpVirtualCharServiceTests.cs (3)
22private static IEnumerable<SyntaxToken>? GetStringTokens( 51foreach (var token in tokens) 74foreach (var token in tokens)
Microsoft.CodeAnalysis.EditorFeatures (11)
DocumentationComments\AbstractXmlTagCompletionCommandHandler.cs (5)
43protected abstract SyntaxToken GetLocalName(TXmlNameSyntax name); 108private SyntaxToken GetLocalName(TXmlElementStartTagSyntax startTag) 111private SyntaxToken GetLocalName(TXmlElementEndTagSyntax startTag) 171SyntaxToken lessThanSlashToken) 176var token = lessThanSlashToken.GetNextToken(includeDocumentationComments: true);
RenameTracking\RenameTrackingTaggerProvider.TrackingSession.cs (1)
231private async Task<TriggerIdentifierKind> DetermineIfRenamableSymbolAsync(ISymbol symbol, Document document, SyntaxToken token)
TextStructureNavigation\AbstractTextStructureNavigatorProvider.cs (2)
35protected abstract bool IsWithinNaturalLanguage(SyntaxToken token, int position); 37protected virtual TextExtent GetExtentOfWordFromToken(SyntaxToken token, SnapshotPoint position)
TextStructureNavigation\AbstractTextStructureNavigatorProvider.TextStructureNavigator.cs (3)
101var token = root.FindToken(position, findInsideTrivia: true); 309if (!TryFindLeafToken(span.Start, out var token, cancellationToken)) 326private static bool TryFindLeafToken(SnapshotPoint point, out SyntaxToken token, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (4)
Completion\AbstractArgumentProviderTests`1.cs (2)
43protected abstract (SyntaxNode argumentList, ImmutableArray<SyntaxNode> arguments) GetArgumentList(SyntaxToken token); 77var token = root.FindToken(position);
Structure\AbstractSyntaxNodeStructureProviderTests.cs (2)
26var token = root.FindToken(position, findInsideTrivia: true); 47var previousToken = root.DescendantNodesAndTokens(descendIntoTrivia: true).TakeWhile(nodeOrToken => nodeOrToken != node).LastOrDefault(nodeOrToken => nodeOrToken.IsToken).AsToken();
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities2 (4)
Utilities\AssertEx.vb (4)
24Dim expectedToken As SyntaxToken = expectedNewTokens(i) 35Private Shared Function ParseTokens(expected As String, language As String) As IList(Of SyntaxToken) 37Return Microsoft.CodeAnalysis.CSharp.SyntaxFactory.ParseTokens(expected).Select(Function(t) CType(t, SyntaxToken)).ToList() 39Return SyntaxFactory.ParseTokens(expected).Select(Function(t) CType(t, SyntaxToken)).ToList()
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (6)
CodeGeneration\CodeGenerationTests.cs (5)
533SyntaxToken? target = null) 569IEnumerable<SyntaxToken> modifiers = null, 725internal static IEnumerable<SyntaxToken> CreateModifierTokens(Editing.DeclarationModifiers modifiers, string language) 907var token = semanticModel.SyntaxTree.GetRoot().FindToken(selection.Start); 919var token = SemanticModel.SyntaxTree.GetRoot().FindToken(destSpan.Start);
Completion\CompletionServiceTests.cs (1)
134var token = root.FindToken(result.Start);
Microsoft.CodeAnalysis.ExternalAccess.AspNetCore (7)
EmbeddedLanguages\AspNetCoreCSharpRouteSyntaxDetector.cs (1)
35SyntaxToken token,
EmbeddedLanguages\AspNetCoreCSharpVirtualCharService.cs (1)
25public AspNetCoreVirtualCharSequence TryConvertToVirtualChars(SyntaxToken token)
EmbeddedLanguages\BraceMatching\IAspNetCoreEmbeddedLanguageBraceMatcher.cs (1)
14AspNetCoreBraceMatchingResult? FindBraces(SemanticModel semanticModel, SyntaxToken token, int position, CancellationToken cancellationToken);
EmbeddedLanguages\Classification\AspNetCoreEmbeddedLanguageClassificationContext.cs (1)
22public SyntaxToken SyntaxToken => _context.SyntaxToken;
EmbeddedLanguages\DocumentHighlighting\IEmbeddedLanguageDocumentHighlighter.cs (1)
19SyntaxToken token,
Internal\EmbeddedLanguages\AspNetCoreEmbeddedLanguageBraceMatcher.cs (1)
33SyntaxToken token,
Internal\EmbeddedLanguages\AspNetCoreEmbeddedLanguageDocumentHighlighter.cs (1)
32SyntaxToken token,
Microsoft.CodeAnalysis.Features (545)
AddImport\References\Reference.cs (1)
90var newIdentifier = generator.IdentifierName(SearchResult.DesiredName).GetFirstToken().WithTriviaFrom(identifier);
BraceCompletion\AbstractBraceCompletionService.cs (5)
32protected abstract bool IsValidOpeningBraceToken(SyntaxToken token); 37protected abstract bool IsValidClosingBraceToken(SyntaxToken token); 107protected virtual Task<bool> IsValidOpenBraceTokenAtPositionAsync(Document document, SyntaxToken token, int position, CancellationToken cancellationToken) 117protected virtual bool IsValidOpenBraceTokenAtPosition(SourceText text, SyntaxToken token, int position) 144protected static bool ParentIsSkippedTokensTriviaOrNull(ISyntaxFacts syntaxFacts, SyntaxToken token)
BraceMatching\AbstractBraceMatcher.cs (8)
27private bool TryFindMatchingToken(SyntaxToken token, out SyntaxToken match) 65var token = root.FindToken(position); 72var leftToken = token; 73if (TryFindMatchingToken(leftToken, out var rightToken)) 80var rightToken = token; 81if (TryFindMatchingToken(rightToken, out var leftToken)) 91protected virtual bool AllowedForToken(SyntaxToken token)
BraceMatching\IEmbeddedLanguageBraceMatcher.cs (1)
15SyntaxToken token,
ChangeSignature\AbstractChangeSignatureService.cs (5)
64protected abstract SyntaxToken CommaTokenWithElasticSpace(); 678protected (ImmutableArray<T> parameters, ImmutableArray<SyntaxToken> separators) UpdateDeclarationBase<T>( 744protected ImmutableArray<SyntaxToken> GetSeparators<T>(SeparatedSyntaxList<T> arguments, int numSeparatorsToSkip) where T : SyntaxNode 750var separators = new FixedSizeArrayBuilder<SyntaxToken>(count); 775var separators = ArrayBuilder<SyntaxToken>.GetInstance();
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.cs (13)
67protected abstract bool IsEndOfFileToken(SyntaxToken token); 92protected abstract SyntaxNode GetContainingStatement(SyntaxToken token); 93protected abstract bool TokenHasTrailingLineContinuationChar(SyntaxToken token); 95protected SyntaxToken GetAdjustedTokenForPragmaDisable(SyntaxToken token, SyntaxNode root, TextLineCollection lines) 117private SyntaxToken GetAdjustedTokenForPragmaRestore(SyntaxToken token, SyntaxNode root, TextLineCollection lines, int indexOfLine) 259public SyntaxToken StartToken { get; set; } 260public SyntaxToken EndToken { get; set; } 278var startToken = root.FindToken(lineAtPos.Start); 285var endToken = root.FindToken(lineAtPos.End); 344internal SyntaxNode GetNodeWithTokens(SyntaxToken startToken, SyntaxToken endToken, SyntaxNode root)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaHelpers.cs (22)
28Func<SyntaxToken, TextSpan, SyntaxToken> getNewStartToken, 29Func<SyntaxToken, TextSpan, SyntaxToken> getNewEndToken, 32var startToken = suppressionTargetInfo.StartToken; 33var endToken = suppressionTargetInfo.EndToken; 38var newStartToken = getNewStartToken(startToken, diagnosticSpan); 40var newEndToken = endToken; 102internal static SyntaxToken GetNewStartTokenWithAddedPragma( 103SyntaxToken startToken, 154internal static SyntaxToken GetNewEndTokenWithAddedPragma( 155SyntaxToken endToken, 209var startToken = suppressionTargetInfo.StartToken; 210var endToken = suppressionTargetInfo.EndToken; 215var previousOfStart = startToken.GetPreviousToken(includeZeroWidth: true); 216var nextOfEnd = !isEndTokenEOF ? endToken.GetNextToken(includeZeroWidth: true) : default; 226var currentStartToken = startToken; 227var currentEndToken = endToken; 228var newStartToken = startToken.WithLeadingTrivia(previousOfStart.TrailingTrivia.Concat(startToken.LeadingTrivia)); 230var newEndToken = currentEndToken; 238var newPreviousOfStart = previousOfStart.WithTrailingTrivia(); 239var newNextOfEnd = nextOfEnd.WithLeadingTrivia();
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaWarningCodeAction.cs (2)
83public SyntaxToken StartToken_TestOnly => _suppressionTargetInfo.StartToken; 84public SyntaxToken EndToken_TestOnly => _suppressionTargetInfo.EndToken;
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction_Pragma.cs (18)
87SyntaxToken getNewStartToken(SyntaxToken startToken, TextSpan currentDiagnosticSpan) => includeStartTokenChange 91SyntaxToken getNewEndToken(SyntaxToken endToken, TextSpan currentDiagnosticSpan) => includeEndTokenChange 104private static SyntaxTriviaList GetTriviaListForSuppression(SyntaxToken token, bool isStartToken, AbstractSuppressionCodeFixProvider fixer) 111private static SyntaxToken UpdateTriviaList(SyntaxToken token, bool isStartToken, SyntaxTriviaList triviaList, AbstractSuppressionCodeFixProvider fixer) 118private static bool CanRemovePragmaTrivia(SyntaxToken token, Diagnostic diagnostic, AbstractSuppressionCodeFixProvider fixer, bool isStartToken, out int indexOfTriviaToRemove) 158private SyntaxToken GetNewTokenWithModifiedPragma(SyntaxToken token, TextSpan currentDiagnosticSpan, bool add, bool toggle, int indexOfTriviaToRemoveOrToggle, bool isStartToken, CancellationToken cancellationToken) 165private SyntaxToken GetNewTokenWithAddedPragma(SyntaxToken token, TextSpan currentDiagnosticSpan, bool isStartToken, CancellationToken cancellationToken) 177private SyntaxToken GetNewTokenWithRemovedOrToggledPragma(SyntaxToken token, int indexOfTriviaToRemoveOrToggle, bool isStartToken, bool toggle) 180private static SyntaxToken GetNewTokenWithPragmaUnsuppress(SyntaxToken token, int indexOfTriviaToRemoveOrToggle, AbstractSuppressionCodeFixProvider fixer, bool isStartToken, bool toggle) 217public SyntaxToken StartToken_TestOnly => _suppressionTargetInfo.StartToken; 218public SyntaxToken EndToken_TestOnly => _suppressionTargetInfo.EndToken;
CodeLens\CodeLensReferencesService.cs (2)
119var token = (await document.GetSyntaxRootAsync(cancellationToken).ConfigureAwait(false)).FindToken(position, true); 170private static SyntaxNode GetEnclosingCodeElementNode(Document document, SyntaxToken token, ICodeLensDisplayInfoService langServices, CancellationToken cancellationToken)
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsFeatureService.cs (2)
253public override AdjustNewLinesOperation? GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation)
CodeRefactorings\ExtractMethod\AbstractExtractMethodCodeRefactoringProvider.cs (1)
129private static async Task<Document> AddRenameAnnotationAsync(Document document, SyntaxToken? invocationNameToken, CancellationToken cancellationToken)
CodeRefactorings\MoveType\AbstractMoveTypeService.MoveTypeEditor.cs (2)
162var endOfFileToken = ((ICompilationUnitSyntax)modifiedRoot).EndOfFileToken; 163var previousToken = endOfFileToken.GetPreviousToken(includeZeroWidth: true, includeSkipped: true);
Completion\Providers\AbstractAwaitCompletionProvider.cs (2)
63protected abstract SyntaxNode? GetAsyncSupportingDeclaration(SyntaxToken leftToken, int position); 67protected abstract SyntaxToken? GetDotTokenLeftOfPosition(SyntaxTree syntaxTree, int position, CancellationToken cancellationToken);
Completion\Providers\AbstractContextVariableArgumentProvider.cs (1)
20protected abstract bool IsInstanceContext(SyntaxTree syntaxTree, SyntaxToken targetToken, SemanticModel semanticModel, CancellationToken cancellationToken);
Completion\Providers\AbstractCrefCompletionProvider.cs (1)
47protected abstract Task<(SyntaxToken, SemanticModel?, ImmutableArray<ISymbol>)> GetSymbolsAsync(
Completion\Providers\AbstractInternalsVisibleToCompletionProvider.cs (1)
83private static SyntaxNode? GetAttributeSyntaxNodeOfToken(ISyntaxFactsService syntaxFactsService, SyntaxToken token)
Completion\Providers\AbstractMemberInsertingCompletionProvider.cs (4)
27protected abstract SyntaxToken GetToken(CompletionItem completionItem, SyntaxTree tree, CancellationToken cancellationToken); 31protected abstract SyntaxNode GetSyntax(SyntaxToken commonSyntaxToken); 81var token = GetToken(completionItem, tree, cancellationToken); 189var firstToken = insertionRoot.FindToken(position.Value);
Completion\Providers\AbstractOverrideCompletionProvider.cs (4)
18public abstract SyntaxToken FindStartingToken(SyntaxTree tree, int position, CancellationToken cancellationToken); 20public abstract bool TryDetermineModifiers(SyntaxToken startToken, SourceText text, int startLine, out Accessibility seenAccessibility, out DeclarationModifiers modifiers); 61SyntaxToken startToken, 65out SyntaxToken nextToken);
Completion\Providers\AbstractOverrideCompletionProvider.ItemGetter.cs (3)
90SyntaxToken startToken, DeclarationModifiers modifiers) 109SyntaxToken startToken, 152var token = root.FindToken(position);
Completion\Providers\AbstractPartialMethodCompletionProvider.cs (4)
36protected abstract bool IsPartialMethodCompletionContext(SyntaxTree tree, int position, CancellationToken cancellationToken, out DeclarationModifiers modifiers, out SyntaxToken token); 47if (!IsPartialMethodCompletionContext(tree, position, cancellationToken, out var modifiers, out var token)) 82Document document, int position, TextSpan span, DeclarationModifiers modifiers, SyntaxToken token, CancellationToken cancellationToken) 104private CompletionItem CreateItem(IMethodSymbol method, int line, TextSpan span, SemanticModel semanticModel, DeclarationModifiers modifiers, SyntaxToken token)
Completion\Providers\AbstractRecommendationServiceBasedCompletionProvider.cs (1)
29protected abstract bool IsTriggerOnDot(SyntaxToken token, int characterPosition);
Completion\Providers\ImportCompletionProvider\AbstractImportCompletionProvider.cs (2)
29protected abstract bool IsFinalSemicolonOfUsingOrExtern(SyntaxNode directive, SyntaxToken token); 94var targetToken = context.TargetToken;
Completion\Providers\MemberInsertingCompletionItem.cs (1)
21SyntaxToken token,
Completion\Providers\Scripting\AbstractDirectivePathCompletionProvider.cs (2)
24protected abstract bool TryGetStringLiteralToken(SyntaxTree tree, int position, out SyntaxToken stringLiteral, CancellationToken cancellationToken); 41if (!TryGetStringLiteralToken(tree, position, out var stringLiteral, cancellationToken))
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (4)
85protected static SyntaxToken CreateUniqueName( 116var collectionVariableToken = generator.Identifier(collectionVariable.ToString()).WithAdditionalAnnotations(RenameAnnotation.Create()); 132SyntaxGenerator generator, SyntaxNode type, SyntaxToken foreachVariable, 133ITypeSymbol castType, SyntaxNode collectionVariable, SyntaxToken indexVariable)
ConvertForToForEach\AbstractConvertForToForEachCodeRefactoringProvider.cs (7)
43out SyntaxToken iterationVariable, 50TForStatementSyntax currentFor, TTypeNode? typeNode, SyntaxToken foreachIdentifier, 61out var iterationVariable, out var initializer, out var memberAccess, out var stepValueExpressionOpt, cancellationToken)) 312SyntaxToken iterationVariable, 363var foreachIdentifierReference = foreachIdentifier.WithoutAnnotations(RenameAnnotation.Kind).WithoutTrivia(); 385(TTypeNode?, SyntaxToken, TStatementSyntax) TryDeconstructInitialDeclaration() 479var replacementToken = foreachIdentifierReference;
ConvertLinq\ConvertForEachToLinqQuery\ExtendedSyntaxNode.cs (2)
24IEnumerable<SyntaxToken> extraLeadingTokens, 25IEnumerable<SyntaxToken> extraTrailingTokens)
ConvertLinq\ConvertForEachToLinqQuery\ForEachInfo.cs (6)
15ImmutableArray<SyntaxToken> identifiers, 17ImmutableArray<SyntaxToken> leadingTokens, 18ImmutableArray<SyntaxToken> trailingTokens) 26public ImmutableArray<SyntaxToken> Identifiers { get; } = identifiers; 30public ImmutableArray<SyntaxToken> LeadingTokens { get; } = leadingTokens; 32public ImmutableArray<SyntaxToken> TrailingTokens { get; } = trailingTokens;
ConvertNumericLiteral\AbstractConvertNumericLiteralCodeRefactoringProvider.cs (2)
121static Task<Document> ReplaceTokenAsync(Document document, SyntaxNode root, SyntaxToken numericToken, long value, string text, string suffix) 124var updatedToken = generator.NumericLiteralToken(text + suffix, (ulong)value)
ConvertToInterpolatedString\AbstractConvertConcatenationToInterpolatedStringRefactoringProvider.cs (3)
127var startToken = generator 130var endToken = generator 266syntaxFacts.GetPartsOfBinaryExpression(node, out var left, out var right);
ConvertToInterpolatedString\ConvertRegularStringToInterpolatedStringRefactoringProvider.cs (1)
106private static Task<Document> UpdateDocumentAsync(Document document, SyntaxNode root, SyntaxToken token)
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (3)
407var structNameToken = generator.Identifier(structName); 709currentTupleExpr, out var openParen, out var arguments, out var closeParen);
DocumentationComments\AbstractDocumentationCommentSnippetService.cs (11)
27protected abstract SyntaxToken GetTokenToRight(SyntaxTree syntaxTree, int position, CancellationToken cancellationToken); 28protected abstract SyntaxToken GetTokenToLeft(SyntaxTree syntaxTree, int position, CancellationToken cancellationToken); 29protected abstract bool IsDocCommentNewLine(SyntaxToken token); 35protected abstract bool HasSkippedTrailingTrivia(SyntaxToken token); 60var token = syntaxTree.GetRoot(cancellationToken).FindToken(position, findInsideTrivia: true); 87private List<string>? GetDocumentationCommentLines(SyntaxToken token, SourceText text, in DocumentationCommentOptions options, out string? indentText, out int caretOffset, out int spanToReplaceLength) 118private List<string>? GetDocumentationCommentLinesNoIndentation(SyntaxToken token, SourceText text, in DocumentationCommentOptions options, out int caretOffset, out int spanToReplaceLength) 134private List<string>? GetDocumentationStubLines(SyntaxToken token, SourceText text, in DocumentationCommentOptions options, out int caretOffset, out int spanToReplaceLength, out string? existingCommentText) 257var token = GetTokenToLeft(syntaxTree, position, cancellationToken); 306var token = targetMember.GetFirstToken(); 345var token = GetTokenToLeft(syntaxTree, position, cancellationToken);
DocumentHighlighting\AbstractDocumentHighlightsService.cs (2)
98var token = root.FindToken(position); 315var token = root.FindToken(location.SourceSpan.Start, findInsideTrivia: true);
DocumentHighlighting\IEmbeddedLanguageDocumentHighlighter.cs (1)
18SyntaxToken token,
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (11)
128protected abstract bool TryGetEnclosingBreakpointSpan(SyntaxToken token, out TextSpan span); 168protected abstract bool AreEquivalentImpl(SyntaxToken oldToken, SyntaxToken newToken); 173private bool AreEquivalent(SyntaxToken oldToken, SyntaxToken newToken) 2087var lastNewToken = default(SyntaxToken); 2093var currentSegment = (path: (string?)null, oldStartLine: 0, delta: 0, firstOldToken: default(SyntaxToken), firstNewToken: default(SyntaxToken)); 2101var oldToken = currentSegment.firstOldToken; 2102var newToken = currentSegment.firstNewToken;
EditAndContinue\AbstractSimpleMemberBody.cs (1)
29public sealed override IEnumerable<SyntaxToken>? GetActiveTokens()
EditAndContinue\MemberBody.cs (1)
33public abstract IEnumerable<SyntaxToken>? GetActiveTokens();
EmbeddedLanguages\AbstractEmbeddedLanguageFeatureService.cs (1)
110SyntaxToken token,
EmbeddedLanguages\AbstractEmbeddedLanguagesProvider.cs (1)
33public abstract string EscapeText(string text, SyntaxToken token);
EmbeddedLanguages\AbstractLanguageDetector.cs (4)
30protected abstract bool IsArgumentToWellKnownAPI(SyntaxToken token, SyntaxNode argumentNode, SemanticModel semanticModel, CancellationToken cancellationToken, out TOptions options); 40protected virtual bool IsEmbeddedLanguageInterpolatedStringTextToken(SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken) 51SyntaxToken token, 97private bool IsEmbeddedLanguageStringLiteralToken(SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken, out TOptions options)
EmbeddedLanguages\Classification\AbstractEmbeddedLanguageClassificationService.cs (2)
109private void ProcessToken(SyntaxToken token) 120private void ClassifyToken(SyntaxToken token)
EmbeddedLanguages\Classification\AbstractFallbackEmbeddedLanguageClassifier.cs (1)
33var token = context.SyntaxToken;
EmbeddedLanguages\Classification\EmbeddedLanguageClassifierContext.cs (2)
29public SyntaxToken SyntaxToken { get; } 45SyntaxToken syntaxToken,
EmbeddedLanguages\DateAndTime\LanguageServices\DateAndTimeEmbeddedLanguage.cs (5)
26public async Task<SyntaxToken?> TryGetDateAndTimeTokenAtPositionAsync( 32var token = GetToken(syntaxFacts, root, position); 40private static SyntaxToken GetToken(ISyntaxFactsService syntaxFacts, SyntaxNode root, int position) 42var token = root.FindToken(position); 51var previous = token.GetPreviousToken();
EmbeddedLanguages\DateAndTime\LanguageServices\DateAndTimeLanguageDetector.cs (3)
58protected override bool IsEmbeddedLanguageInterpolatedStringTextToken(SyntaxToken token, SemanticModel semanticModel, CancellationToken cancellationToken) 72SyntaxToken token, 133private static bool IsMethodArgument(SyntaxToken token, ISyntaxFacts syntaxFacts)
EmbeddedLanguages\EmbeddedLanguageDetector.cs (8)
33SyntaxToken token, 47SyntaxToken token, 60SyntaxToken token, 82SyntaxToken token, 155SyntaxToken token, 207SyntaxToken token, 278SyntaxToken token, 382private SyntaxNode? TryFindContainer(SyntaxToken token)
EmbeddedLanguages\Json\LanguageServices\AbstractJsonDetectionAnalyzer.cs (1)
77var token = child.AsToken();
EmbeddedLanguages\Json\LanguageServices\AbstractJsonDetectionCodeFixProvider.cs (1)
30protected abstract void AddComment(SyntaxEditor editor, SyntaxToken stringLiteral, string commentContents);
EmbeddedLanguages\Json\LanguageServices\AbstractJsonDiagnosticAnalyzer.cs (1)
70var token = child.AsToken();
EmbeddedLanguages\Json\LanguageServices\JsonBraceMatcher.cs (1)
38SyntaxToken token,
EmbeddedLanguages\Json\LanguageServices\JsonClassifier.cs (1)
42var token = context.SyntaxToken;
EmbeddedLanguages\Json\LanguageServices\JsonLanguageDetector.cs (4)
62/// <inheritdoc cref="TryParseString(SyntaxToken, SemanticModel, bool, CancellationToken)"/> 69public JsonTree? TryParseString(SyntaxToken token, SemanticModel semanticModel, bool includeProbableStrings, CancellationToken cancellationToken) 94public bool IsProbablyJson(SyntaxToken token, [NotNullWhen(true)] out JsonTree? tree) 126SyntaxToken token,
EmbeddedLanguages\RegularExpressions\LanguageServices\AbstractRegexDiagnosticAnalyzer.cs (1)
80SyntaxToken token,
EmbeddedLanguages\RegularExpressions\LanguageServices\EmbeddedCompletionContext.cs (2)
23public readonly SyntaxToken StringToken; 32SyntaxToken stringToken)
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexBraceMatcher.cs (1)
41SyntaxToken token,
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexClassifier.cs (1)
44var token = context.SyntaxToken;
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexDocumentHighlighter.cs (1)
35Document document, SemanticModel semanticModel, SyntaxToken token, int position, HighlightingOptions options, CancellationToken cancellationToken)
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexEmbeddedLanguage.cs (2)
33internal async Task<(RegexTree tree, SyntaxToken token)> TryGetTreeAndTokenAtPositionAsync( 45public string EscapeText(string text, SyntaxToken token)
EmbeddedLanguages\RegularExpressions\LanguageServices\RegexLanguageDetector.cs (1)
73SyntaxToken token,
ExtractMethod\AbstractSyntaxTriviaService.cs (16)
52IEnumerable<SyntaxToken> oldTokens, 53Func<SyntaxToken, SyntaxToken, SyntaxToken> computeReplacementToken) 70private static Dictionary<SyntaxToken, SyntaxToken> CreateOldToNewTokensMap( 71Dictionary<TriviaLocation, SyntaxToken> tokens, 74var token = default(SyntaxToken); 75var map = new Dictionary<SyntaxToken, SyntaxToken>(); 93private static Dictionary<TriviaLocation, IEnumerable<SyntaxTrivia>> GetTriviaAtEdges(Dictionary<TriviaLocation, SyntaxToken> tokens, TextSpan textSpan) 109private static Dictionary<TriviaLocation, SyntaxToken> GetTokensAtEdges(SyntaxNode root, TextSpan textSpan) 111var tokens = new Dictionary<TriviaLocation, SyntaxToken> 122SyntaxToken token1, 123SyntaxToken token2,
ExtractMethod\AbstractSyntaxTriviaService.Result.cs (14)
55private static Dictionary<SyntaxToken, SyntaxToken> CreateOldToNewTokensMap( 59var map = new Dictionary<SyntaxToken, SyntaxToken>(); 100private Dictionary<TriviaLocation, SyntaxToken> RecoverTokensAtEdges( 122private Dictionary<SyntaxToken, SyntaxToken> CreateOldToNewTokensMap( 123Dictionary<TriviaLocation, SyntaxToken> tokens, 173private Dictionary<SyntaxToken, LeadingTrailingTriviaPair> CreateTokenLeadingTrailingTriviaMap( 174Dictionary<TriviaLocation, SyntaxToken> tokens) 177var map = new Dictionary<SyntaxToken, LeadingTrailingTriviaPair>(); 211Dictionary<TriviaLocation, SyntaxToken> tokens) 259private static SyntaxToken ResolveAnnotation( 270Dictionary<SyntaxToken, LeadingTrailingTriviaPair> triviaMap)
ExtractMethod\Extensions.cs (1)
33public static SyntaxToken GetTokenWithAnnotation(this SemanticDocument document, SyntaxAnnotation annotation)
ExtractMethod\ExtractMethodResult.cs (4)
25private readonly AsyncLazy<(Document document, SyntaxToken? invocationNameToken)>? _lazyData; 30Func<CancellationToken, Task<(Document document, SyntaxToken? invocationNameToken)>>? getDocumentAsync) 45Func<CancellationToken, Task<(Document document, SyntaxToken? invocationNameToken)>> getDocumentAsync) 50public Task<(Document document, SyntaxToken? invocationNameToken)> GetDocumentAsync(CancellationToken cancellationToken)
ExtractMethod\ISyntaxTriviaService.cs (4)
23public SyntaxToken PreviousToken { get; set; } 24public SyntaxToken NextToken { get; set; } 33internal delegate SyntaxToken AnnotationResolver(SyntaxNode root, TriviaLocation location, SyntaxAnnotation annotation); 34internal delegate IEnumerable<SyntaxTrivia> TriviaResolver(TriviaLocation location, PreviousNextTokenPair tokenPair, Dictionary<SyntaxToken, LeadingTrailingTriviaPair> triviaMap);
ExtractMethod\MethodExtractor.Analyzer.cs (8)
336SemanticModel model, Dictionary<ISymbol, List<SyntaxToken>> symbolMap, 394private Dictionary<ISymbol, List<SyntaxToken>> GetSymbolMap(SemanticModel model) 454Dictionary<ISymbol, List<SyntaxToken>> symbolMap, 559Dictionary<ISymbol, List<SyntaxToken>> symbolMap, 616Dictionary<ISymbol, List<SyntaxToken>> symbolMap, SemanticModel model, ISymbol symbol, bool writtenInside) 793private static void AppendMethodTypeParameterUsedDirectly(IDictionary<ISymbol, List<SyntaxToken>> symbolMap, IDictionary<int, ITypeParameterSymbol> sortedMap) 811IDictionary<ISymbol, List<SyntaxToken>> symbolMap, 912private OperationStatus CheckReadOnlyFields(SemanticModel semanticModel, Dictionary<ISymbol, List<SyntaxToken>> symbolMap)
ExtractMethod\MethodExtractor.Analyzer.SymbolMapBuilder.cs (3)
25private readonly Dictionary<ISymbol, List<SyntaxToken>> _symbolMap = []; 28public static Dictionary<ISymbol, List<SyntaxToken>> Build( 59foreach (var token in node.DescendantTokens())
ExtractMethod\MethodExtractor.CodeGenerator.cs (4)
72protected abstract SyntaxToken CreateIdentifier(string name); 73protected abstract SyntaxToken CreateMethodName(); 82protected abstract TStatementSyntax CreateAssignmentExpressionStatement(SyntaxToken identifier, TExpressionSyntax rvalue); 311var annotations = new List<(SyntaxToken, SyntaxAnnotation)>();
ExtractMethod\MethodExtractor.cs (7)
46protected abstract SyntaxToken? GetInvocationNameToken(IEnumerable<SyntaxToken> tokens); 49protected abstract Task<(Document document, SyntaxToken? invocationNameToken)> InsertNewLineBeforeLocalFunctionIfNecessaryAsync( 50Document document, SyntaxToken? invocationNameToken, SyntaxNode methodDefinition, CancellationToken cancellationToken); 159private async Task<(Document document, SyntaxToken? invocationNameToken)> GetFormattedDocumentAsync( 161SyntaxToken? invocationNameToken, 192var annotations = new List<(SyntaxToken, SyntaxAnnotation)>(analyzeResult.Variables.Length);
ExtractMethod\MethodExtractor.VariableInfo.cs (4)
99List<(SyntaxToken, SyntaxAnnotation)> annotations, CancellationToken cancellationToken) 120public SyntaxToken GetIdentifierTokenAtDeclaration(SemanticDocument document) 123public SyntaxToken GetIdentifierTokenAtDeclaration(SyntaxNode node) 126public SyntaxToken GetOriginalIdentifierToken(CancellationToken cancellationToken) => _variableSymbol.GetOriginalIdentifierToken(cancellationToken);
ExtractMethod\MethodExtractor.VariableSymbol.cs (9)
36public abstract SyntaxToken GetOriginalIdentifierToken(CancellationToken cancellationToken); 39List<(SyntaxToken, SyntaxAnnotation)> annotations, CancellationToken cancellationToken); 102public override SyntaxToken GetOriginalIdentifierToken(CancellationToken cancellationToken) 108List<(SyntaxToken, SyntaxAnnotation)> annotations, CancellationToken cancellationToken) 241public override SyntaxToken GetOriginalIdentifierToken(CancellationToken cancellationToken) 250var token = tree.GetRoot(cancellationToken).FindToken(span.Start); 261List<(SyntaxToken, SyntaxAnnotation)> annotations, CancellationToken cancellationToken) 268var identifier = GetOriginalIdentifierToken(cancellationToken); 287foreach (var token in declStatement.DescendantTokens())
ExtractMethod\SelectionResult.cs (13)
46protected abstract bool UnderAnonymousOrLocalMethod(SyntaxToken token, SyntaxToken firstToken, SyntaxToken lastToken); 87public SyntaxToken GetFirstTokenInSelection() 90public SyntaxToken GetLastTokenInSelection() 127var token = GetFirstTokenInSelection(); 135var token = GetLastTokenInSelection(); 141var firstToken = GetFirstTokenInSelection(); 142var lastToken = GetLastTokenInSelection(); 145for (var currentToken = firstToken; 169var firstToken = GetFirstTokenInSelection(); 170var lastToken = GetLastTokenInSelection(); 213protected static SyntaxNode AddAnnotations(SyntaxNode root, IEnumerable<(SyntaxToken, SyntaxAnnotation)> pairs)
ExtractMethod\SelectionValidator.cs (6)
89var token1 = root.FindToken(textSpan.Start); 149var token1 = root.FindToken(textSpan.Start); 189public SyntaxToken FirstTokenInOriginalSpan { get; set; } 190public SyntaxToken LastTokenInOriginalSpan { get; set; } 192public SyntaxToken FirstTokenInFinalSpan { get; set; } 193public SyntaxToken LastTokenInFinalSpan { get; set; }
GenerateEqualsAndGetHashCodeFromMembers\FormatLargeBinaryExpressionRule.cs (2)
25in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation)
GoToDefinition\AbstractGoToDefinitionSymbolService.cs (1)
20protected abstract int? GetTargetPositionIfControlFlow(SemanticModel semanticModel, SyntaxToken token);
InheritanceMargin\AbstractInheritanceMarginService.cs (1)
25protected abstract SyntaxToken GetDeclarationToken(SyntaxNode declarationNode);
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (1)
98var declarationToken = GetDeclarationToken(memberDeclarationNode);
InlineMethod\AbstractInlineMethodRefactoringProvider.cs (1)
489var unusedLocalName =
IntroduceUsingStatement\AbstractIntroduceUsingStatementCodeRefactoringProvider.cs (1)
216syntaxFacts.GetPartsOfMemberAccessExpression(invokedExpression, out var accessedExpression, out var name);
IntroduceVariable\AbstractIntroduceLocalForExpressionCodeRefactoringProvider.cs (2)
118var nameToken = await GenerateUniqueNameAsync(document, expression, cancellationToken).ConfigureAwait(false); 127protected static async Task<SyntaxToken> GenerateUniqueNameAsync(
IntroduceVariable\AbstractIntroduceVariableService.cs (2)
257protected static SyntaxToken GenerateUniqueFieldName( 276protected static SyntaxToken GenerateUniqueLocalName(
MetadataAsSource\AbstractMetadataAsSourceService.AbstractMetadataFormattingRule.cs (4)
18protected abstract AdjustNewLinesOperation GetAdjustNewLinesOperationBetweenMembersAndUsings(SyntaxToken token1, SyntaxToken token2); 22in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation)
MetadataAsSource\AbstractMetadataAsSourceService+CompatAbstractMetadataFormattingRule.cs (12)
54public sealed override AdjustNewLinesOperation GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation) 56var previousTokenCopy = previousToken; 57var currentTokenCopy = currentToken; 64public sealed override AdjustSpacesOperation GetAdjustSpacesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustSpacesOperation nextOperation) 66var previousTokenCopy = previousToken; 67var currentTokenCopy = currentToken; 101public virtual AdjustNewLinesOperation GetAdjustNewLinesOperationSlow(ref SyntaxToken previousToken, ref SyntaxToken currentToken, ref NextGetAdjustNewLinesOperation nextOperation) 107public virtual AdjustSpacesOperation GetAdjustSpacesOperationSlow(ref SyntaxToken previousToken, ref SyntaxToken currentToken, ref NextGetAdjustSpacesOperation nextOperation)
MoveToNamespace\AbstractMoveToNamespaceService.cs (1)
77var token = root.FindToken(position);
QuickInfo\AbstractEmbeddedLanguageQuickInfoProvider.cs (3)
29protected override async Task<QuickInfoItem?> BuildQuickInfoAsync(QuickInfoContext context, SyntaxToken token) 48protected override Task<QuickInfoItem?> BuildQuickInfoAsync(CommonQuickInfoContext context, SyntaxToken token) 71SyntaxToken token,
QuickInfo\CommonQuickInfoProvider.cs (7)
14protected abstract Task<QuickInfoItem?> BuildQuickInfoAsync(QuickInfoContext context, SyntaxToken token); 15protected abstract Task<QuickInfoItem?> BuildQuickInfoAsync(CommonQuickInfoContext context, SyntaxToken token); 47protected async Task<ImmutableArray<SyntaxToken>> GetTokensAsync(SyntaxTree tree, int position, System.Threading.CancellationToken cancellationToken) 49using var result = TemporaryArray<SyntaxToken>.Empty; 66protected virtual bool ShouldCheckPreviousToken(SyntaxToken token) 71SyntaxToken token) 84SyntaxToken token)
QuickInfo\CommonSemanticQuickInfoProvider.cs (16)
23QuickInfoContext context, SyntaxToken token) 38CommonQuickInfoContext context, SyntaxToken token) 51SyntaxToken token) 68SyntaxToken token, 101var linkedToken = FindTokenInLinkedDocument(token, linkedModel, cancellationToken); 137private static SyntaxToken FindTokenInLinkedDocument( 138SyntaxToken token, 147var linkedToken = root.FindToken(token.SpanStart); 156SyntaxToken token, 181protected abstract bool GetBindableNodeForTokenIndicatingLambda(SyntaxToken token, [NotNullWhen(returnValue: true)] out SyntaxNode? found); 182protected abstract bool GetBindableNodeForTokenIndicatingPossibleIndexerAccess(SyntaxToken token, [NotNullWhen(returnValue: true)] out SyntaxNode? found); 183protected abstract bool GetBindableNodeForTokenIndicatingMemberAccess(SyntaxToken token, out SyntaxToken found); 191SolutionServices services, SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 237private ImmutableArray<ISymbol> GetSymbolsFromToken(SyntaxToken token, SolutionServices services, SemanticModel semanticModel, CancellationToken cancellationToken) 254if (GetBindableNodeForTokenIndicatingMemberAccess(token, out var accessedMember))
QuickInfo\IEmbeddedLanguageQuickInfoProvider.cs (1)
18SyntaxToken token);
RelatedDocuments\AbstractRelatedDocumentsService.cs (2)
34protected abstract IEnumerable<(TExpressionSyntax expression, SyntaxToken nameToken)> IteratePotentialTypeNodes(SyntaxNode root); 112SyntaxToken nameToken,
RemoveUnusedVariable\AbstractRemoveUnusedVariableCodeFixProvider.cs (2)
29protected abstract bool IsCatchDeclarationIdentifier(SyntaxToken token); 80token.Parent.ReplaceToken(token, default(SyntaxToken)).WithAdditionalAnnotations(Formatter.Annotation)));
Rename\IRenameIssuesService.cs (1)
13SemanticModel semantic, ISymbol symbol, SyntaxToken triggerToken, [NotNullWhen(true)] out string? langError);
Rename\SymbolicRenameInfo.cs (5)
32public SyntaxToken TriggerToken { get; } 45SyntaxToken triggerToken, 116var triggerToken = await GetTriggerTokenAsync(document, position, cancellationToken).ConfigureAwait(false); 123private static async Task<SyntaxToken> GetTriggerTokenAsync(Document document, int position, CancellationToken cancellationToken) 133SyntaxToken triggerToken,
ReplaceDocCommentTextWithTag\AbstractReplaceDocCommentTextWithTagCodeRefactoringProvider.cs (4)
19protected abstract bool IsInXMLAttribute(SyntaxToken token); 21protected abstract bool IsXmlTextToken(SyntaxToken token); 110CodeRefactoringContext context, SemanticModel semanticModel, SyntaxToken token, TextSpan replacementSpan, CancellationToken cancellationToken) 129var token = root.FindToken(position);
ReplaceMethodWithProperty\IReplaceMethodWithPropertyService.cs (2)
20void ReplaceGetReference(SyntaxEditor editor, SyntaxToken nameToken, string propertyName, bool nameChanged); 21void ReplaceSetReference(SyntaxEditor editor, SyntaxToken nameToken, string propertyName, bool nameChanged);
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (2)
250var nameToken = root.FindToken(location.SourceSpan.Start); 290var nameToken = root.FindToken(location.SourceSpan.Start);
ReplacePropertyWithMethods\AbstractReplacePropertyWithMethodsService.cs (7)
33protected abstract TCrefSyntax CreateCrefSyntax(TCrefSyntax originalCref, SyntaxToken identifierToken, SyntaxNode? parameterType); 303SyntaxToken newIdentifierToken; 340var newIdentifierToken = AddConflictAnnotation(Generator.Identifier(_propertyBackingField.Name), conflictMessage); 363var newIdentifierToken = AddConflictAnnotation(Generator.Identifier(_propertyBackingField.Name), conflictMessage); 390var newIdentifier = AddConflictAnnotation( 436private static SyntaxToken AddConflictAnnotation(SyntaxToken token, string? conflictMessage)
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (1)
262var nameToken = root.FindToken(location.SourceSpan.Start, findInsideTrivia: true);
Shared\Extensions\SyntaxTokenListExtensions.cs (1)
29foreach (var token in tokens)
SignatureHelp\CommonSignatureHelpUtilities.cs (12)
26Func<TArgumentList, SyntaxToken> getOpenToken, 27Func<TArgumentList, SyntaxToken> getCloseToken, 50Func<TArgumentList, SyntaxToken> getOpenToken, 51Func<TArgumentList, SyntaxToken> getCloseToken, 59var closeToken = getCloseToken(argumentList); 74Func<TArgumentList, SyntaxToken> getCloseToken) 83Func<TArgumentList, SyntaxToken> getCloseToken) 86var closeToken = getCloseToken(argumentList); 93var lastToken = argumentList.GetLastToken(); 94var nextToken = lastToken.GetNextToken(); 108Func<SyntaxToken, bool> isTriggerToken, 109Func<TSyntax, SyntaxToken, bool> isArgumentListToken,
SimplifyTypeNames\AbstractSimplifyTypeNamesCodeFixProvider.cs (1)
48var token = root.FindToken(span.Start, findInsideTrivia: true);
Snippets\SnippetProviders\AbstractConsoleSnippetProvider.cs (2)
38protected abstract SyntaxToken GetOpenParenToken(TArgumentListSyntax argumentList); 70var openParenToken = GetOpenParenToken(argumentListNode);
Snippets\SnippetProviders\AbstractInlineStatementSnippetProvider.cs (7)
30protected abstract bool CanInsertStatementAfterToken(SyntaxToken token); 48var targetToken = syntaxContext.TargetToken; 80private bool CanInsertStatementBeforeToken(SyntaxToken token) 82var previousToken = token.GetPreviousToken(); 93SyntaxToken targetToken, 104syntaxFacts.GetPartsOfMemberAccessExpression(parentNode, out var expression, out var dotToken, out var name); 137syntaxFacts.GetPartsOfQualifiedName(parentNode, out var expression, out var dotToken, out var right);
Snippets\SnippetProviders\AbstractTypeSnippetProvider.cs (2)
17protected abstract SyntaxToken GetTypeDeclarationIdentifier(TTypeDeclarationSyntax node); 38var identifier = GetTypeDeclarationIdentifier(node);
SpellCheck\AbstractSpellCheckCodeFixProvider.cs (10)
32protected abstract bool IsGeneric(SyntaxToken nameToken); 35protected abstract SyntaxToken CreateIdentifier(SyntaxToken nameToken, string newName); 55var token = syntaxRoot.FindToken(span.Start); 75var token = name.GetFirstToken(); 89private async Task CheckTokenAsync(CodeFixContext context, Document document, SyntaxToken token, CancellationToken cancellationToken) 108CodeFixContext context, SyntaxToken nameToken, bool isGeneric, CancellationToken cancellationToken) 146CodeFixContext context, SyntaxToken nameToken, bool isGeneric, 211private CodeAction CreateCodeAction(SyntaxToken nameToken, string oldName, string newName, Document document) 220private async Task<Document> UpdateAsync(Document document, SyntaxToken nameToken, string newName, CancellationToken cancellationToken)
SpellCheck\AbstractSpellCheckSpanService.cs (4)
86SyntaxToken token, 114private void AddStringSpans(SyntaxToken token, bool canContainEscapes) 142private void AddStringSubSpans(SyntaxToken token) 209private void TryAddSpanForIdentifier(SyntaxToken token)
SplitOrMergeIfStatements\AbstractSplitIfStatementCodeRefactoringProvider.cs (3)
67var token = root.FindToken(tokenSpan.Start); 78private static bool IsPartOfBinaryExpressionChain(SyntaxToken token, int syntaxKind, out SyntaxNode rootExpression) 95SyntaxToken token, SyntaxNode rootExpression, ISyntaxFactsService syntaxFacts)
src\Analyzers\Core\Analyzers\AddAccessibilityModifiers\AbstractAddAccessibilityModifiers.cs (2)
17out SyntaxToken name, 30out SyntaxToken name,
src\Analyzers\Core\Analyzers\AddAccessibilityModifiers\IAddAccessibilityModifiersService.cs (1)
21out SyntaxToken name,
src\Analyzers\Core\Analyzers\AddRequiredParentheses\AbstractAddRequiredParenthesesDiagnosticAnalyzer.cs (1)
67protected abstract (TExpressionSyntax, SyntaxToken, TExpressionSyntax) GetPartsOfBinaryLike(TBinaryLikeExpressionSyntax binaryLike);
src\Analyzers\Core\Analyzers\FileHeaders\AbstractFileHeaderHelper.cs (1)
43var firstToken = root.GetFirstToken(includeZeroWidth: true);
src\Analyzers\Core\Analyzers\NewLines\ConsecutiveStatementPlacement\AbstractConsecutiveStatementPlacementDiagnosticAnalyzer.cs (2)
71var endToken = block.GetLastToken(); 84var nextToken = endToken.GetNextToken();
src\Analyzers\Core\Analyzers\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesDiagnosticAnalyzer.cs (2)
69private void CheckToken(SyntaxTreeAnalysisContext context, NotificationOption2 notificationOption, SyntaxToken token) 86private bool ContainsMultipleBlankLines(SyntaxToken token, out SyntaxTrivia firstBadTrivia)
src\Analyzers\Core\Analyzers\OrderModifiers\OrderModifiersHelpers.cs (1)
28foreach (var modifier in modifiers)
src\Analyzers\Core\Analyzers\RemoveRedundantEquality\AbstractRemoveRedundantEqualityDiagnosticAnalyzer.cs (1)
83SyntaxToken operatorToken)
src\Analyzers\Core\Analyzers\RemoveUnnecessaryImports\AbstractRemoveUnnecessaryImportsDiagnosticAnalyzer.cs (2)
74protected abstract SyntaxToken? TryGetLastToken(SyntaxNode node); 157var lastToken = TryGetLastToken(previous.Value.node) ?? previous.Value.node.GetLastToken();
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (1)
675var firstToken = memberDeclaration.GetFirstToken();
src\Analyzers\Core\Analyzers\SimplifyInterpolation\AbstractSimplifyInterpolationHelpers.cs (1)
183private static TextSpan GetSpanWithinLiteralQuotes(IVirtualCharService virtualCharService, SyntaxToken formatToken)
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForIfNullCheckDiagnosticAnalyzer.cs (2)
208syntaxFacts.GetPartsOfAssignmentStatement(whenTrueStatement, out var left, out var right); 231syntaxFacts.GetPartsOfAssignmentStatement(assignmentStatement, out var topAssignmentLeft, out var topAssignmentRight);
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForNullableTernaryConditionalCheckDiagnosticAnalyzer.cs (2)
80syntaxFacts.GetPartsOfMemberAccessExpression(conditionMemberAccess, out var conditionExpression, out var conditionSimpleName); 90syntaxFacts.GetPartsOfMemberAccessExpression(whenPartMemberAccess, out var whenPartExpression, out var whenPartSimpleName);
src\Analyzers\Core\Analyzers\UseCoalesceExpression\AbstractUseCoalesceExpressionForTernaryConditionalCheckDiagnosticAnalyzer.cs (1)
73syntaxFacts.GetPartsOfBinaryExpression(condition, out var conditionLeftHigh, out var conditionRightHigh);
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractObjectCreationExpressionAnalyzer.cs (2)
137var valuePattern = syntaxFacts.GetIdentifierOfVariableDeclarator(variableDeclarator); 164out var left, out var right);
src\Analyzers\Core\Analyzers\UseCollectionInitializer\AbstractUseCollectionInitializerAnalyzer.cs (1)
212this.SyntaxFacts.GetPartsOfAssignmentStatement(statement, out var left, out var right);
src\Analyzers\Core\Analyzers\UseCollectionInitializer\IUpdateExpressionSyntaxHelper.cs (2)
15void GetPartsOfForeachStatement(TStatementSyntax statement, out SyntaxToken awaitKeyword, out SyntaxToken identifier, out TExpressionSyntax expression, out IEnumerable<TStatementSyntax> statements);
src\Analyzers\Core\Analyzers\UseCollectionInitializer\UpdateExpressionState.cs (3)
294this.SyntaxFacts.GetPartsOfMemberAccessExpression(memberAccess, out var localInstance, out var memberName); 375syntaxHelper.GetPartsOfForeachStatement(foreachStatement, out var awaitKeyword, out var identifier, out _, out var foreachStatements);
src\Analyzers\Core\Analyzers\UseCompoundAssignment\AbstractUseCompoundAssignmentDiagnosticAnalyzer.cs (2)
88out var assignmentLeft, out var assignmentToken, out var assignmentRight); 112out var binaryLeft, out var binaryRight);
src\Analyzers\Core\Analyzers\UseCompoundAssignment\UseCompoundAssignmentUtilities.cs (1)
90out var expression, out var whenNotNull);
src\Analyzers\Core\Analyzers\UseNullPropagation\AbstractUseNullPropagationDiagnosticAnalyzer.cs (2)
168syntaxFacts.GetPartsOfMemberAccessExpression(whenPartToCheck, out _, out var name); 245syntaxFacts.GetPartsOfBinaryExpression(condition, out var conditionLeft, out var conditionRight);
src\Analyzers\Core\Analyzers\UseObjectInitializer\UseNamedMemberInitializerAnalyzer.cs (2)
100statement, out var left, out var right); 163var identifier = this.SyntaxFacts.GetIdentifierOfSimpleName(name);
src\Analyzers\Core\CodeFixes\AddAnonymousTypeMemberName\AbstractAddAnonymousTypeMemberNameCodeFixProvider.cs (1)
30protected abstract TAnonymousObjectMemberDeclaratorSyntax WithName(TAnonymousObjectMemberDeclaratorSyntax declarator, SyntaxToken name);
src\Analyzers\Core\CodeFixes\DocumentationComments\AbstractRemoveDocCommentNodeCodeFixProvider.cs (3)
31protected abstract bool IsXmlNewLineToken(SyntaxToken token); 32protected abstract bool IsXmlWhitespaceToken(SyntaxToken token); 105foreach (var childToken in GetTextTokens(textSyntax))
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.cs (5)
33protected abstract bool TryInitializeImplicitObjectCreation(SemanticDocument document, SyntaxNode node, CancellationToken cancellationToken, out SyntaxToken token, out ImmutableArray<Argument> arguments, out INamedTypeSymbol typeToGenerateIn); 34protected abstract bool TryInitializeSimpleNameGenerationState(SemanticDocument document, SyntaxNode simpleName, CancellationToken cancellationToken, out SyntaxToken token, out ImmutableArray<Argument> arguments, out INamedTypeSymbol typeToGenerateIn); 35protected abstract bool TryInitializeConstructorInitializerGeneration(SemanticDocument document, SyntaxNode constructorInitializer, CancellationToken cancellationToken, out SyntaxToken token, out ImmutableArray<Argument> arguments, out INamedTypeSymbol typeToGenerateIn); 36protected abstract bool TryInitializeSimpleAttributeNameGenerationState(SemanticDocument document, SyntaxNode simpleName, CancellationToken cancellationToken, out SyntaxToken token, out ImmutableArray<Argument> arguments, out INamedTypeSymbol typeToGenerateIn); 43protected abstract IMethodSymbol GetCurrentConstructor(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken);
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (4)
51public SyntaxToken Token { get; private set; } 302out var token, out var arguments, out var typeToGenerateIn)) 320out var token, out var arguments, out var typeToGenerateIn)) 339out var token, out var arguments, out var typeToGenerateIn))
src\Analyzers\Core\CodeFixes\GenerateDefaultConstructors\AbstractGenerateDefaultConstructorCodeFixProvider.cs (1)
18protected abstract SyntaxToken? TryGetTypeName(SyntaxNode typeDeclaration);
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.cs (1)
27protected abstract bool TryInitializeIdentifierNameState(SemanticDocument document, TSimpleNameSyntax identifierName, CancellationToken cancellationToken, out SyntaxToken identifierToken, out TExpressionSyntax simpleNameOrMemberAccessExpression);
src\Analyzers\Core\CodeFixes\GenerateEnumMember\AbstractGenerateEnumMemberService.State.cs (2)
23public SyntaxToken IdentifierToken { get; private set; } 86out var identifierToken, out var simpleNameOrMemberAccessExpression))
src\Analyzers\Core\CodeFixes\GenerateMember\AbstractGenerateMemberCodeFixProvider.cs (2)
28protected abstract bool IsCandidate(SyntaxNode node, SyntaxToken token, Diagnostic diagnostic); 65var token = root.FindToken(span.Start);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateConversionService.cs (2)
26protected abstract bool TryInitializeImplicitConversionState(SemanticDocument document, SyntaxNode expression, ISet<TypeKind> classInterfaceModuleStructTypes, CancellationToken cancellationToken, out SyntaxToken identifierToken, out IMethodSymbol methodSymbol, out INamedTypeSymbol typeToGenerateIn); 27protected abstract bool TryInitializeExplicitConversionState(SemanticDocument document, SyntaxNode expression, ISet<TypeKind> classInterfaceModuleStructTypes, CancellationToken cancellationToken, out SyntaxToken identifierToken, out IMethodSymbol methodSymbol, out INamedTypeSymbol typeToGenerateIn);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateConversionService.State.cs (2)
62out var identifierToken, out var methodSymbol, out var typeToGenerateIn)) 86out var identifierToken, out var methodSymbol, out var typeToGenerateIn))
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.cs (2)
26protected abstract bool TryInitializeExplicitInterfaceState(SemanticDocument document, SyntaxNode node, CancellationToken cancellationToken, out SyntaxToken identifierToken, out IMethodSymbol methodSymbol, out INamedTypeSymbol typeToGenerateIn); 27protected abstract bool TryInitializeSimpleNameState(SemanticDocument document, TSimpleNameSyntax simpleName, CancellationToken cancellationToken, out SyntaxToken identifierToken, out TExpressionSyntax simpleNameOrMemberAccessExpression, out TInvocationExpressionSyntax invocationExpressionOpt, out bool isInConditionalExpression);
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateMethodService.State.cs (2)
89out var identifierToken, out var methodSymbol, out var typeToGenerateIn)) 129out var identifierToken, out var simpleNameOrMemberAccessExpression,
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.State.cs (1)
30public SyntaxToken IdentifierToken { get; protected set; }
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.cs (3)
34protected abstract bool TryInitializeExplicitInterfaceState(SemanticDocument document, SyntaxNode node, CancellationToken cancellationToken, out SyntaxToken identifierToken, out IPropertySymbol propertySymbol, out INamedTypeSymbol typeToGenerateIn); 35protected abstract bool TryInitializeIdentifierNameState(SemanticDocument document, TSimpleNameSyntax identifierName, CancellationToken cancellationToken, out SyntaxToken identifierToken, out TExpressionSyntax simpleNameOrMemberAccessExpression, out bool isInExecutableBlock, out bool isinConditionalAccessExpression); 37protected abstract bool TryConvertToLocalDeclaration(ITypeSymbol type, SyntaxToken identifierToken, SemanticModel semanticModel, CancellationToken cancellationToken, out SyntaxNode newRoot);
src\Analyzers\Core\CodeFixes\GenerateVariable\AbstractGenerateVariableService.State.cs (3)
39public SyntaxToken IdentifierToken { get; private set; } 197out var identifierToken, out var propertySymbol, out var typeToGenerateIn)) 240out var identifierToken, out var simpleNameOrMemberAccessExpression, out var isInExecutableBlock, out var isInConditionalAccessExpression))
src\Analyzers\Core\CodeFixes\ImplementAbstractClass\AbstractImplementAbstractClassCodeFixProvider.cs (1)
25protected abstract SyntaxToken GetClassIdentifier(TClassNode classNode);
src\Analyzers\Core\CodeFixes\ImplementAbstractClass\ImplementAbstractClassData.cs (4)
33Document document, ImplementTypeOptions options, SyntaxNode classNode, SyntaxToken classIdentifier, 40private readonly SyntaxToken _classIdentifier = classIdentifier; 47Document document, SyntaxNode classNode, SyntaxToken classIdentifier, CancellationToken cancellationToken) 79Document document, SyntaxNode classNode, SyntaxToken classIdentifier, CancellationToken cancellationToken)
src\Analyzers\Core\CodeFixes\NewLines\MultipleBlankLines\AbstractMultipleBlankLinesCodeFixProvider.cs (2)
50using var _ = PooledDictionary<SyntaxToken, SyntaxToken>.GetInstance(out var replacements);
src\Analyzers\Core\CodeFixes\OrderModifiers\AbstractOrderModifiersCodeFixProvider.cs (3)
82int CompareModifiers(SyntaxToken t1, SyntaxToken t2) 85int GetOrder(SyntaxToken token)
src\Analyzers\Core\CodeFixes\RemoveUnusedParametersAndValues\AbstractRemoveUnusedValuesCodeFixProvider.cs (4)
76protected abstract SyntaxNode? TryUpdateNameForFlaggedNode(SyntaxNode node, SyntaxToken newName); 81protected abstract SyntaxToken GetForEachStatementIdentifier(TForEachStatementSyntax node); 938public SyntaxToken GenerateUniqueNameAtSpanStart(SyntaxNode node) 940var nameToken = _semanticFacts.GenerateUniqueName(_semanticModel, node, _memberDeclaration, "unused", _usedNames, _cancellationToken);
src\Analyzers\Core\CodeFixes\UseCompoundAssignment\AbstractUseCompoundAssignmentCodeFixProvider.cs (3)
39protected abstract SyntaxToken Token(TSyntaxKind kind); 41TSyntaxKind assignmentOpKind, TExpressionSyntax left, SyntaxToken syntaxToken, TExpressionSyntax right); 85var compoundOperator = Token(_assignmentToTokenMap[assignmentOpKind]);
Structure\Syntax\AbstractSyntaxNodeStructureProvider.cs (2)
24SyntaxToken previousToken, 37SyntaxToken previousToken,
Structure\Syntax\AbstractSyntaxStructureProvider.cs (1)
13SyntaxToken previousToken,
Structure\Syntax\AbstractSyntaxTriviaStructureProvider.cs (1)
14SyntaxToken previousToken,
Structure\Syntax\BlockSpanCollector.cs (3)
48SyntaxToken previousToken = default; 63private void GetBlockSpans(SyntaxToken previousToken, SyntaxNode node, ArrayBuilder<BlockSpan> spans) 76private void GetBlockSpans(SyntaxToken token, ArrayBuilder<BlockSpan> spans)
UseNamedArguments\AbstractUseNamedArgumentsCodeRefactoringProvider.cs (1)
176TArgumentListSyntax argumentList, IEnumerable<TBaseArgumentSyntax> namedArguments, IEnumerable<SyntaxToken> separators);
Wrapping\AbstractCodeActionComputer.cs (4)
174using var _1 = PooledDictionary<SyntaxToken, SyntaxTriviaList>.GetInstance(out var leftTokenToTrailingTrivia); 175using var _2 = PooledDictionary<SyntaxToken, SyntaxTriviaList>.GetInstance(out var rightTokenToLeadingTrivia); 221Dictionary<SyntaxToken, SyntaxTriviaList> leftTokenToTrailingTrivia, 222Dictionary<SyntaxToken, SyntaxTriviaList> rightTokenToLeadingTrivia,
Wrapping\AbstractWrapper.cs (2)
52var firstToken = item.IsToken ? item.AsToken() : item.AsNode()!.GetFirstToken(); 53var lastToken = item.IsToken ? item.AsToken() : item.AsNode()!.GetLastToken();
Wrapping\BinaryExpression\AbstractBinaryExpressionWrapper.cs (1)
115_syntaxFacts.GetPartsOfBinaryExpression(currentNodeOrToken.AsNode()!, out var left, out var opToken, out var right);
Wrapping\BinaryExpression\BinaryExpressionCodeActionComputer.cs (1)
96var opToken = _exprsAndOperators[i].AsToken();
Wrapping\Edit.cs (10)
17public readonly SyntaxToken Left; 18public readonly SyntaxToken Right; 23SyntaxToken left, SyntaxTriviaList newLeftTrailingTrivia, 24SyntaxToken right, SyntaxTriviaList newRightLeadingTrivia) 68var leftLastToken = left.IsToken ? left.AsToken() : left.AsNode()!.GetLastToken(); 69var rightFirstToken = right.IsToken ? right.AsToken() : right.AsNode()!.GetFirstToken(); 73private sealed class InvalidEditException(SyntaxToken left, SyntaxToken right) : Exception($"Left token had an end '{left.Span.End}' past the start of right token '{right.Span.Start}'") 78private readonly SyntaxToken _left = left; 79private readonly SyntaxToken _right = right;
Wrapping\SeparatedSyntaxList\AbstractSeparatedSyntaxListWrapper.cs (4)
45protected abstract SyntaxToken FirstToken(TListSyntax listSyntax); 46protected abstract SyntaxToken LastToken(TListSyntax listSyntax); 59var firstToken = FirstToken(listSyntax); 60var lastToken = LastToken(listSyntax);
Wrapping\SeparatedSyntaxList\SeparatedSyntaxListCodeActionComputer.cs (5)
106var openToken = _listSyntax.GetFirstToken(); 118var openToken = _listSyntax.GetFirstToken(); 132var previousToken = _listSyntax.GetFirstToken().GetPreviousToken(); 213foreach (var comma in _listItems.GetSeparators()) 443var comma = itemsAndSeparators[i].AsToken();
Microsoft.CodeAnalysis.Test.Utilities (15)
Syntax\NodeHelpers.cs (7)
36public static string GetKind(this SyntaxToken n) 46public static bool IsIdentifier(this SyntaxToken n) 51public static bool IsKeyword(this SyntaxToken n) 57public static bool IsLiteral(this SyntaxToken n) 93public static SyntaxNode GetRootNode(this SyntaxToken node) 158public static NodeInfo GetNodeInfo(this SyntaxToken token) 212private static NodeInfo.FieldInfo GetFieldInfo(PropertyInfo prop, SyntaxToken token)
Syntax\TokenUtilities.cs (6)
62private static bool SkipVisualBasicToken(SyntaxToken token) 67private static bool SkipCSharpToken(SyntaxToken token) 72public static IList<SyntaxToken> GetTokens(string text, string language) 76return CS.SyntaxFactory.ParseTokens(text).Select(t => (SyntaxToken)t).Where(t => !SkipCSharpToken(t)).ToList(); 80return VB.SyntaxFactory.ParseTokens(text).Select(t => (SyntaxToken)t).Where(t => !SkipVisualBasicToken(t)).ToList(); 84public static IList<SyntaxToken> GetTokens(SyntaxNode node)
Syntax\XmlHelpers.cs (2)
71public static void AddInfo(SyntaxToken node, XElement xml) 157public static XElement ToXml(this SyntaxToken token, SyntaxTree syntaxTree, XmlOptions options = null)
Microsoft.CodeAnalysis.UnitTests (12)
CommonSyntaxTests.cs (10)
86SyntaxToken token = node.DescendantTokens().Single(); 102SyntaxToken token = node.DescendantTokens().Single(); 112var csharpToken = CSharp.SyntaxFactory.ParseExpression("1 + 123 /*hello*/").GetLastToken(); 131var commonToken = (SyntaxToken)csharpToken; 149var vbToken = VB.SyntaxFactory.ParseExpression("1 + 123 'hello").GetLastToken(); 168var commonToken = (SyntaxToken)vbToken; 188var token = CSharp.SyntaxFactory.Token(CSharp.SyntaxKind.IfKeyword); 199var token = VisualBasic.SyntaxFactory.Token(VisualBasic.SyntaxKind.IfKeyword);
Diagnostics\SuppressMessageTargetSymbolResolverTests.cs (1)
1397var token = model.SyntaxTree.GetRoot().FindToken(pos);
Symbols\DocumentationCommentIdTests.cs (1)
178var token = root.FindToken(text.IndexOf('+'));
Microsoft.CodeAnalysis.VisualBasic (2328)
Analysis\FlowAnalysis\DataFlowPass.Symbols.vb (1)
70Friend Overrides ReadOnly Property IdentifierToken As SyntaxToken
Binding\BackstopBinder.vb (1)
257Friend Overrides Function LookupLabelByNameToken(labelName As SyntaxToken) As LabelSymbol
Binding\Binder.vb (1)
242Friend Overridable Function LookupLabelByNameToken(labelName As SyntaxToken) As LabelSymbol
Binding\Binder_AnonymousTypes.vb (3)
107typeLocationToken As SyntaxToken, 156Dim fieldNameToken As SyntaxToken = inferredFieldInitializer.Expression.ExtractAnonymousTypeMemberName(Nothing) 212typeLocationToken As SyntaxToken) As BoundExpression
Binding\Binder_Delegates.vb (1)
920token As SyntaxToken,
Binding\Binder_Expressions.vb (2)
512Dim nameToken As SyntaxToken = element.ExtractAnonymousTypeMemberName(ignore) 4032Private Shared Function GetNamedArgumentIdentifier(argumentExpression As SyntaxNode) As SyntaxToken
Binding\Binder_Query.vb (6)
2155Private Sub VerifyRangeVariableName(rangeVar As RangeVariableSymbol, identifier As SyntaxToken, diagnostics As BindingDiagnosticBag) 2269Private Shared Function GetQueryOperatorNameSpan(ByRef left As SyntaxToken, ByRef right As SyntaxToken) As TextSpan 2822Dim rangeVarNameSyntax As SyntaxToken = Nothing 2845Dim nameToken As SyntaxToken = item.Expression.ExtractAnonymousTypeMemberName(failedToInferFromXmlName) 4020Dim rangeVarNameSyntax As SyntaxToken = Nothing
Binding\Binder_Statements.vb (5)
927Dim labelToken As SyntaxToken = node.LabelToken 962Dim firstDim As SyntaxToken = Nothing 963Dim firstStatic As SyntaxToken = Nothing 1086Private Function GetLocalForDeclaration(identifier As SyntaxToken) As LocalSymbol 1764identifier As SyntaxToken,
Binding\Binder_Symbols.vb (5)
625Dim nameSyntax As SyntaxToken = Nothing 842Dim idSyntax As SyntaxToken = basicNameSyntax.Identifier 876Dim idSyntax As SyntaxToken = genericNameSyntax.Identifier 945Dim rightIdentToken As SyntaxToken = rightIdentSyntax.Identifier 1028Dim rightIdentSyntax As SyntaxToken = right.Identifier
Binding\Binder_Utils.vb (18)
20Public Shared Sub DisallowTypeCharacter(identifier As SyntaxToken, 28Public Shared Function DecodeVariance(varianceKeywordOpt As SyntaxToken) As VarianceKind 46ParamArray keywordKinds As SyntaxKind()) As SyntaxToken 85Friend Shared Function MapKeywordToFlag(syntax As SyntaxToken) As SourceMemberFlags 148Dim privateProtectedToken As SyntaxToken = Nothing 149Dim privateOverridableModifier As SyntaxToken = Nothing 150Dim privateMustOverrideModifier As SyntaxToken = Nothing 151Dim privateNotOverridableModifier As SyntaxToken = Nothing 400Private Shared Function HasDefaultType(identifierSyntax As SyntaxToken, 626Public Function DecodeIdentifierType(identifier As SyntaxToken, 649Public Function DecodeIdentifierType(identifier As SyntaxToken, 665Public Function DecodeIdentifierType(identifier As SyntaxToken, 779Public Shared Function DecodeOnOff(keywordSyntax As SyntaxToken) As Boolean 797Public Shared Function DecodeTextBinary(keywordSyntax As SyntaxToken) As Boolean? 925Private Shared Function CheckOperatorParameterModifier(container As Symbol, token As SyntaxToken, flag As SourceParameterFlags, diagnostics As BindingDiagnosticBag) As SourceParameterFlags 988Private Shared Function CheckPropertyParameterModifier(container As Symbol, token As SyntaxToken, flag As SourceParameterFlags, diagnostics As BindingDiagnosticBag) As SourceParameterFlags 1025Friend Delegate Function CheckParameterModifierDelegate(container As Symbol, token As SyntaxToken, flag As SourceParameterFlags, diagnostics As BindingDiagnosticBag) As SourceParameterFlags 1277Private Shared Function GetContainingTypeBlock(modifierToken As SyntaxToken) As TypeBlockSyntax
Binding\Binder_XmlLiterals.vb (3)
898Private Function ReportXmlNamespacePrefixNotDefined(syntax As VisualBasicSyntaxNode, prefixToken As SyntaxToken, prefix As String, compilerGenerated As Boolean, diagnostics As BindingDiagnosticBag) As BoundBadExpression 946Private Shared Function GetXmlString(token As SyntaxToken) As String 1298Private Shared Function GetXmlName(token As SyntaxToken) As String
Binding\BinderFactory.vb (2)
454Dim token As SyntaxToken = CType(trivia.Token, SyntaxToken)
Binding\BindingDiagnosticBag.vb (1)
94Friend Function ReportUseSite(symbol As Symbol, token As SyntaxToken) As Boolean
Binding\DocumentationCommentCrefBinder.vb (3)
50Dim identifier As SyntaxToken = DirectCast(name, IdentifierNameSyntax).Identifier 551Dim token As SyntaxToken = identifier.Identifier 629Dim token As SyntaxToken = identifier.Identifier
Binding\DocumentationCommentCrefBinder_Compat.vb (1)
316Dim identifier As SyntaxToken = DirectCast(node, IdentifierNameSyntax).Identifier
Binding\ExecutableCodeBinder.vb (1)
102Friend Overrides Function LookupLabelByNameToken(labelName As SyntaxToken) As LabelSymbol
Binding\ForOrForEachBlockBinder.vb (1)
107Private Function CreateLocalSymbol(identifier As SyntaxToken) As LocalSymbol
Binding\MemberSemanticModel.vb (1)
1638operatorKeyWord As SyntaxToken,
CommandLine\VisualBasicCommandLineParser.vb (3)
1896Dim lastSeparatorToken As SyntaxToken = Nothing 2112Private Shared Function IsSeparatorOrEndOfFile(token As SyntaxToken) As Boolean 2117tokens As IEnumerator(Of SyntaxToken),
Compilation\DocumentationComments\DocumentationCommentWalker.vb (1)
312Public Overrides Sub VisitToken(token As SyntaxToken)
Compilation\SemanticModel.vb (1)
617Dim token As SyntaxToken
Compilation\SyntaxTreeSemanticModel.vb (2)
592Dim token As SyntaxToken = CType(trivia.Token, SyntaxToken)
Errors\ErrorFactories.vb (3)
70Public Shared Function ErrorInfo(id As ERRID, ByRef syntaxToken As SyntaxToken) As DiagnosticInfo 78Public Shared Function ErrorInfo(id As ERRID, ByRef syntaxToken As SyntaxToken, type As TypeSymbol) As DiagnosticInfo 82Public Shared Function ErrorInfo(id As ERRID, ByRef syntaxToken As SyntaxToken, type1 As TypeSymbol, type2 As TypeSymbol) As DiagnosticInfo
Generated\Syntax.xml.Main.Generated.vb (683)
5692Public Shared Function EmptyStatement(empty As SyntaxToken) As EmptyStatementSyntax 5723Public Shared Function EndIfStatement(endKeyword As SyntaxToken, blockKeyword As SyntaxToken) As EndBlockStatementSyntax 5780Public Shared Function EndUsingStatement(endKeyword As SyntaxToken, blockKeyword As SyntaxToken) As EndBlockStatementSyntax 5815Public Shared Function EndWithStatement(endKeyword As SyntaxToken, blockKeyword As SyntaxToken) As EndBlockStatementSyntax 5850Public Shared Function EndSelectStatement(endKeyword As SyntaxToken, blockKeyword As SyntaxToken) As EndBlockStatementSyntax 5885Public Shared Function EndStructureStatement(endKeyword As SyntaxToken, blockKeyword As SyntaxToken) As EndBlockStatementSyntax 5920Public Shared Function EndEnumStatement(endKeyword As SyntaxToken, blockKeyword As SyntaxToken) As EndBlockStatementSyntax 5955Public Shared Function EndInterfaceStatement(endKeyword As SyntaxToken, blockKeyword As SyntaxToken) As EndBlockStatementSyntax 5990Public Shared Function EndClassStatement(endKeyword As SyntaxToken, blockKeyword As SyntaxToken) As EndBlockStatementSyntax 6025Public Shared Function EndModuleStatement(endKeyword As SyntaxToken, blockKeyword As SyntaxToken) As EndBlockStatementSyntax 6060Public Shared Function EndNamespaceStatement(endKeyword As SyntaxToken, blockKeyword As SyntaxToken) As EndBlockStatementSyntax 6095Public Shared Function EndSubStatement(endKeyword As SyntaxToken, blockKeyword As SyntaxToken) As EndBlockStatementSyntax 6130Public Shared Function EndFunctionStatement(endKeyword As SyntaxToken, blockKeyword As SyntaxToken) As EndBlockStatementSyntax 6165Public Shared Function EndGetStatement(endKeyword As SyntaxToken, blockKeyword As SyntaxToken) As EndBlockStatementSyntax 6200Public Shared Function EndSetStatement(endKeyword As SyntaxToken, blockKeyword As SyntaxToken) As EndBlockStatementSyntax 6235Public Shared Function EndPropertyStatement(endKeyword As SyntaxToken, blockKeyword As SyntaxToken) As EndBlockStatementSyntax 6270Public Shared Function EndOperatorStatement(endKeyword As SyntaxToken, blockKeyword As SyntaxToken) As EndBlockStatementSyntax 6305Public Shared Function EndEventStatement(endKeyword As SyntaxToken, blockKeyword As SyntaxToken) As EndBlockStatementSyntax 6340Public Shared Function EndAddHandlerStatement(endKeyword As SyntaxToken, blockKeyword As SyntaxToken) As EndBlockStatementSyntax 6375Public Shared Function EndRemoveHandlerStatement(endKeyword As SyntaxToken, blockKeyword As SyntaxToken) As EndBlockStatementSyntax 6410Public Shared Function EndRaiseEventStatement(endKeyword As SyntaxToken, blockKeyword As SyntaxToken) As EndBlockStatementSyntax 6445Public Shared Function EndWhileStatement(endKeyword As SyntaxToken, blockKeyword As SyntaxToken) As EndBlockStatementSyntax 6480Public Shared Function EndTryStatement(endKeyword As SyntaxToken, blockKeyword As SyntaxToken) As EndBlockStatementSyntax 6515Public Shared Function EndSyncLockStatement(endKeyword As SyntaxToken, blockKeyword As SyntaxToken) As EndBlockStatementSyntax 6560Public Shared Function EndBlockStatement(ByVal kind As SyntaxKind, endKeyword As SyntaxToken, blockKeyword As SyntaxToken) As EndBlockStatementSyntax 6647Public Shared Function EndBlockStatement(ByVal kind As SyntaxKind, blockKeyword As SyntaxToken) As EndBlockStatementSyntax 6674Public Shared Function CompilationUnit(options As SyntaxList(of OptionStatementSyntax), [imports] As SyntaxList(of ImportsStatementSyntax), attributes As SyntaxList(of AttributesStatementSyntax), members As SyntaxList(of StatementSyntax), endOfFileToken As SyntaxToken) As CompilationUnitSyntax 6729Public Shared Function OptionStatement(optionKeyword As SyntaxToken, nameKeyword As SyntaxToken, valueKeyword As SyntaxToken) As OptionStatementSyntax 6758Public Shared Function OptionStatement(nameKeyword As SyntaxToken, valueKeyword As SyntaxToken) As OptionStatementSyntax 6770Public Shared Function OptionStatement(nameKeyword As SyntaxToken) As OptionStatementSyntax 6785Public Shared Function ImportsStatement(importsKeyword As SyntaxToken, importsClauses As SeparatedSyntaxList(Of ImportsClauseSyntax)) As ImportsStatementSyntax 6864Public Shared Function ImportAliasClause(identifier As SyntaxToken, equalsToken As SyntaxToken) As ImportAliasClauseSyntax 6885Public Shared Function ImportAliasClause(identifier As SyntaxToken) As ImportAliasClauseSyntax 6907Public Shared Function XmlNamespaceImportsClause(lessThanToken As SyntaxToken, xmlNamespace As XmlAttributeSyntax, greaterThanToken As SyntaxToken) As XmlNamespaceImportsClauseSyntax 7009Public Shared Function NamespaceStatement(namespaceKeyword As SyntaxToken, name As NameSyntax) As NamespaceStatementSyntax 7406Public Shared Function InheritsStatement(inheritsKeyword As SyntaxToken, types As SeparatedSyntaxList(Of TypeSyntax)) As InheritsStatementSyntax 7447Public Shared Function ImplementsStatement(implementsKeyword As SyntaxToken, types As SeparatedSyntaxList(Of TypeSyntax)) As ImplementsStatementSyntax 7501Public Shared Function ModuleStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, moduleKeyword As SyntaxToken, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax) As ModuleStatementSyntax 7535Public Shared Function ModuleStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax) As ModuleStatementSyntax 7547Public Shared Function ModuleStatement(identifier As SyntaxToken) As ModuleStatementSyntax 7586Public Shared Function StructureStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, structureKeyword As SyntaxToken, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax) As StructureStatementSyntax 7620Public Shared Function StructureStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax) As StructureStatementSyntax 7632Public Shared Function StructureStatement(identifier As SyntaxToken) As StructureStatementSyntax 7671Public Shared Function InterfaceStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, interfaceKeyword As SyntaxToken, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax) As InterfaceStatementSyntax 7705Public Shared Function InterfaceStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax) As InterfaceStatementSyntax 7717Public Shared Function InterfaceStatement(identifier As SyntaxToken) As InterfaceStatementSyntax 7756Public Shared Function ClassStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, classKeyword As SyntaxToken, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax) As ClassStatementSyntax 7790Public Shared Function ClassStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax) As ClassStatementSyntax 7802Public Shared Function ClassStatement(identifier As SyntaxToken) As ClassStatementSyntax 7841Public Shared Function EnumStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, enumKeyword As SyntaxToken, identifier As SyntaxToken, underlyingType As AsClauseSyntax) As EnumStatementSyntax 7875Public Shared Function EnumStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, identifier As SyntaxToken, underlyingType As AsClauseSyntax) As EnumStatementSyntax 7887Public Shared Function EnumStatement(identifier As SyntaxToken) As EnumStatementSyntax 7920Public Shared Function TypeParameterList(openParenToken As SyntaxToken, ofKeyword As SyntaxToken, parameters As SeparatedSyntaxList(Of TypeParameterSyntax), closeParenToken As SyntaxToken) As TypeParameterListSyntax 7978Public Shared Function TypeParameter(varianceKeyword As SyntaxToken, identifier As SyntaxToken, typeParameterConstraintClause As TypeParameterConstraintClauseSyntax) As TypeParameterSyntax 7994Public Shared Function TypeParameter(identifier As SyntaxToken) As TypeParameterSyntax 8022Public Shared Function TypeParameterSingleConstraintClause(asKeyword As SyntaxToken, constraint As ConstraintSyntax) As TypeParameterSingleConstraintClauseSyntax 8073Public Shared Function TypeParameterMultipleConstraintClause(asKeyword As SyntaxToken, openBraceToken As SyntaxToken, constraints As SeparatedSyntaxList(Of ConstraintSyntax), closeBraceToken As SyntaxToken) As TypeParameterMultipleConstraintClauseSyntax 8128Public Shared Function NewConstraint(constraintKeyword As SyntaxToken) As SpecialConstraintSyntax 8149Public Shared Function ClassConstraint(constraintKeyword As SyntaxToken) As SpecialConstraintSyntax 8170Public Shared Function StructureConstraint(constraintKeyword As SyntaxToken) As SpecialConstraintSyntax 8196Public Shared Function SpecialConstraint(ByVal kind As SyntaxKind, constraintKeyword As SyntaxToken) As SpecialConstraintSyntax 8245Public Shared Function EnumMemberDeclaration(attributeLists As SyntaxList(of AttributeListSyntax), identifier As SyntaxToken, initializer As EqualsValueSyntax) As EnumMemberDeclarationSyntax 8258Public Shared Function EnumMemberDeclaration(identifier As SyntaxToken) As EnumMemberDeclarationSyntax 9153Public Shared Function ParameterList(openParenToken As SyntaxToken, parameters As SeparatedSyntaxList(Of ParameterSyntax), closeParenToken As SyntaxToken) As ParameterListSyntax 9228Public Shared Function SubStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, subOrFunctionKeyword As SyntaxToken, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax, handlesClause As HandlesClauseSyntax, implementsClause As ImplementsClauseSyntax) As MethodStatementSyntax 9282Public Shared Function SubStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax, handlesClause As HandlesClauseSyntax, implementsClause As ImplementsClauseSyntax) As MethodStatementSyntax 9296Public Shared Function SubStatement(identifier As SyntaxToken) As MethodStatementSyntax 9356Public Shared Function FunctionStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, subOrFunctionKeyword As SyntaxToken, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax, handlesClause As HandlesClauseSyntax, implementsClause As ImplementsClauseSyntax) As MethodStatementSyntax 9409Public Shared Function FunctionStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax, handlesClause As HandlesClauseSyntax, implementsClause As ImplementsClauseSyntax) As MethodStatementSyntax 9423Public Shared Function FunctionStatement(identifier As SyntaxToken) As MethodStatementSyntax 9487Public Shared Function MethodStatement(ByVal kind As SyntaxKind, attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, subOrFunctionKeyword As SyntaxToken, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax, handlesClause As HandlesClauseSyntax, implementsClause As ImplementsClauseSyntax) As MethodStatementSyntax 9529Public Shared Function MethodStatement(ByVal kind As SyntaxKind, subOrFunctionKeyword As SyntaxToken, identifier As SyntaxToken) As MethodStatementSyntax 9550Public Shared Function MethodStatement(ByVal kind As SyntaxKind, subOrFunctionKeyword As SyntaxToken, identifier As String) As MethodStatementSyntax 9580Public Shared Function SubNewStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, subKeyword As SyntaxToken, newKeyword As SyntaxToken, parameterList As ParameterListSyntax) As SubNewStatementSyntax 9675Public Shared Function DeclareSubStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, declareKeyword As SyntaxToken, charsetKeyword As SyntaxToken, subOrFunctionKeyword As SyntaxToken, identifier As SyntaxToken, libKeyword As SyntaxToken, libraryName As LiteralExpressionSyntax, aliasKeyword As SyntaxToken, aliasName As LiteralExpressionSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax) As DeclareStatementSyntax 9749Public Shared Function DeclareSubStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, charsetKeyword As SyntaxToken, identifier As SyntaxToken, libraryName As LiteralExpressionSyntax, aliasName As LiteralExpressionSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax) As DeclareStatementSyntax 9763Public Shared Function DeclareSubStatement(identifier As SyntaxToken, libraryName As LiteralExpressionSyntax) As DeclareStatementSyntax 9828Public Shared Function DeclareFunctionStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, declareKeyword As SyntaxToken, charsetKeyword As SyntaxToken, subOrFunctionKeyword As SyntaxToken, identifier As SyntaxToken, libKeyword As SyntaxToken, libraryName As LiteralExpressionSyntax, aliasKeyword As SyntaxToken, aliasName As LiteralExpressionSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax) As DeclareStatementSyntax 9901Public Shared Function DeclareFunctionStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, charsetKeyword As SyntaxToken, identifier As SyntaxToken, libraryName As LiteralExpressionSyntax, aliasName As LiteralExpressionSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax) As DeclareStatementSyntax 9915Public Shared Function DeclareFunctionStatement(identifier As SyntaxToken, libraryName As LiteralExpressionSyntax) As DeclareStatementSyntax 9984Public Shared Function DeclareStatement(ByVal kind As SyntaxKind, attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, declareKeyword As SyntaxToken, charsetKeyword As SyntaxToken, subOrFunctionKeyword As SyntaxToken, identifier As SyntaxToken, libKeyword As SyntaxToken, libraryName As LiteralExpressionSyntax, aliasKeyword As SyntaxToken, aliasName As LiteralExpressionSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax) As DeclareStatementSyntax 10075Public Shared Function DeclareStatement(ByVal kind As SyntaxKind, attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, charsetKeyword As SyntaxToken, subOrFunctionKeyword As SyntaxToken, identifier As SyntaxToken, libraryName As LiteralExpressionSyntax, aliasName As LiteralExpressionSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax) As DeclareStatementSyntax 10096Public Shared Function DeclareStatement(ByVal kind As SyntaxKind, subOrFunctionKeyword As SyntaxToken, identifier As SyntaxToken, libraryName As LiteralExpressionSyntax) As DeclareStatementSyntax 10117Public Shared Function DeclareStatement(ByVal kind As SyntaxKind, subOrFunctionKeyword As SyntaxToken, identifier As String, libraryName As LiteralExpressionSyntax) As DeclareStatementSyntax 10156Public Shared Function DelegateSubStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, delegateKeyword As SyntaxToken, subOrFunctionKeyword As SyntaxToken, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax) As DelegateStatementSyntax 10205Public Shared Function DelegateSubStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax) As DelegateStatementSyntax 10216Public Shared Function DelegateSubStatement(identifier As SyntaxToken) As DelegateStatementSyntax 10266Public Shared Function DelegateFunctionStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, delegateKeyword As SyntaxToken, subOrFunctionKeyword As SyntaxToken, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax) As DelegateStatementSyntax 10314Public Shared Function DelegateFunctionStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax) As DelegateStatementSyntax 10325Public Shared Function DelegateFunctionStatement(identifier As SyntaxToken) As DelegateStatementSyntax 10380Public Shared Function DelegateStatement(ByVal kind As SyntaxKind, attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, delegateKeyword As SyntaxToken, subOrFunctionKeyword As SyntaxToken, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax) As DelegateStatementSyntax 10447Public Shared Function DelegateStatement(ByVal kind As SyntaxKind, attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, subOrFunctionKeyword As SyntaxToken, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax) As DelegateStatementSyntax 10466Public Shared Function DelegateStatement(ByVal kind As SyntaxKind, subOrFunctionKeyword As SyntaxToken, identifier As SyntaxToken) As DelegateStatementSyntax 10485Public Shared Function DelegateStatement(ByVal kind As SyntaxKind, subOrFunctionKeyword As SyntaxToken, identifier As String) As DelegateStatementSyntax 10526Public Shared Function EventStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, customKeyword As SyntaxToken, eventKeyword As SyntaxToken, identifier As SyntaxToken, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax, implementsClause As ImplementsClauseSyntax) As EventStatementSyntax 10571Public Shared Function EventStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, identifier As SyntaxToken, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax, implementsClause As ImplementsClauseSyntax) As EventStatementSyntax 10584Public Shared Function EventStatement(identifier As SyntaxToken) As EventStatementSyntax 10632Public Shared Function OperatorStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, operatorKeyword As SyntaxToken, operatorToken As SyntaxToken, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax) As OperatorStatementSyntax 10697Public Shared Function OperatorStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, operatorToken As SyntaxToken, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax) As OperatorStatementSyntax 10711Public Shared Function OperatorStatement(operatorToken As SyntaxToken) As OperatorStatementSyntax 10754Public Shared Function PropertyStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, propertyKeyword As SyntaxToken, identifier As SyntaxToken, parameterList As ParameterListSyntax, asClause As AsClauseSyntax, initializer As EqualsValueSyntax, implementsClause As ImplementsClauseSyntax) As PropertyStatementSyntax 10804Public Shared Function PropertyStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, identifier As SyntaxToken, parameterList As ParameterListSyntax, asClause As AsClauseSyntax, initializer As EqualsValueSyntax, implementsClause As ImplementsClauseSyntax) As PropertyStatementSyntax 10818Public Shared Function PropertyStatement(identifier As SyntaxToken) As PropertyStatementSyntax 10861Public Shared Function GetAccessorStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, accessorKeyword As SyntaxToken, parameterList As ParameterListSyntax) As AccessorStatementSyntax 10935Public Shared Function SetAccessorStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, accessorKeyword As SyntaxToken, parameterList As ParameterListSyntax) As AccessorStatementSyntax 11005Public Shared Function AddHandlerAccessorStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, accessorKeyword As SyntaxToken, parameterList As ParameterListSyntax) As AccessorStatementSyntax 11075Public Shared Function RemoveHandlerAccessorStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, accessorKeyword As SyntaxToken, parameterList As ParameterListSyntax) As AccessorStatementSyntax 11145Public Shared Function RaiseEventAccessorStatement(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, accessorKeyword As SyntaxToken, parameterList As ParameterListSyntax) As AccessorStatementSyntax 11221Public Shared Function AccessorStatement(ByVal kind As SyntaxKind, attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, accessorKeyword As SyntaxToken, parameterList As ParameterListSyntax) As AccessorStatementSyntax 11264Public Shared Function AccessorStatement(ByVal kind As SyntaxKind, accessorKeyword As SyntaxToken) As AccessorStatementSyntax 11279Public Shared Function ImplementsClause(implementsKeyword As SyntaxToken, interfaceMembers As SeparatedSyntaxList(Of QualifiedNameSyntax)) As ImplementsClauseSyntax 11323Public Shared Function HandlesClause(handlesKeyword As SyntaxToken, events As SeparatedSyntaxList(Of HandlesClauseItemSyntax)) As HandlesClauseSyntax 11365Public Shared Function KeywordEventContainer(keyword As SyntaxToken) As KeywordEventContainerSyntax 11384Public Shared Function WithEventsEventContainer(identifier As SyntaxToken) As WithEventsEventContainerSyntax 11419Public Shared Function WithEventsPropertyEventContainer(withEventsContainer As WithEventsEventContainerSyntax, dotToken As SyntaxToken, [property] As IdentifierNameSyntax) As WithEventsPropertyEventContainerSyntax 11474Public Shared Function HandlesClauseItem(eventContainer As EventContainerSyntax, dotToken As SyntaxToken, eventMember As IdentifierNameSyntax) As HandlesClauseItemSyntax 11534Public Shared Function IncompleteMember(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, missingIdentifier As SyntaxToken) As IncompleteMemberSyntax 11664Public Shared Function SimpleAsClause(asKeyword As SyntaxToken, attributeLists As SyntaxList(of AttributeListSyntax), type As TypeSyntax) As SimpleAsClauseSyntax 11733Public Shared Function AsNewClause(asKeyword As SyntaxToken, newExpression As NewExpressionSyntax) As AsNewClauseSyntax 11782Public Shared Function ObjectMemberInitializer(withKeyword As SyntaxToken, openBraceToken As SyntaxToken, initializers As SeparatedSyntaxList(Of FieldInitializerSyntax), closeBraceToken As SyntaxToken) As ObjectMemberInitializerSyntax 11834Public Shared Function ObjectCollectionInitializer(fromKeyword As SyntaxToken, initializer As CollectionInitializerSyntax) As ObjectCollectionInitializerSyntax 11874Public Shared Function InferredFieldInitializer(keyKeyword As SyntaxToken, expression As ExpressionSyntax) As InferredFieldInitializerSyntax 11920Public Shared Function NamedFieldInitializer(keyKeyword As SyntaxToken, dotToken As SyntaxToken, name As IdentifierNameSyntax, equalsToken As SyntaxToken, expression As ExpressionSyntax) As NamedFieldInitializerSyntax 12080Public Shared Function EqualsValue(equalsToken As SyntaxToken, value As ExpressionSyntax) As EqualsValueSyntax 12277Public Shared Function ModifiedIdentifier(identifier As SyntaxToken, nullable As SyntaxToken, arrayBounds As ArgumentListSyntax, arrayRankSpecifiers As SyntaxList(of ArrayRankSpecifierSyntax)) As ModifiedIdentifierSyntax 12297Public Shared Function ModifiedIdentifier(identifier As SyntaxToken, arrayBounds As ArgumentListSyntax) As ModifiedIdentifierSyntax 12309Public Shared Function ModifiedIdentifier(identifier As SyntaxToken) As ModifiedIdentifierSyntax 12339Public Shared Function ArrayRankSpecifier(openParenToken As SyntaxToken, commaTokens As SyntaxTokenList, closeParenToken As SyntaxToken) As ArrayRankSpecifierSyntax 12375Public Shared Function AttributeList(lessThanToken As SyntaxToken, attributes As SeparatedSyntaxList(Of AttributeSyntax), greaterThanToken As SyntaxToken) As AttributeListSyntax 12464Public Shared Function AttributeTarget(attributeModifier As SyntaxToken, colonToken As SyntaxToken) As AttributeTargetSyntax 12487Public Shared Function AttributeTarget(attributeModifier As SyntaxToken) As AttributeTargetSyntax 12647Public Shared Function PrintStatement(questionToken As SyntaxToken, expression As ExpressionSyntax) As PrintStatementSyntax 13056Public Shared Function LabelStatement(labelToken As SyntaxToken, colonToken As SyntaxToken) As LabelStatementSyntax 13079Public Shared Function LabelStatement(labelToken As SyntaxToken) As LabelStatementSyntax 13106Public Shared Function GoToStatement(goToKeyword As SyntaxToken, label As LabelSyntax) As GoToStatementSyntax 13146Public Shared Function IdentifierLabel(labelToken As SyntaxToken) As LabelSyntax 13179Public Shared Function NumericLabel(labelToken As SyntaxToken) As LabelSyntax 13206Public Shared Function NextLabel(labelToken As SyntaxToken) As LabelSyntax 13237Public Shared Function Label(ByVal kind As SyntaxKind, labelToken As SyntaxToken) As LabelSyntax 13284Public Shared Function StopStatement(stopOrEndKeyword As SyntaxToken) As StopOrEndStatementSyntax 13302Public Shared Function EndStatement(stopOrEndKeyword As SyntaxToken) As StopOrEndStatementSyntax 13324Public Shared Function StopOrEndStatement(ByVal kind As SyntaxKind, stopOrEndKeyword As SyntaxToken) As StopOrEndStatementSyntax 13348Public Shared Function ExitDoStatement(exitKeyword As SyntaxToken, blockKeyword As SyntaxToken) As ExitStatementSyntax 13390Public Shared Function ExitForStatement(exitKeyword As SyntaxToken, blockKeyword As SyntaxToken) As ExitStatementSyntax 13424Public Shared Function ExitSubStatement(exitKeyword As SyntaxToken, blockKeyword As SyntaxToken) As ExitStatementSyntax 13458Public Shared Function ExitFunctionStatement(exitKeyword As SyntaxToken, blockKeyword As SyntaxToken) As ExitStatementSyntax 13492Public Shared Function ExitOperatorStatement(exitKeyword As SyntaxToken, blockKeyword As SyntaxToken) As ExitStatementSyntax 13526Public Shared Function ExitPropertyStatement(exitKeyword As SyntaxToken, blockKeyword As SyntaxToken) As ExitStatementSyntax 13560Public Shared Function ExitTryStatement(exitKeyword As SyntaxToken, blockKeyword As SyntaxToken) As ExitStatementSyntax 13594Public Shared Function ExitSelectStatement(exitKeyword As SyntaxToken, blockKeyword As SyntaxToken) As ExitStatementSyntax 13628Public Shared Function ExitWhileStatement(exitKeyword As SyntaxToken, blockKeyword As SyntaxToken) As ExitStatementSyntax 13669Public Shared Function ExitStatement(ByVal kind As SyntaxKind, exitKeyword As SyntaxToken, blockKeyword As SyntaxToken) As ExitStatementSyntax 13723Public Shared Function ExitStatement(ByVal kind As SyntaxKind, blockKeyword As SyntaxToken) As ExitStatementSyntax 13739Public Shared Function ContinueWhileStatement(continueKeyword As SyntaxToken, blockKeyword As SyntaxToken) As ContinueStatementSyntax 13776Public Shared Function ContinueDoStatement(continueKeyword As SyntaxToken, blockKeyword As SyntaxToken) As ContinueStatementSyntax 13811Public Shared Function ContinueForStatement(continueKeyword As SyntaxToken, blockKeyword As SyntaxToken) As ContinueStatementSyntax 13851Public Shared Function ContinueStatement(ByVal kind As SyntaxKind, continueKeyword As SyntaxToken, blockKeyword As SyntaxToken) As ContinueStatementSyntax 13892Public Shared Function ContinueStatement(ByVal kind As SyntaxKind, blockKeyword As SyntaxToken) As ContinueStatementSyntax 13906Public Shared Function ReturnStatement(returnKeyword As SyntaxToken, expression As ExpressionSyntax) As ReturnStatementSyntax 13954Public Shared Function SingleLineIfStatement(ifKeyword As SyntaxToken, condition As ExpressionSyntax, thenKeyword As SyntaxToken, statements As SyntaxList(of StatementSyntax), elseClause As SingleLineElseClauseSyntax) As SingleLineIfStatementSyntax 14120Public Shared Function SingleLineElseClause(elseKeyword As SyntaxToken, statements As SyntaxList(of StatementSyntax)) As SingleLineElseClauseSyntax 14241Public Shared Function IfStatement(ifKeyword As SyntaxToken, condition As ExpressionSyntax, thenKeyword As SyntaxToken) As IfStatementSyntax 14420Public Shared Function ElseIfStatement(elseIfKeyword As SyntaxToken, condition As ExpressionSyntax, thenKeyword As SyntaxToken) As ElseIfStatementSyntax 14600Public Shared Function ElseStatement(elseKeyword As SyntaxToken) As ElseStatementSyntax 14690Public Shared Function TryStatement(tryKeyword As SyntaxToken) As TryStatementSyntax 14758Public Shared Function CatchStatement(catchKeyword As SyntaxToken, identifierName As IdentifierNameSyntax, asClause As SimpleAsClauseSyntax, whenClause As CatchFilterClauseSyntax) As CatchStatementSyntax 14803Public Shared Function CatchFilterClause(whenKeyword As SyntaxToken, filter As ExpressionSyntax) As CatchFilterClauseSyntax 14983Public Shared Function FinallyStatement(finallyKeyword As SyntaxToken) As FinallyStatementSyntax 15010Public Shared Function ErrorStatement(errorKeyword As SyntaxToken, errorNumber As ExpressionSyntax) As ErrorStatementSyntax 15162Public Shared Function OnErrorGoToZeroStatement(onKeyword As SyntaxToken, errorKeyword As SyntaxToken, goToKeyword As SyntaxToken, minus As SyntaxToken, label As LabelSyntax) As OnErrorGoToStatementSyntax 15223Public Shared Function OnErrorGoToMinusOneStatement(onKeyword As SyntaxToken, errorKeyword As SyntaxToken, goToKeyword As SyntaxToken, minus As SyntaxToken, label As LabelSyntax) As OnErrorGoToStatementSyntax 15284Public Shared Function OnErrorGoToLabelStatement(onKeyword As SyntaxToken, errorKeyword As SyntaxToken, goToKeyword As SyntaxToken, minus As SyntaxToken, label As LabelSyntax) As OnErrorGoToStatementSyntax 15350Public Shared Function OnErrorGoToStatement(ByVal kind As SyntaxKind, onKeyword As SyntaxToken, errorKeyword As SyntaxToken, goToKeyword As SyntaxToken, minus As SyntaxToken, label As LabelSyntax) As OnErrorGoToStatementSyntax 15415Public Shared Function OnErrorResumeNextStatement(onKeyword As SyntaxToken, errorKeyword As SyntaxToken, resumeKeyword As SyntaxToken, nextKeyword As SyntaxToken) As OnErrorResumeNextStatementSyntax 15460Public Shared Function ResumeStatement(resumeKeyword As SyntaxToken, label As LabelSyntax) As ResumeStatementSyntax 15505Public Shared Function ResumeLabelStatement(resumeKeyword As SyntaxToken, label As LabelSyntax) As ResumeStatementSyntax 15550Public Shared Function ResumeNextStatement(resumeKeyword As SyntaxToken, label As LabelSyntax) As ResumeStatementSyntax 15600Public Shared Function ResumeStatement(ByVal kind As SyntaxKind, resumeKeyword As SyntaxToken, label As LabelSyntax) As ResumeStatementSyntax 15720Public Shared Function SelectStatement(selectKeyword As SyntaxToken, caseKeyword As SyntaxToken, expression As ExpressionSyntax) As SelectStatementSyntax 15979Public Shared Function CaseStatement(caseKeyword As SyntaxToken, cases As SeparatedSyntaxList(Of CaseClauseSyntax)) As CaseStatementSyntax 16029Public Shared Function CaseElseStatement(caseKeyword As SyntaxToken, cases As SeparatedSyntaxList(Of CaseClauseSyntax)) As CaseStatementSyntax 16083Public Shared Function CaseStatement(ByVal kind As SyntaxKind, caseKeyword As SyntaxToken, cases As SeparatedSyntaxList(Of CaseClauseSyntax)) As CaseStatementSyntax 16138Public Shared Function ElseCaseClause(elseKeyword As SyntaxToken) As ElseCaseClauseSyntax 16291Public Shared Function RangeCaseClause(lowerBound As ExpressionSyntax, toKeyword As SyntaxToken, upperBound As ExpressionSyntax) As RangeCaseClauseSyntax 16552Public Shared Function CaseEqualsClause(isKeyword As SyntaxToken, operatorToken As SyntaxToken, value As ExpressionSyntax) As RelationalCaseClauseSyntax 16703Public Shared Function CaseNotEqualsClause(isKeyword As SyntaxToken, operatorToken As SyntaxToken, value As ExpressionSyntax) As RelationalCaseClauseSyntax 16849Public Shared Function CaseLessThanClause(isKeyword As SyntaxToken, operatorToken As SyntaxToken, value As ExpressionSyntax) As RelationalCaseClauseSyntax 16995Public Shared Function CaseLessThanOrEqualClause(isKeyword As SyntaxToken, operatorToken As SyntaxToken, value As ExpressionSyntax) As RelationalCaseClauseSyntax 17141Public Shared Function CaseGreaterThanOrEqualClause(isKeyword As SyntaxToken, operatorToken As SyntaxToken, value As ExpressionSyntax) As RelationalCaseClauseSyntax 17287Public Shared Function CaseGreaterThanClause(isKeyword As SyntaxToken, operatorToken As SyntaxToken, value As ExpressionSyntax) As RelationalCaseClauseSyntax 17439Public Shared Function RelationalCaseClause(ByVal kind As SyntaxKind, isKeyword As SyntaxToken, operatorToken As SyntaxToken, value As ExpressionSyntax) As RelationalCaseClauseSyntax 17596Public Shared Function RelationalCaseClause(ByVal kind As SyntaxKind, operatorToken As SyntaxToken, value As ExpressionSyntax) As RelationalCaseClauseSyntax 17611Public Shared Function SyncLockStatement(syncLockKeyword As SyntaxToken, expression As ExpressionSyntax) As SyncLockStatementSyntax 18094Public Shared Function SimpleDoStatement(doKeyword As SyntaxToken, whileOrUntilClause As WhileOrUntilClauseSyntax) As DoStatementSyntax 18134Public Shared Function DoWhileStatement(doKeyword As SyntaxToken, whileOrUntilClause As WhileOrUntilClauseSyntax) As DoStatementSyntax 18174Public Shared Function DoUntilStatement(doKeyword As SyntaxToken, whileOrUntilClause As WhileOrUntilClauseSyntax) As DoStatementSyntax 18218Public Shared Function DoStatement(ByVal kind As SyntaxKind, doKeyword As SyntaxToken, whileOrUntilClause As WhileOrUntilClauseSyntax) As DoStatementSyntax 18279Public Shared Function SimpleLoopStatement(loopKeyword As SyntaxToken, whileOrUntilClause As WhileOrUntilClauseSyntax) As LoopStatementSyntax 18319Public Shared Function LoopWhileStatement(loopKeyword As SyntaxToken, whileOrUntilClause As WhileOrUntilClauseSyntax) As LoopStatementSyntax 18359Public Shared Function LoopUntilStatement(loopKeyword As SyntaxToken, whileOrUntilClause As WhileOrUntilClauseSyntax) As LoopStatementSyntax 18404Public Shared Function LoopStatement(ByVal kind As SyntaxKind, loopKeyword As SyntaxToken, whileOrUntilClause As WhileOrUntilClauseSyntax) As LoopStatementSyntax 18468Public Shared Function WhileClause(whileOrUntilKeyword As SyntaxToken, condition As ExpressionSyntax) As WhileOrUntilClauseSyntax 18614Public Shared Function UntilClause(whileOrUntilKeyword As SyntaxToken, condition As ExpressionSyntax) As WhileOrUntilClauseSyntax 18764Public Shared Function WhileOrUntilClause(ByVal kind As SyntaxKind, whileOrUntilKeyword As SyntaxToken, condition As ExpressionSyntax) As WhileOrUntilClauseSyntax 18907Public Shared Function WhileStatement(whileKeyword As SyntaxToken, condition As ExpressionSyntax) As WhileStatementSyntax 19157Public Shared Function ForStatement(forKeyword As SyntaxToken, controlVariable As VisualBasicSyntaxNode, equalsToken As SyntaxToken, fromValue As ExpressionSyntax, toKeyword As SyntaxToken, toValue As ExpressionSyntax, stepClause As ForStepClauseSyntax) As ForStatementSyntax 19576Public Shared Function ForStepClause(stepKeyword As SyntaxToken, stepValue As ExpressionSyntax) As ForStepClauseSyntax 19736Public Shared Function ForEachStatement(forKeyword As SyntaxToken, eachKeyword As SyntaxToken, controlVariable As VisualBasicSyntaxNode, inKeyword As SyntaxToken, expression As ExpressionSyntax) As ForEachStatementSyntax 20016Public Shared Function NextStatement(nextKeyword As SyntaxToken, controlVariables As SeparatedSyntaxList(Of ExpressionSyntax)) As NextStatementSyntax 20067Public Shared Function UsingStatement(usingKeyword As SyntaxToken, expression As ExpressionSyntax, variables As SeparatedSyntaxList(Of VariableDeclaratorSyntax)) As UsingStatementSyntax 20114Public Shared Function ThrowStatement(throwKeyword As SyntaxToken, expression As ExpressionSyntax) As ThrowStatementSyntax 20157Public Shared Function SimpleAssignmentStatement(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As AssignmentStatementSyntax 20429Public Shared Function MidAssignmentStatement(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As AssignmentStatementSyntax 20692Public Shared Function AddAssignmentStatement(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As AssignmentStatementSyntax 20955Public Shared Function SubtractAssignmentStatement(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As AssignmentStatementSyntax 21218Public Shared Function MultiplyAssignmentStatement(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As AssignmentStatementSyntax 21481Public Shared Function DivideAssignmentStatement(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As AssignmentStatementSyntax 21744Public Shared Function IntegerDivideAssignmentStatement(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As AssignmentStatementSyntax 22007Public Shared Function ExponentiateAssignmentStatement(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As AssignmentStatementSyntax 22270Public Shared Function LeftShiftAssignmentStatement(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As AssignmentStatementSyntax 22533Public Shared Function RightShiftAssignmentStatement(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As AssignmentStatementSyntax 22796Public Shared Function ConcatenateAssignmentStatement(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As AssignmentStatementSyntax 23068Public Shared Function AssignmentStatement(ByVal kind As SyntaxKind, left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As AssignmentStatementSyntax 23340Public Shared Function MidExpression(mid As SyntaxToken, argumentList As ArgumentListSyntax) As MidExpressionSyntax 23382Public Shared Function CallStatement(callKeyword As SyntaxToken, invocation As ExpressionSyntax) As CallStatementSyntax 23429Public Shared Function AddHandlerStatement(addHandlerOrRemoveHandlerKeyword As SyntaxToken, eventExpression As ExpressionSyntax, commaToken As SyntaxToken, delegateExpression As ExpressionSyntax) As AddRemoveHandlerStatementSyntax 23700Public Shared Function RemoveHandlerStatement(addHandlerOrRemoveHandlerKeyword As SyntaxToken, eventExpression As ExpressionSyntax, commaToken As SyntaxToken, delegateExpression As ExpressionSyntax) As AddRemoveHandlerStatementSyntax 23975Public Shared Function AddRemoveHandlerStatement(ByVal kind As SyntaxKind, addHandlerOrRemoveHandlerKeyword As SyntaxToken, eventExpression As ExpressionSyntax, commaToken As SyntaxToken, delegateExpression As ExpressionSyntax) As AddRemoveHandlerStatementSyntax 24243Public Shared Function AddRemoveHandlerStatement(ByVal kind As SyntaxKind, addHandlerOrRemoveHandlerKeyword As SyntaxToken, eventExpression As ExpressionSyntax, delegateExpression As ExpressionSyntax) As AddRemoveHandlerStatementSyntax 24260Public Shared Function RaiseEventStatement(raiseEventKeyword As SyntaxToken, name As IdentifierNameSyntax, argumentList As ArgumentListSyntax) As RaiseEventStatementSyntax 24314Public Shared Function WithStatement(withKeyword As SyntaxToken, expression As ExpressionSyntax) As WithStatementSyntax 24462Public Shared Function ReDimStatement(reDimKeyword As SyntaxToken, preserveKeyword As SyntaxToken, clauses As SeparatedSyntaxList(Of RedimClauseSyntax)) As ReDimStatementSyntax 24507Public Shared Function ReDimPreserveStatement(reDimKeyword As SyntaxToken, preserveKeyword As SyntaxToken, clauses As SeparatedSyntaxList(Of RedimClauseSyntax)) As ReDimStatementSyntax 24556Public Shared Function ReDimStatement(ByVal kind As SyntaxKind, reDimKeyword As SyntaxToken, preserveKeyword As SyntaxToken, clauses As SeparatedSyntaxList(Of RedimClauseSyntax)) As ReDimStatementSyntax 24742Public Shared Function EraseStatement(eraseKeyword As SyntaxToken, expressions As SeparatedSyntaxList(Of ExpressionSyntax)) As EraseStatementSyntax 24792Public Shared Function CharacterLiteralExpression(token As SyntaxToken) As LiteralExpressionSyntax 24828Public Shared Function TrueLiteralExpression(token As SyntaxToken) As LiteralExpressionSyntax 24864Public Shared Function FalseLiteralExpression(token As SyntaxToken) As LiteralExpressionSyntax 24900Public Shared Function NumericLiteralExpression(token As SyntaxToken) As LiteralExpressionSyntax 24936Public Shared Function DateLiteralExpression(token As SyntaxToken) As LiteralExpressionSyntax 24972Public Shared Function StringLiteralExpression(token As SyntaxToken) As LiteralExpressionSyntax 25008Public Shared Function NothingLiteralExpression(token As SyntaxToken) As LiteralExpressionSyntax 25050Public Shared Function LiteralExpression(ByVal kind As SyntaxKind, token As SyntaxToken) As LiteralExpressionSyntax 25083Public Shared Function ParenthesizedExpression(openParenToken As SyntaxToken, expression As ExpressionSyntax, closeParenToken As SyntaxToken) As ParenthesizedExpressionSyntax 25233Public Shared Function TupleExpression(openParenToken As SyntaxToken, arguments As SeparatedSyntaxList(Of SimpleArgumentSyntax), closeParenToken As SyntaxToken) As TupleExpressionSyntax 25282Public Shared Function TupleType(openParenToken As SyntaxToken, elements As SeparatedSyntaxList(Of TupleElementSyntax), closeParenToken As SyntaxToken) As TupleTypeSyntax 25357Public Shared Function NamedTupleElement(identifier As SyntaxToken, asClause As SimpleAsClauseSyntax) As NamedTupleElementSyntax 25374Public Shared Function NamedTupleElement(identifier As SyntaxToken) As NamedTupleElementSyntax 25397Public Shared Function MeExpression(keyword As SyntaxToken) As MeExpressionSyntax 25423Public Shared Function MyBaseExpression(keyword As SyntaxToken) As MyBaseExpressionSyntax 25447Public Shared Function MyClassExpression(keyword As SyntaxToken) As MyClassExpressionSyntax 25480Public Shared Function GetTypeExpression(getTypeKeyword As SyntaxToken, openParenToken As SyntaxToken, type As TypeSyntax, closeParenToken As SyntaxToken) As GetTypeExpressionSyntax 25543Public Shared Function TypeOfIsExpression(typeOfKeyword As SyntaxToken, expression As ExpressionSyntax, operatorToken As SyntaxToken, type As TypeSyntax) As TypeOfExpressionSyntax 25717Public Shared Function TypeOfIsNotExpression(typeOfKeyword As SyntaxToken, expression As ExpressionSyntax, operatorToken As SyntaxToken, type As TypeSyntax) As TypeOfExpressionSyntax 25894Public Shared Function TypeOfExpression(ByVal kind As SyntaxKind, typeOfKeyword As SyntaxToken, expression As ExpressionSyntax, operatorToken As SyntaxToken, type As TypeSyntax) As TypeOfExpressionSyntax 26065Public Shared Function TypeOfExpression(ByVal kind As SyntaxKind, expression As ExpressionSyntax, operatorToken As SyntaxToken, type As TypeSyntax) As TypeOfExpressionSyntax 26085Public Shared Function GetXmlNamespaceExpression(getXmlNamespaceKeyword As SyntaxToken, openParenToken As SyntaxToken, name As XmlPrefixNameSyntax, closeParenToken As SyntaxToken) As GetXmlNamespaceExpressionSyntax 26126Public Shared Function SimpleMemberAccessExpression(expression As ExpressionSyntax, operatorToken As SyntaxToken, name As SimpleNameSyntax) As MemberAccessExpressionSyntax 26186Public Shared Function DictionaryAccessExpression(expression As ExpressionSyntax, operatorToken As SyntaxToken, name As SimpleNameSyntax) As MemberAccessExpressionSyntax 26250Public Shared Function MemberAccessExpression(ByVal kind As SyntaxKind, expression As ExpressionSyntax, operatorToken As SyntaxToken, name As SimpleNameSyntax) As MemberAccessExpressionSyntax 26295Public Shared Function MemberAccessExpression(ByVal kind As SyntaxKind, operatorToken As SyntaxToken, name As SimpleNameSyntax) As MemberAccessExpressionSyntax 26320Public Shared Function XmlElementAccessExpression(base As ExpressionSyntax, token1 As SyntaxToken, token2 As SyntaxToken, token3 As SyntaxToken, name As XmlNodeSyntax) As XmlMemberAccessExpressionSyntax 26353Public Shared Function XmlElementAccessExpression(base As ExpressionSyntax, token2 As SyntaxToken, name As XmlNodeSyntax) As XmlMemberAccessExpressionSyntax 26391Public Shared Function XmlDescendantAccessExpression(base As ExpressionSyntax, token1 As SyntaxToken, token2 As SyntaxToken, token3 As SyntaxToken, name As XmlNodeSyntax) As XmlMemberAccessExpressionSyntax 26424Public Shared Function XmlDescendantAccessExpression(base As ExpressionSyntax, token2 As SyntaxToken, name As XmlNodeSyntax) As XmlMemberAccessExpressionSyntax 26462Public Shared Function XmlAttributeAccessExpression(base As ExpressionSyntax, token1 As SyntaxToken, token2 As SyntaxToken, token3 As SyntaxToken, name As XmlNodeSyntax) As XmlMemberAccessExpressionSyntax 26495Public Shared Function XmlAttributeAccessExpression(base As ExpressionSyntax, token2 As SyntaxToken, name As XmlNodeSyntax) As XmlMemberAccessExpressionSyntax 26538Public Shared Function XmlMemberAccessExpression(ByVal kind As SyntaxKind, base As ExpressionSyntax, token1 As SyntaxToken, token2 As SyntaxToken, token3 As SyntaxToken, name As XmlNodeSyntax) As XmlMemberAccessExpressionSyntax 26579Public Shared Function XmlMemberAccessExpression(ByVal kind As SyntaxKind, base As ExpressionSyntax, token2 As SyntaxToken, name As XmlNodeSyntax) As XmlMemberAccessExpressionSyntax 26649Public Shared Function ObjectCreationExpression(newKeyword As SyntaxToken, attributeLists As SyntaxList(of AttributeListSyntax), type As TypeSyntax, argumentList As ArgumentListSyntax, initializer As ObjectCreationInitializerSyntax) As ObjectCreationExpressionSyntax 26723Public Shared Function AnonymousObjectCreationExpression(newKeyword As SyntaxToken, attributeLists As SyntaxList(of AttributeListSyntax), initializer As ObjectMemberInitializerSyntax) As AnonymousObjectCreationExpressionSyntax 26790Public Shared Function ArrayCreationExpression(newKeyword As SyntaxToken, attributeLists As SyntaxList(of AttributeListSyntax), type As TypeSyntax, arrayBounds As ArgumentListSyntax, rankSpecifiers As SyntaxList(of ArrayRankSpecifierSyntax), initializer As CollectionInitializerSyntax) As ArrayCreationExpressionSyntax 26872Public Shared Function CollectionInitializer(openBraceToken As SyntaxToken, initializers As SeparatedSyntaxList(Of ExpressionSyntax), closeBraceToken As SyntaxToken) As CollectionInitializerSyntax 26926Public Shared Function CTypeExpression(keyword As SyntaxToken, openParenToken As SyntaxToken, expression As ExpressionSyntax, commaToken As SyntaxToken, type As TypeSyntax, closeParenToken As SyntaxToken) As CTypeExpressionSyntax 27111Public Shared Function DirectCastExpression(keyword As SyntaxToken, openParenToken As SyntaxToken, expression As ExpressionSyntax, commaToken As SyntaxToken, type As TypeSyntax, closeParenToken As SyntaxToken) As DirectCastExpressionSyntax 27294Public Shared Function TryCastExpression(keyword As SyntaxToken, openParenToken As SyntaxToken, expression As ExpressionSyntax, commaToken As SyntaxToken, type As TypeSyntax, closeParenToken As SyntaxToken) As TryCastExpressionSyntax 27475Public Shared Function PredefinedCastExpression(keyword As SyntaxToken, openParenToken As SyntaxToken, expression As ExpressionSyntax, closeParenToken As SyntaxToken) As PredefinedCastExpressionSyntax 27632Public Shared Function PredefinedCastExpression(keyword As SyntaxToken, expression As ExpressionSyntax) As PredefinedCastExpressionSyntax 27648Public Shared Function AddExpression(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As BinaryExpressionSyntax 27932Public Shared Function SubtractExpression(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As BinaryExpressionSyntax 28193Public Shared Function MultiplyExpression(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As BinaryExpressionSyntax 28454Public Shared Function DivideExpression(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As BinaryExpressionSyntax 28715Public Shared Function IntegerDivideExpression(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As BinaryExpressionSyntax 28976Public Shared Function ExponentiateExpression(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As BinaryExpressionSyntax 29237Public Shared Function LeftShiftExpression(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As BinaryExpressionSyntax 29498Public Shared Function RightShiftExpression(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As BinaryExpressionSyntax 29759Public Shared Function ConcatenateExpression(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As BinaryExpressionSyntax 30020Public Shared Function ModuloExpression(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As BinaryExpressionSyntax 30281Public Shared Function EqualsExpression(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As BinaryExpressionSyntax 30542Public Shared Function NotEqualsExpression(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As BinaryExpressionSyntax 30803Public Shared Function LessThanExpression(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As BinaryExpressionSyntax 31064Public Shared Function LessThanOrEqualExpression(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As BinaryExpressionSyntax 31325Public Shared Function GreaterThanOrEqualExpression(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As BinaryExpressionSyntax 31586Public Shared Function GreaterThanExpression(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As BinaryExpressionSyntax 31847Public Shared Function IsExpression(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As BinaryExpressionSyntax 32108Public Shared Function IsNotExpression(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As BinaryExpressionSyntax 32369Public Shared Function LikeExpression(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As BinaryExpressionSyntax 32630Public Shared Function OrExpression(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As BinaryExpressionSyntax 32891Public Shared Function ExclusiveOrExpression(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As BinaryExpressionSyntax 33152Public Shared Function AndExpression(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As BinaryExpressionSyntax 33413Public Shared Function OrElseExpression(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As BinaryExpressionSyntax 33674Public Shared Function AndAlsoExpression(left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As BinaryExpressionSyntax 33946Public Shared Function BinaryExpression(ByVal kind As SyntaxKind, left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As BinaryExpressionSyntax 34244Public Shared Function UnaryPlusExpression(operatorToken As SyntaxToken, operand As ExpressionSyntax) As UnaryExpressionSyntax 34389Public Shared Function UnaryMinusExpression(operatorToken As SyntaxToken, operand As ExpressionSyntax) As UnaryExpressionSyntax 34531Public Shared Function NotExpression(operatorToken As SyntaxToken, operand As ExpressionSyntax) As UnaryExpressionSyntax 34673Public Shared Function AddressOfExpression(operatorToken As SyntaxToken, operand As ExpressionSyntax) As UnaryExpressionSyntax 34820Public Shared Function UnaryExpression(ByVal kind As SyntaxKind, operatorToken As SyntaxToken, operand As ExpressionSyntax) As UnaryExpressionSyntax 34979Public Shared Function BinaryConditionalExpression(ifKeyword As SyntaxToken, openParenToken As SyntaxToken, firstExpression As ExpressionSyntax, commaToken As SyntaxToken, secondExpression As ExpressionSyntax, closeParenToken As SyntaxToken) As BinaryConditionalExpressionSyntax 35271Public Shared Function TernaryConditionalExpression(ifKeyword As SyntaxToken, openParenToken As SyntaxToken, condition As ExpressionSyntax, firstCommaToken As SyntaxToken, whenTrue As ExpressionSyntax, secondCommaToken As SyntaxToken, whenFalse As ExpressionSyntax, closeParenToken As SyntaxToken) As TernaryConditionalExpressionSyntax 36747Public Shared Function SubLambdaHeader(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, subOrFunctionKeyword As SyntaxToken, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax) As LambdaHeaderSyntax 36816Public Shared Function FunctionLambdaHeader(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, subOrFunctionKeyword As SyntaxToken, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax) As LambdaHeaderSyntax 36888Public Shared Function LambdaHeader(ByVal kind As SyntaxKind, attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, subOrFunctionKeyword As SyntaxToken, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax) As LambdaHeaderSyntax 36919Public Shared Function LambdaHeader(ByVal kind As SyntaxKind, subOrFunctionKeyword As SyntaxToken) As LambdaHeaderSyntax 36937Public Shared Function ArgumentList(openParenToken As SyntaxToken, arguments As SeparatedSyntaxList(Of ArgumentSyntax), closeParenToken As SyntaxToken) As ArgumentListSyntax 36979Public Shared Function OmittedArgument(empty As SyntaxToken) As OmittedArgumentSyntax 37146Public Shared Function NameColonEquals(name As IdentifierNameSyntax, colonEqualsToken As SyntaxToken) As NameColonEqualsSyntax 37188Public Shared Function RangeArgument(lowerBound As ExpressionSyntax, toKeyword As SyntaxToken, upperBound As ExpressionSyntax) As RangeArgumentSyntax 37481Public Shared Function CollectionRangeVariable(identifier As ModifiedIdentifierSyntax, asClause As SimpleAsClauseSyntax, inKeyword As SyntaxToken, expression As ExpressionSyntax) As CollectionRangeVariableSyntax 37838Public Shared Function VariableNameEquals(identifier As ModifiedIdentifierSyntax, asClause As SimpleAsClauseSyntax, equalsToken As SyntaxToken) As VariableNameEqualsSyntax 37897Public Shared Function FunctionAggregation(functionName As SyntaxToken, openParenToken As SyntaxToken, argument As ExpressionSyntax, closeParenToken As SyntaxToken) As FunctionAggregationSyntax 37917Public Shared Function FunctionAggregation(functionName As SyntaxToken, argument As ExpressionSyntax) As FunctionAggregationSyntax 37929Public Shared Function FunctionAggregation(functionName As SyntaxToken) As FunctionAggregationSyntax 37954Public Shared Function GroupAggregation(groupKeyword As SyntaxToken) As GroupAggregationSyntax 37985Public Shared Function FromClause(fromKeyword As SyntaxToken, variables As SeparatedSyntaxList(Of CollectionRangeVariableSyntax)) As FromClauseSyntax 38030Public Shared Function LetClause(letKeyword As SyntaxToken, variables As SeparatedSyntaxList(Of ExpressionRangeVariableSyntax)) As LetClauseSyntax 38080Public Shared Function AggregateClause(aggregateKeyword As SyntaxToken, variables As SeparatedSyntaxList(Of CollectionRangeVariableSyntax), additionalQueryOperators As SyntaxList(of QueryClauseSyntax), intoKeyword As SyntaxToken, aggregationVariables As SeparatedSyntaxList(Of AggregationRangeVariableSyntax)) As AggregateClauseSyntax 38132Public Shared Function DistinctClause(distinctKeyword As SyntaxToken) As DistinctClauseSyntax 38159Public Shared Function WhereClause(whereKeyword As SyntaxToken, condition As ExpressionSyntax) As WhereClauseSyntax 38305Public Shared Function SkipWhileClause(skipOrTakeKeyword As SyntaxToken, whileKeyword As SyntaxToken, condition As ExpressionSyntax) As PartitionWhileClauseSyntax 38458Public Shared Function TakeWhileClause(skipOrTakeKeyword As SyntaxToken, whileKeyword As SyntaxToken, condition As ExpressionSyntax) As PartitionWhileClauseSyntax 38614Public Shared Function PartitionWhileClause(ByVal kind As SyntaxKind, skipOrTakeKeyword As SyntaxToken, whileKeyword As SyntaxToken, condition As ExpressionSyntax) As PartitionWhileClauseSyntax 38766Public Shared Function PartitionWhileClause(ByVal kind As SyntaxKind, skipOrTakeKeyword As SyntaxToken, condition As ExpressionSyntax) As PartitionWhileClauseSyntax 38780Public Shared Function SkipClause(skipOrTakeKeyword As SyntaxToken, count As ExpressionSyntax) As PartitionClauseSyntax 38923Public Shared Function TakeClause(skipOrTakeKeyword As SyntaxToken, count As ExpressionSyntax) As PartitionClauseSyntax 39069Public Shared Function PartitionClause(ByVal kind As SyntaxKind, skipOrTakeKeyword As SyntaxToken, count As ExpressionSyntax) As PartitionClauseSyntax 39221Public Shared Function GroupByClause(groupKeyword As SyntaxToken, items As SeparatedSyntaxList(Of ExpressionRangeVariableSyntax), byKeyword As SyntaxToken, keys As SeparatedSyntaxList(Of ExpressionRangeVariableSyntax), intoKeyword As SyntaxToken, aggregationVariables As SeparatedSyntaxList(Of AggregationRangeVariableSyntax)) As GroupByClauseSyntax 39285Public Shared Function JoinCondition(left As ExpressionSyntax, equalsKeyword As SyntaxToken, right As ExpressionSyntax) As JoinConditionSyntax 39552Public Shared Function SimpleJoinClause(joinKeyword As SyntaxToken, joinedVariables As SeparatedSyntaxList(Of CollectionRangeVariableSyntax), additionalJoins As SyntaxList(of JoinClauseSyntax), onKeyword As SyntaxToken, joinConditions As SeparatedSyntaxList(Of JoinConditionSyntax)) As SimpleJoinClauseSyntax 39628Public Shared Function GroupJoinClause(groupKeyword As SyntaxToken, joinKeyword As SyntaxToken, joinedVariables As SeparatedSyntaxList(Of CollectionRangeVariableSyntax), additionalJoins As SyntaxList(of JoinClauseSyntax), onKeyword As SyntaxToken, joinConditions As SeparatedSyntaxList(Of JoinConditionSyntax), intoKeyword As SyntaxToken, aggregationVariables As SeparatedSyntaxList(Of AggregationRangeVariableSyntax)) As GroupJoinClauseSyntax 39704Public Shared Function OrderByClause(orderKeyword As SyntaxToken, byKeyword As SyntaxToken, orderings As SeparatedSyntaxList(Of OrderingSyntax)) As OrderByClauseSyntax 39752Public Shared Function AscendingOrdering(expression As ExpressionSyntax, ascendingOrDescendingKeyword As SyntaxToken) As OrderingSyntax 39892Public Shared Function DescendingOrdering(expression As ExpressionSyntax, ascendingOrDescendingKeyword As SyntaxToken) As OrderingSyntax 40036Public Shared Function Ordering(ByVal kind As SyntaxKind, expression As ExpressionSyntax, ascendingOrDescendingKeyword As SyntaxToken) As OrderingSyntax 40192Public Shared Function SelectClause(selectKeyword As SyntaxToken, variables As SeparatedSyntaxList(Of ExpressionRangeVariableSyntax)) As SelectClauseSyntax 40263Public Shared Function XmlDeclaration(lessThanQuestionToken As SyntaxToken, xmlKeyword As SyntaxToken, version As XmlDeclarationOptionSyntax, encoding As XmlDeclarationOptionSyntax, standalone As XmlDeclarationOptionSyntax, questionGreaterThanToken As SyntaxToken) As XmlDeclarationSyntax 40311Public Shared Function XmlDeclarationOption(name As SyntaxToken, equals As SyntaxToken, value As XmlStringSyntax) As XmlDeclarationOptionSyntax 40398Public Shared Function XmlElementStartTag(lessThanToken As SyntaxToken, name As XmlNodeSyntax, attributes As SyntaxList(of XmlNodeSyntax), greaterThanToken As SyntaxToken) As XmlElementStartTagSyntax 40441Public Shared Function XmlElementEndTag(lessThanSlashToken As SyntaxToken, name As XmlNameSyntax, greaterThanToken As SyntaxToken) As XmlElementEndTagSyntax 40475Public Shared Function XmlEmptyElement(lessThanToken As SyntaxToken, name As XmlNodeSyntax, attributes As SyntaxList(of XmlNodeSyntax), slashGreaterThanToken As SyntaxToken) As XmlEmptyElementSyntax 40518Public Shared Function XmlAttribute(name As XmlNodeSyntax, equalsToken As SyntaxToken, value As XmlNodeSyntax) As XmlAttributeSyntax 40558Public Shared Function XmlString(startQuoteToken As SyntaxToken, textTokens As SyntaxTokenList, endQuoteToken As SyntaxToken) As XmlStringSyntax 40579Public Shared Function XmlString(startQuoteToken As SyntaxToken, endQuoteToken As SyntaxToken) As XmlStringSyntax 40587Public Shared Function XmlPrefixName(name As SyntaxToken) As XmlPrefixNameSyntax 40610Public Shared Function XmlName(prefix As XmlPrefixSyntax, localName As SyntaxToken) As XmlNameSyntax 40635Public Shared Function XmlBracketedName(lessThanToken As SyntaxToken, name As XmlNameSyntax, greaterThanToken As SyntaxToken) As XmlBracketedNameSyntax 40671Public Shared Function XmlPrefix(name As SyntaxToken, colonToken As SyntaxToken) As XmlPrefixSyntax 40698Public Shared Function XmlComment(lessThanExclamationMinusMinusToken As SyntaxToken, textTokens As SyntaxTokenList, minusMinusGreaterThanToken As SyntaxToken) As XmlCommentSyntax 40726Public Shared Function XmlProcessingInstruction(lessThanQuestionToken As SyntaxToken, name As SyntaxToken, textTokens As SyntaxTokenList, questionGreaterThanToken As SyntaxToken) As XmlProcessingInstructionSyntax 40758Public Shared Function XmlCDataSection(beginCDataToken As SyntaxToken, textTokens As SyntaxTokenList, endCDataToken As SyntaxToken) As XmlCDataSectionSyntax 40785Public Shared Function XmlEmbeddedExpression(lessThanPercentEqualsToken As SyntaxToken, expression As ExpressionSyntax, percentGreaterThanToken As SyntaxToken) As XmlEmbeddedExpressionSyntax 40974Public Shared Function NullableType(elementType As TypeSyntax, questionMarkToken As SyntaxToken) As NullableTypeSyntax 41018Public Shared Function PredefinedType(keyword As SyntaxToken) As PredefinedTypeSyntax 41050Public Shared Function IdentifierName(identifier As SyntaxToken) As IdentifierNameSyntax 41082Public Shared Function GenericName(identifier As SyntaxToken, typeArgumentList As TypeArgumentListSyntax) As GenericNameSyntax 41129Public Shared Function QualifiedName(left As NameSyntax, dotToken As SyntaxToken, right As SimpleNameSyntax) As QualifiedNameSyntax 41183Public Shared Function GlobalName(globalKeyword As SyntaxToken) As GlobalNameSyntax 41216Public Shared Function TypeArgumentList(openParenToken As SyntaxToken, ofKeyword As SyntaxToken, arguments As SeparatedSyntaxList(Of TypeSyntax), closeParenToken As SyntaxToken) As TypeArgumentListSyntax 41297Public Shared Function CrefSignature(openParenToken As SyntaxToken, argumentTypes As SeparatedSyntaxList(Of CrefSignaturePartSyntax), closeParenToken As SyntaxToken) As CrefSignatureSyntax 41330Public Shared Function CrefSignaturePart(modifier As SyntaxToken, type As TypeSyntax) As CrefSignaturePartSyntax 41340Public Shared Function CrefOperatorReference(operatorKeyword As SyntaxToken, operatorToken As SyntaxToken) As CrefOperatorReferenceSyntax 41378Public Shared Function CrefOperatorReference(operatorToken As SyntaxToken) As CrefOperatorReferenceSyntax 41383Public Shared Function QualifiedCrefOperatorReference(left As NameSyntax, dotToken As SyntaxToken, right As CrefOperatorReferenceSyntax) As QualifiedCrefOperatorReferenceSyntax 41428Public Shared Function YieldStatement(yieldKeyword As SyntaxToken, expression As ExpressionSyntax) As YieldStatementSyntax 41570Public Shared Function AwaitExpression(awaitKeyword As SyntaxToken, expression As ExpressionSyntax) As AwaitExpressionSyntax 41709Public Shared Function XmlNameToken(leadingTrivia As SyntaxTriviaList, text as String, possibleKeywordKind As SyntaxKind, trailingTrivia As SyntaxTriviaList) As SyntaxToken 41723Public Shared Function XmlNameToken(text as String, possibleKeywordKind As SyntaxKind) As SyntaxToken 41736Public Shared Function XmlTextLiteralToken(leadingTrivia As SyntaxTriviaList, text as String, value As String, trailingTrivia As SyntaxTriviaList) As SyntaxToken 41752Public Shared Function XmlTextLiteralToken(text as String, value As String) As SyntaxToken 41765Public Shared Function XmlEntityLiteralToken(leadingTrivia As SyntaxTriviaList, text as String, value As String, trailingTrivia As SyntaxTriviaList) As SyntaxToken 41781Public Shared Function XmlEntityLiteralToken(text as String, value As String) As SyntaxToken 41794Public Shared Function DocumentationCommentLineBreakToken(leadingTrivia As SyntaxTriviaList, text as String, value As String, trailingTrivia As SyntaxTriviaList) As SyntaxToken 41810Public Shared Function DocumentationCommentLineBreakToken(text as String, value As String) As SyntaxToken 41828Public Shared Function XmlTextToken(leadingTrivia As SyntaxTriviaList, ByVal kind As SyntaxKind, text as String, value As String, trailingTrivia As SyntaxTriviaList) As SyntaxToken 41852Public Shared Function XmlTextToken(ByVal kind As SyntaxKind, text as String, value As String) As SyntaxToken 41863Public Shared Function InterpolatedStringTextToken(leadingTrivia As SyntaxTriviaList, text as String, value As String, trailingTrivia As SyntaxTriviaList) As SyntaxToken 41877Public Shared Function InterpolatedStringTextToken(text as String, value As String) As SyntaxToken 41888Public Shared Function DecimalLiteralToken(leadingTrivia As SyntaxTriviaList, text as String, typeSuffix As TypeCharacter, value As System.Decimal, trailingTrivia As SyntaxTriviaList) As SyntaxToken 41902Public Shared Function DecimalLiteralToken(text as String, typeSuffix As TypeCharacter, value As System.Decimal) As SyntaxToken 41913Public Shared Function DateLiteralToken(leadingTrivia As SyntaxTriviaList, text as String, value As DateTime, trailingTrivia As SyntaxTriviaList) As SyntaxToken 41927Public Shared Function DateLiteralToken(text as String, value As DateTime) As SyntaxToken 41938Public Shared Function StringLiteralToken(leadingTrivia As SyntaxTriviaList, text as String, value As String, trailingTrivia As SyntaxTriviaList) As SyntaxToken 41952Public Shared Function StringLiteralToken(text as String, value As String) As SyntaxToken 41963Public Shared Function CharacterLiteralToken(leadingTrivia As SyntaxTriviaList, text as String, value As Char, trailingTrivia As SyntaxTriviaList) As SyntaxToken 41977Public Shared Function CharacterLiteralToken(text as String, value As Char) As SyntaxToken 42026Public Shared Function XmlCrefAttribute(name As XmlNameSyntax, equalsToken As SyntaxToken, startQuoteToken As SyntaxToken, reference As CrefReferenceSyntax, endQuoteToken As SyntaxToken) As XmlCrefAttributeSyntax 42069Public Shared Function XmlCrefAttribute(name As XmlNameSyntax, startQuoteToken As SyntaxToken, reference As CrefReferenceSyntax, endQuoteToken As SyntaxToken) As XmlCrefAttributeSyntax 42079Public Shared Function XmlNameAttribute(name As XmlNameSyntax, equalsToken As SyntaxToken, startQuoteToken As SyntaxToken, reference As IdentifierNameSyntax, endQuoteToken As SyntaxToken) As XmlNameAttributeSyntax 42122Public Shared Function XmlNameAttribute(name As XmlNameSyntax, startQuoteToken As SyntaxToken, reference As IdentifierNameSyntax, endQuoteToken As SyntaxToken) As XmlNameAttributeSyntax 42140Public Shared Function ConditionalAccessExpression(expression As ExpressionSyntax, questionMarkToken As SyntaxToken, whenNotNull As ExpressionSyntax) As ConditionalAccessExpressionSyntax 42206Public Shared Function NameOfExpression(nameOfKeyword As SyntaxToken, openParenToken As SyntaxToken, argument As ExpressionSyntax, closeParenToken As SyntaxToken) As NameOfExpressionSyntax 42361Public Shared Function InterpolatedStringExpression(dollarSignDoubleQuoteToken As SyntaxToken, contents As SyntaxList(of InterpolatedStringContentSyntax), doubleQuoteToken As SyntaxToken) As InterpolatedStringExpressionSyntax 42404Public Shared Function InterpolatedStringText(textToken As SyntaxToken) As InterpolatedStringTextSyntax 42442Public Shared Function Interpolation(openBraceToken As SyntaxToken, expression As ExpressionSyntax, alignmentClause As InterpolationAlignmentClauseSyntax, formatClause As InterpolationFormatClauseSyntax, closeBraceToken As SyntaxToken) As InterpolationSyntax 42608Public Shared Function InterpolationAlignmentClause(commaToken As SyntaxToken, value As ExpressionSyntax) As InterpolationAlignmentClauseSyntax 42752Public Shared Function InterpolationFormatClause(colonToken As SyntaxToken, formatStringToken As SyntaxToken) As InterpolationFormatClauseSyntax 42948Public Shared Function ConstDirectiveTrivia(hashToken As SyntaxToken, constKeyword As SyntaxToken, name As SyntaxToken, equalsToken As SyntaxToken, value As ExpressionSyntax) As ConstDirectiveTriviaSyntax 43095Public Shared Function ConstDirectiveTrivia(name As SyntaxToken, value As ExpressionSyntax) As ConstDirectiveTriviaSyntax 43122Public Shared Function IfDirectiveTrivia(hashToken As SyntaxToken, elseKeyword As SyntaxToken, ifOrElseIfKeyword As SyntaxToken, condition As ExpressionSyntax, thenKeyword As SyntaxToken) As IfDirectiveTriviaSyntax 43254Public Shared Function IfDirectiveTrivia(ifOrElseIfKeyword As SyntaxToken, condition As ExpressionSyntax) As IfDirectiveTriviaSyntax 43266Public Shared Function ElseIfDirectiveTrivia(hashToken As SyntaxToken, elseKeyword As SyntaxToken, ifOrElseIfKeyword As SyntaxToken, condition As ExpressionSyntax, thenKeyword As SyntaxToken) As IfDirectiveTriviaSyntax 43398Public Shared Function ElseIfDirectiveTrivia(ifOrElseIfKeyword As SyntaxToken, condition As ExpressionSyntax) As IfDirectiveTriviaSyntax 43414Public Shared Function IfDirectiveTrivia(ByVal kind As SyntaxKind, hashToken As SyntaxToken, elseKeyword As SyntaxToken, ifOrElseIfKeyword As SyntaxToken, condition As ExpressionSyntax, thenKeyword As SyntaxToken) As IfDirectiveTriviaSyntax 43553Public Shared Function IfDirectiveTrivia(ByVal kind As SyntaxKind, ifOrElseIfKeyword As SyntaxToken, condition As ExpressionSyntax) As IfDirectiveTriviaSyntax 43564Public Shared Function ElseDirectiveTrivia(hashToken As SyntaxToken, elseKeyword As SyntaxToken) As ElseDirectiveTriviaSyntax 43593Public Shared Function EndIfDirectiveTrivia(hashToken As SyntaxToken, endKeyword As SyntaxToken, ifKeyword As SyntaxToken) As EndIfDirectiveTriviaSyntax 43633Public Shared Function RegionDirectiveTrivia(hashToken As SyntaxToken, regionKeyword As SyntaxToken, name As SyntaxToken) As RegionDirectiveTriviaSyntax 43673Public Shared Function EndRegionDirectiveTrivia(hashToken As SyntaxToken, endKeyword As SyntaxToken, regionKeyword As SyntaxToken) As EndRegionDirectiveTriviaSyntax 43708Public Shared Function ExternalSourceDirectiveTrivia(hashToken As SyntaxToken, externalSourceKeyword As SyntaxToken, openParenToken As SyntaxToken, externalSource As SyntaxToken, commaToken As SyntaxToken, lineStart As SyntaxToken, closeParenToken As SyntaxToken) As ExternalSourceDirectiveTriviaSyntax 43763Public Shared Function EndExternalSourceDirectiveTrivia(hashToken As SyntaxToken, endKeyword As SyntaxToken, externalSourceKeyword As SyntaxToken) As EndExternalSourceDirectiveTriviaSyntax 43797Public Shared Function ExternalChecksumDirectiveTrivia(hashToken As SyntaxToken, externalChecksumKeyword As SyntaxToken, openParenToken As SyntaxToken, externalSource As SyntaxToken, firstCommaToken As SyntaxToken, guid As SyntaxToken, secondCommaToken As SyntaxToken, checksum As SyntaxToken, closeParenToken As SyntaxToken) As ExternalChecksumDirectiveTriviaSyntax 43861Public Shared Function EnableWarningDirectiveTrivia(hashToken As SyntaxToken, enableKeyword As SyntaxToken, warningKeyword As SyntaxToken, errorCodes As SeparatedSyntaxList(Of IdentifierNameSyntax)) As EnableWarningDirectiveTriviaSyntax 43903Public Shared Function DisableWarningDirectiveTrivia(hashToken As SyntaxToken, disableKeyword As SyntaxToken, warningKeyword As SyntaxToken, errorCodes As SeparatedSyntaxList(Of IdentifierNameSyntax)) As DisableWarningDirectiveTriviaSyntax 43945Public Shared Function ReferenceDirectiveTrivia(hashToken As SyntaxToken, referenceKeyword As SyntaxToken, file As SyntaxToken) As ReferenceDirectiveTriviaSyntax 43982Public Shared Function BadDirectiveTrivia(hashToken As SyntaxToken) As BadDirectiveTriviaSyntax
Generated\Syntax.xml.Syntax.Generated.vb (1245)
189Public ReadOnly Property Empty As SyntaxToken 199Public Shadows Function WithEmpty(empty as SyntaxToken) As EmptyStatementSyntax 231Public Function Update(empty As SyntaxToken) As EmptyStatementSyntax 293Public ReadOnly Property EndKeyword As SyntaxToken 304Public Shadows Function WithEndKeyword(endKeyword as SyntaxToken) As EndBlockStatementSyntax 314Public ReadOnly Property BlockKeyword As SyntaxToken 325Public Shadows Function WithBlockKeyword(blockKeyword as SyntaxToken) As EndBlockStatementSyntax 365Public Function Update(kind As SyntaxKind, endKeyword As SyntaxToken, blockKeyword As SyntaxToken) As EndBlockStatementSyntax 517Public ReadOnly Property EndOfFileToken As SyntaxToken 528Public Shadows Function WithEndOfFileToken(endOfFileToken as SyntaxToken) As CompilationUnitSyntax 590Public Function Update(options As SyntaxList(of OptionStatementSyntax), [imports] As SyntaxList(of ImportsStatementSyntax), attributes As SyntaxList(of AttributesStatementSyntax), members As SyntaxList(of StatementSyntax), endOfFileToken As SyntaxToken) As CompilationUnitSyntax 630Public ReadOnly Property OptionKeyword As SyntaxToken 641Public Shadows Function WithOptionKeyword(optionKeyword as SyntaxToken) As OptionStatementSyntax 649Public ReadOnly Property NameKeyword As SyntaxToken 660Public Shadows Function WithNameKeyword(nameKeyword as SyntaxToken) As OptionStatementSyntax 671Public ReadOnly Property ValueKeyword As SyntaxToken 686Public Shadows Function WithValueKeyword(valueKeyword as SyntaxToken) As OptionStatementSyntax 726Public Function Update(optionKeyword As SyntaxToken, nameKeyword As SyntaxToken, valueKeyword As SyntaxToken) As OptionStatementSyntax 767Public ReadOnly Property ImportsKeyword As SyntaxToken 778Public Shadows Function WithImportsKeyword(importsKeyword as SyntaxToken) As ImportsStatementSyntax 849Public Function Update(importsKeyword As SyntaxToken, importsClauses As SeparatedSyntaxList(Of ImportsClauseSyntax)) As ImportsStatementSyntax 1023Public ReadOnly Property Identifier As SyntaxToken 1034Public Shadows Function WithIdentifier(identifier as SyntaxToken) As ImportAliasClauseSyntax 1041Public ReadOnly Property EqualsToken As SyntaxToken 1052Public Shadows Function WithEqualsToken(equalsToken as SyntaxToken) As ImportAliasClauseSyntax 1089Public Function Update(identifier As SyntaxToken, equalsToken As SyntaxToken) As ImportAliasClauseSyntax 1127Public ReadOnly Property LessThanToken As SyntaxToken 1138Public Shadows Function WithLessThanToken(lessThanToken as SyntaxToken) As XmlNamespaceImportsClauseSyntax 1160Public ReadOnly Property GreaterThanToken As SyntaxToken 1171Public Shadows Function WithGreaterThanToken(greaterThanToken as SyntaxToken) As XmlNamespaceImportsClauseSyntax 1215Public Function Update(lessThanToken As SyntaxToken, xmlNamespace As XmlAttributeSyntax, greaterThanToken As SyntaxToken) As XmlNamespaceImportsClauseSyntax 1407Public ReadOnly Property NamespaceKeyword As SyntaxToken 1418Public Shadows Function WithNamespaceKeyword(namespaceKeyword as SyntaxToken) As NamespaceStatementSyntax 1476Public Function Update(namespaceKeyword As SyntaxToken, name As NameSyntax) As NamespaceStatementSyntax 2804Public ReadOnly Property InheritsKeyword As SyntaxToken 2815Public Shadows Function WithInheritsKeyword(inheritsKeyword as SyntaxToken) As InheritsStatementSyntax 2881Public Function Update(inheritsKeyword As SyntaxToken, types As SeparatedSyntaxList(Of TypeSyntax)) As InheritsStatementSyntax 2922Public ReadOnly Property ImplementsKeyword As SyntaxToken 2933Public Shadows Function WithImplementsKeyword(implementsKeyword as SyntaxToken) As ImplementsStatementSyntax 2999Public Function Update(implementsKeyword As SyntaxToken, types As SeparatedSyntaxList(Of TypeSyntax)) As ImplementsStatementSyntax 3094Public Shadows Function AddModifiers(ParamArray items As SyntaxToken()) As TypeStatementSyntax 3097Friend MustOverride Function AddModifiersCore(ParamArray items As SyntaxToken()) As TypeStatementSyntax 3101Public ReadOnly Property Identifier As SyntaxToken 3107Friend Overridable Function GetIdentifierCore() As SyntaxToken 3116Public Function WithIdentifier(identifier As SyntaxToken) As TypeStatementSyntax 3119Friend MustOverride Function WithIdentifierCore(identifier As SyntaxToken) As TypeStatementSyntax 3252Public Shadows Function AddModifiers(ParamArray items As SyntaxToken()) As ModuleStatementSyntax 3256Friend Overrides Function AddModifiersCore(ParamArray items As SyntaxToken()) As TypeStatementSyntax 3263Public ReadOnly Property ModuleKeyword As SyntaxToken 3274Public Shadows Function WithModuleKeyword(moduleKeyword as SyntaxToken) As ModuleStatementSyntax 3281Public Shadows ReadOnly Property Identifier As SyntaxToken 3287Friend Overrides Function GetIdentifierCore() As SyntaxToken 3291Friend Overrides Function WithIdentifierCore(identifier As SyntaxToken) As TypeStatementSyntax 3300Public Shadows Function WithIdentifier(identifier as SyntaxToken) As ModuleStatementSyntax 3393Public Function Update(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, moduleKeyword As SyntaxToken, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax) As ModuleStatementSyntax 3504Public Shadows Function AddModifiers(ParamArray items As SyntaxToken()) As StructureStatementSyntax 3508Friend Overrides Function AddModifiersCore(ParamArray items As SyntaxToken()) As TypeStatementSyntax 3515Public ReadOnly Property StructureKeyword As SyntaxToken 3526Public Shadows Function WithStructureKeyword(structureKeyword as SyntaxToken) As StructureStatementSyntax 3533Public Shadows ReadOnly Property Identifier As SyntaxToken 3539Friend Overrides Function GetIdentifierCore() As SyntaxToken 3543Friend Overrides Function WithIdentifierCore(identifier As SyntaxToken) As TypeStatementSyntax 3552Public Shadows Function WithIdentifier(identifier as SyntaxToken) As StructureStatementSyntax 3645Public Function Update(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, structureKeyword As SyntaxToken, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax) As StructureStatementSyntax 3756Public Shadows Function AddModifiers(ParamArray items As SyntaxToken()) As InterfaceStatementSyntax 3760Friend Overrides Function AddModifiersCore(ParamArray items As SyntaxToken()) As TypeStatementSyntax 3767Public ReadOnly Property InterfaceKeyword As SyntaxToken 3778Public Shadows Function WithInterfaceKeyword(interfaceKeyword as SyntaxToken) As InterfaceStatementSyntax 3785Public Shadows ReadOnly Property Identifier As SyntaxToken 3791Friend Overrides Function GetIdentifierCore() As SyntaxToken 3795Friend Overrides Function WithIdentifierCore(identifier As SyntaxToken) As TypeStatementSyntax 3804Public Shadows Function WithIdentifier(identifier as SyntaxToken) As InterfaceStatementSyntax 3897Public Function Update(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, interfaceKeyword As SyntaxToken, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax) As InterfaceStatementSyntax 4008Public Shadows Function AddModifiers(ParamArray items As SyntaxToken()) As ClassStatementSyntax 4012Friend Overrides Function AddModifiersCore(ParamArray items As SyntaxToken()) As TypeStatementSyntax 4019Public ReadOnly Property ClassKeyword As SyntaxToken 4030Public Shadows Function WithClassKeyword(classKeyword as SyntaxToken) As ClassStatementSyntax 4037Public Shadows ReadOnly Property Identifier As SyntaxToken 4043Friend Overrides Function GetIdentifierCore() As SyntaxToken 4047Friend Overrides Function WithIdentifierCore(identifier As SyntaxToken) As TypeStatementSyntax 4056Public Shadows Function WithIdentifier(identifier as SyntaxToken) As ClassStatementSyntax 4149Public Function Update(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, classKeyword As SyntaxToken, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax) As ClassStatementSyntax 4242Public Shadows Function AddModifiers(ParamArray items As SyntaxToken()) As EnumStatementSyntax 4249Public ReadOnly Property EnumKeyword As SyntaxToken 4260Public Shadows Function WithEnumKeyword(enumKeyword as SyntaxToken) As EnumStatementSyntax 4267Public ReadOnly Property Identifier As SyntaxToken 4278Public Shadows Function WithIdentifier(identifier as SyntaxToken) As EnumStatementSyntax 4354Public Function Update(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, enumKeyword As SyntaxToken, identifier As SyntaxToken, underlyingType As AsClauseSyntax) As EnumStatementSyntax 4395Public ReadOnly Property OpenParenToken As SyntaxToken 4406Public Shadows Function WithOpenParenToken(openParenToken as SyntaxToken) As TypeParameterListSyntax 4413Public ReadOnly Property OfKeyword As SyntaxToken 4424Public Shadows Function WithOfKeyword(ofKeyword as SyntaxToken) As TypeParameterListSyntax 4458Public ReadOnly Property CloseParenToken As SyntaxToken 4469Public Shadows Function WithCloseParenToken(closeParenToken as SyntaxToken) As TypeParameterListSyntax 4516Public Function Update(openParenToken As SyntaxToken, ofKeyword As SyntaxToken, parameters As SeparatedSyntaxList(Of TypeParameterSyntax), closeParenToken As SyntaxToken) As TypeParameterListSyntax 4561Public ReadOnly Property VarianceKeyword As SyntaxToken 4576Public Shadows Function WithVarianceKeyword(varianceKeyword as SyntaxToken) As TypeParameterSyntax 4583Public ReadOnly Property Identifier As SyntaxToken 4594Public Shadows Function WithIdentifier(identifier as SyntaxToken) As TypeParameterSyntax 4660Public Function Update(varianceKeyword As SyntaxToken, identifier As SyntaxToken, typeParameterConstraintClause As TypeParameterConstraintClauseSyntax) As TypeParameterSyntax 4719Public ReadOnly Property AsKeyword As SyntaxToken 4730Public Shadows Function WithAsKeyword(asKeyword as SyntaxToken) As TypeParameterSingleConstraintClauseSyntax 4790Public Function Update(asKeyword As SyntaxToken, constraint As ConstraintSyntax) As TypeParameterSingleConstraintClauseSyntax 4832Public ReadOnly Property AsKeyword As SyntaxToken 4843Public Shadows Function WithAsKeyword(asKeyword as SyntaxToken) As TypeParameterMultipleConstraintClauseSyntax 4850Public ReadOnly Property OpenBraceToken As SyntaxToken 4861Public Shadows Function WithOpenBraceToken(openBraceToken as SyntaxToken) As TypeParameterMultipleConstraintClauseSyntax 4895Public ReadOnly Property CloseBraceToken As SyntaxToken 4906Public Shadows Function WithCloseBraceToken(closeBraceToken as SyntaxToken) As TypeParameterMultipleConstraintClauseSyntax 4953Public Function Update(asKeyword As SyntaxToken, openBraceToken As SyntaxToken, constraints As SeparatedSyntaxList(Of ConstraintSyntax), closeBraceToken As SyntaxToken) As TypeParameterMultipleConstraintClauseSyntax 5014Public ReadOnly Property ConstraintKeyword As SyntaxToken 5025Public Shadows Function WithConstraintKeyword(constraintKeyword as SyntaxToken) As SpecialConstraintSyntax 5060Public Function Update(kind As SyntaxKind, constraintKeyword As SyntaxToken) As SpecialConstraintSyntax 5209Public ReadOnly Property Identifier As SyntaxToken 5220Public Shadows Function WithIdentifier(identifier as SyntaxToken) As EnumMemberDeclarationSyntax 5289Public Function Update(attributeLists As SyntaxList(of AttributeListSyntax), identifier As SyntaxToken, initializer As EqualsValueSyntax) As EnumMemberDeclarationSyntax 6396Public Shadows Function AddModifiers(ParamArray items As SyntaxToken()) As MethodBaseSyntax 6399Friend MustOverride Function AddModifiersCore(ParamArray items As SyntaxToken()) As MethodBaseSyntax 6462Public ReadOnly Property OpenParenToken As SyntaxToken 6473Public Shadows Function WithOpenParenToken(openParenToken as SyntaxToken) As ParameterListSyntax 6510Public ReadOnly Property CloseParenToken As SyntaxToken 6521Public Shadows Function WithCloseParenToken(closeParenToken as SyntaxToken) As ParameterListSyntax 6565Public Function Update(openParenToken As SyntaxToken, parameters As SeparatedSyntaxList(Of ParameterSyntax), closeParenToken As SyntaxToken) As ParameterListSyntax 6685Public Shadows Function AddModifiers(ParamArray items As SyntaxToken()) As MethodStatementSyntax 6689Friend Overrides Function AddModifiersCore(ParamArray items As SyntaxToken()) As MethodBaseSyntax 6696Public ReadOnly Property SubOrFunctionKeyword As SyntaxToken 6707Public Shadows Function WithSubOrFunctionKeyword(subOrFunctionKeyword as SyntaxToken) As MethodStatementSyntax 6714Public ReadOnly Property Identifier As SyntaxToken 6725Public Shadows Function WithIdentifier(identifier as SyntaxToken) As MethodStatementSyntax 6951Public Function Update(kind As SyntaxKind, attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, subOrFunctionKeyword As SyntaxToken, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax, handlesClause As HandlesClauseSyntax, implementsClause As ImplementsClauseSyntax) As MethodStatementSyntax 7065Public Shadows Function AddModifiers(ParamArray items As SyntaxToken()) As SubNewStatementSyntax 7069Friend Overrides Function AddModifiersCore(ParamArray items As SyntaxToken()) As MethodBaseSyntax 7076Public ReadOnly Property SubKeyword As SyntaxToken 7087Public Shadows Function WithSubKeyword(subKeyword as SyntaxToken) As SubNewStatementSyntax 7094Public ReadOnly Property NewKeyword As SyntaxToken 7105Public Shadows Function WithNewKeyword(newKeyword as SyntaxToken) As SubNewStatementSyntax 7198Public Function Update(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, subKeyword As SyntaxToken, newKeyword As SyntaxToken, parameterList As ParameterListSyntax) As SubNewStatementSyntax 7314Public Shadows Function AddModifiers(ParamArray items As SyntaxToken()) As DeclareStatementSyntax 7318Friend Overrides Function AddModifiersCore(ParamArray items As SyntaxToken()) As MethodBaseSyntax 7325Public ReadOnly Property DeclareKeyword As SyntaxToken 7336Public Shadows Function WithDeclareKeyword(declareKeyword as SyntaxToken) As DeclareStatementSyntax 7347Public ReadOnly Property CharsetKeyword As SyntaxToken 7362Public Shadows Function WithCharsetKeyword(charsetKeyword as SyntaxToken) As DeclareStatementSyntax 7369Public ReadOnly Property SubOrFunctionKeyword As SyntaxToken 7380Public Shadows Function WithSubOrFunctionKeyword(subOrFunctionKeyword as SyntaxToken) As DeclareStatementSyntax 7387Public ReadOnly Property Identifier As SyntaxToken 7398Public Shadows Function WithIdentifier(identifier as SyntaxToken) As DeclareStatementSyntax 7405Public ReadOnly Property LibKeyword As SyntaxToken 7416Public Shadows Function WithLibKeyword(libKeyword as SyntaxToken) As DeclareStatementSyntax 7444Public ReadOnly Property AliasKeyword As SyntaxToken 7459Public Shadows Function WithAliasKeyword(aliasKeyword as SyntaxToken) As DeclareStatementSyntax 7631Public Function Update(kind As SyntaxKind, attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, declareKeyword As SyntaxToken, charsetKeyword As SyntaxToken, subOrFunctionKeyword As SyntaxToken, identifier As SyntaxToken, libKeyword As SyntaxToken, libraryName As LiteralExpressionSyntax, aliasKeyword As SyntaxToken, aliasName As LiteralExpressionSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax) As DeclareStatementSyntax 7746Public Shadows Function AddModifiers(ParamArray items As SyntaxToken()) As DelegateStatementSyntax 7750Friend Overrides Function AddModifiersCore(ParamArray items As SyntaxToken()) As MethodBaseSyntax 7757Public ReadOnly Property DelegateKeyword As SyntaxToken 7768Public Shadows Function WithDelegateKeyword(delegateKeyword as SyntaxToken) As DelegateStatementSyntax 7775Public ReadOnly Property SubOrFunctionKeyword As SyntaxToken 7786Public Shadows Function WithSubOrFunctionKeyword(subOrFunctionKeyword as SyntaxToken) As DelegateStatementSyntax 7793Public ReadOnly Property Identifier As SyntaxToken 7804Public Shadows Function WithIdentifier(identifier as SyntaxToken) As DelegateStatementSyntax 7966Public Function Update(kind As SyntaxKind, attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, delegateKeyword As SyntaxToken, subOrFunctionKeyword As SyntaxToken, identifier As SyntaxToken, typeParameterList As TypeParameterListSyntax, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax) As DelegateStatementSyntax 8082Public Shadows Function AddModifiers(ParamArray items As SyntaxToken()) As EventStatementSyntax 8086Friend Overrides Function AddModifiersCore(ParamArray items As SyntaxToken()) As MethodBaseSyntax 8096Public ReadOnly Property CustomKeyword As SyntaxToken 8111Public Shadows Function WithCustomKeyword(customKeyword as SyntaxToken) As EventStatementSyntax 8118Public ReadOnly Property EventKeyword As SyntaxToken 8129Public Shadows Function WithEventKeyword(eventKeyword as SyntaxToken) As EventStatementSyntax 8136Public ReadOnly Property Identifier As SyntaxToken 8147Public Shadows Function WithIdentifier(identifier as SyntaxToken) As EventStatementSyntax 8306Public Function Update(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, customKeyword As SyntaxToken, eventKeyword As SyntaxToken, identifier As SyntaxToken, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax, implementsClause As ImplementsClauseSyntax) As EventStatementSyntax 8422Public Shadows Function AddModifiers(ParamArray items As SyntaxToken()) As OperatorStatementSyntax 8426Friend Overrides Function AddModifiersCore(ParamArray items As SyntaxToken()) As MethodBaseSyntax 8433Public ReadOnly Property OperatorKeyword As SyntaxToken 8444Public Shadows Function WithOperatorKeyword(operatorKeyword as SyntaxToken) As OperatorStatementSyntax 8451Public ReadOnly Property OperatorToken As SyntaxToken 8462Public Shadows Function WithOperatorToken(operatorToken as SyntaxToken) As OperatorStatementSyntax 8584Public Function Update(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, operatorKeyword As SyntaxToken, operatorToken As SyntaxToken, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax) As OperatorStatementSyntax 8702Public Shadows Function AddModifiers(ParamArray items As SyntaxToken()) As PropertyStatementSyntax 8706Friend Overrides Function AddModifiersCore(ParamArray items As SyntaxToken()) As MethodBaseSyntax 8713Public ReadOnly Property PropertyKeyword As SyntaxToken 8724Public Shadows Function WithPropertyKeyword(propertyKeyword as SyntaxToken) As PropertyStatementSyntax 8731Public ReadOnly Property Identifier As SyntaxToken 8742Public Shadows Function WithIdentifier(identifier as SyntaxToken) As PropertyStatementSyntax 8927Public Function Update(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, propertyKeyword As SyntaxToken, identifier As SyntaxToken, parameterList As ParameterListSyntax, asClause As AsClauseSyntax, initializer As EqualsValueSyntax, implementsClause As ImplementsClauseSyntax) As PropertyStatementSyntax 9046Public Shadows Function AddModifiers(ParamArray items As SyntaxToken()) As AccessorStatementSyntax 9050Friend Overrides Function AddModifiersCore(ParamArray items As SyntaxToken()) As MethodBaseSyntax 9058Public ReadOnly Property AccessorKeyword As SyntaxToken 9069Public Shadows Function WithAccessorKeyword(accessorKeyword as SyntaxToken) As AccessorStatementSyntax 9162Public Function Update(kind As SyntaxKind, attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, accessorKeyword As SyntaxToken, parameterList As ParameterListSyntax) As AccessorStatementSyntax 9204Public ReadOnly Property ImplementsKeyword As SyntaxToken 9215Public Shadows Function WithImplementsKeyword(implementsKeyword as SyntaxToken) As ImplementsClauseSyntax 9282Public Function Update(implementsKeyword As SyntaxToken, interfaceMembers As SeparatedSyntaxList(Of QualifiedNameSyntax)) As ImplementsClauseSyntax 9324Public ReadOnly Property HandlesKeyword As SyntaxToken 9335Public Shadows Function WithHandlesKeyword(handlesKeyword as SyntaxToken) As HandlesClauseSyntax 9401Public Function Update(handlesKeyword As SyntaxToken, events As SeparatedSyntaxList(Of HandlesClauseItemSyntax)) As HandlesClauseSyntax 9458Public ReadOnly Property Keyword As SyntaxToken 9469Public Shadows Function WithKeyword(keyword as SyntaxToken) As KeywordEventContainerSyntax 9501Public Function Update(keyword As SyntaxToken) As KeywordEventContainerSyntax 9542Public ReadOnly Property Identifier As SyntaxToken 9553Public Shadows Function WithIdentifier(identifier as SyntaxToken) As WithEventsEventContainerSyntax 9585Public Function Update(identifier As SyntaxToken) As WithEventsEventContainerSyntax 9645Public ReadOnly Property DotToken As SyntaxToken 9656Public Shadows Function WithDotToken(dotToken as SyntaxToken) As WithEventsPropertyEventContainerSyntax 9723Public Function Update(withEventsContainer As WithEventsEventContainerSyntax, dotToken As SyntaxToken, [property] As IdentifierNameSyntax) As WithEventsPropertyEventContainerSyntax 9785Public ReadOnly Property DotToken As SyntaxToken 9796Public Shadows Function WithDotToken(dotToken as SyntaxToken) As HandlesClauseItemSyntax 9862Public Function Update(eventContainer As EventContainerSyntax, dotToken As SyntaxToken, eventMember As IdentifierNameSyntax) As HandlesClauseItemSyntax 9955Public Shadows Function AddModifiers(ParamArray items As SyntaxToken()) As IncompleteMemberSyntax 9966Public ReadOnly Property MissingIdentifier As SyntaxToken 9981Public Shadows Function WithMissingIdentifier(missingIdentifier as SyntaxToken) As IncompleteMemberSyntax 10025Public Function Update(attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, missingIdentifier As SyntaxToken) As IncompleteMemberSyntax 10120Public Shadows Function AddModifiers(ParamArray items As SyntaxToken()) As FieldDeclarationSyntax 10387Public ReadOnly Property AsKeyword As SyntaxToken 10393Friend Overridable Function GetAsKeywordCore() As SyntaxToken 10402Public Function WithAsKeyword(asKeyword As SyntaxToken) As AsClauseSyntax 10405Friend MustOverride Function WithAsKeywordCore(asKeyword As SyntaxToken) As AsClauseSyntax 10439Public Shadows ReadOnly Property AsKeyword As SyntaxToken 10445Friend Overrides Function GetAsKeywordCore() As SyntaxToken 10449Friend Overrides Function WithAsKeywordCore(asKeyword As SyntaxToken) As AsClauseSyntax 10458Public Shadows Function WithAsKeyword(asKeyword as SyntaxToken) As SimpleAsClauseSyntax 10550Public Function Update(asKeyword As SyntaxToken, attributeLists As SyntaxList(of AttributeListSyntax), type As TypeSyntax) As SimpleAsClauseSyntax 10594Public Shadows ReadOnly Property AsKeyword As SyntaxToken 10600Friend Overrides Function GetAsKeywordCore() As SyntaxToken 10604Friend Overrides Function WithAsKeywordCore(asKeyword As SyntaxToken) As AsClauseSyntax 10613Public Shadows Function WithAsKeyword(asKeyword as SyntaxToken) As AsNewClauseSyntax 10672Public Function Update(asKeyword As SyntaxToken, newExpression As NewExpressionSyntax) As AsNewClauseSyntax 10729Public ReadOnly Property WithKeyword As SyntaxToken 10740Public Shadows Function WithWithKeyword(withKeyword as SyntaxToken) As ObjectMemberInitializerSyntax 10747Public ReadOnly Property OpenBraceToken As SyntaxToken 10758Public Shadows Function WithOpenBraceToken(openBraceToken as SyntaxToken) As ObjectMemberInitializerSyntax 10791Public ReadOnly Property CloseBraceToken As SyntaxToken 10802Public Shadows Function WithCloseBraceToken(closeBraceToken as SyntaxToken) As ObjectMemberInitializerSyntax 10849Public Function Update(withKeyword As SyntaxToken, openBraceToken As SyntaxToken, initializers As SeparatedSyntaxList(Of FieldInitializerSyntax), closeBraceToken As SyntaxToken) As ObjectMemberInitializerSyntax 10891Public ReadOnly Property FromKeyword As SyntaxToken 10902Public Shadows Function WithFromKeyword(fromKeyword as SyntaxToken) As ObjectCollectionInitializerSyntax 10966Public Function Update(fromKeyword As SyntaxToken, initializer As CollectionInitializerSyntax) As ObjectCollectionInitializerSyntax 11000Public ReadOnly Property KeyKeyword As SyntaxToken 11006Friend Overridable Function GetKeyKeywordCore() As SyntaxToken 11019Public Function WithKeyKeyword(keyKeyword As SyntaxToken) As FieldInitializerSyntax 11022Friend MustOverride Function WithKeyKeywordCore(keyKeyword As SyntaxToken) As FieldInitializerSyntax 11057Public Shadows ReadOnly Property KeyKeyword As SyntaxToken 11067Friend Overrides Function GetKeyKeywordCore() As SyntaxToken 11071Friend Overrides Function WithKeyKeywordCore(keyKeyword As SyntaxToken) As FieldInitializerSyntax 11080Public Shadows Function WithKeyKeyword(keyKeyword as SyntaxToken) As InferredFieldInitializerSyntax 11139Public Function Update(keyKeyword As SyntaxToken, expression As ExpressionSyntax) As InferredFieldInitializerSyntax 11185Public Shadows ReadOnly Property KeyKeyword As SyntaxToken 11195Friend Overrides Function GetKeyKeywordCore() As SyntaxToken 11199Friend Overrides Function WithKeyKeywordCore(keyKeyword As SyntaxToken) As FieldInitializerSyntax 11208Public Shadows Function WithKeyKeyword(keyKeyword as SyntaxToken) As NamedFieldInitializerSyntax 11215Public ReadOnly Property DotToken As SyntaxToken 11226Public Shadows Function WithDotToken(dotToken as SyntaxToken) As NamedFieldInitializerSyntax 11250Public ReadOnly Property EqualsToken As SyntaxToken 11261Public Shadows Function WithEqualsToken(equalsToken as SyntaxToken) As NamedFieldInitializerSyntax 11333Public Function Update(keyKeyword As SyntaxToken, dotToken As SyntaxToken, name As IdentifierNameSyntax, equalsToken As SyntaxToken, expression As ExpressionSyntax) As NamedFieldInitializerSyntax 11375Public ReadOnly Property EqualsToken As SyntaxToken 11386Public Shadows Function WithEqualsToken(equalsToken as SyntaxToken) As EqualsValueSyntax 11444Public Function Update(equalsToken As SyntaxToken, value As ExpressionSyntax) As EqualsValueSyntax 11538Public Shadows Function AddModifiers(ParamArray items As SyntaxToken()) As ParameterSyntax 11705Public ReadOnly Property Identifier As SyntaxToken 11716Public Shadows Function WithIdentifier(identifier as SyntaxToken) As ModifiedIdentifierSyntax 11726Public ReadOnly Property Nullable As SyntaxToken 11741Public Shadows Function WithNullable(nullable as SyntaxToken) As ModifiedIdentifierSyntax 11845Public Function Update(identifier As SyntaxToken, nullable As SyntaxToken, arrayBounds As ArgumentListSyntax, arrayRankSpecifiers As SyntaxList(of ArrayRankSpecifierSyntax)) As ModifiedIdentifierSyntax 11886Public ReadOnly Property OpenParenToken As SyntaxToken 11897Public Shadows Function WithOpenParenToken(openParenToken as SyntaxToken) As ArrayRankSpecifierSyntax 11926Public Shadows Function AddCommaTokens(ParamArray items As SyntaxToken()) As ArrayRankSpecifierSyntax 11933Public ReadOnly Property CloseParenToken As SyntaxToken 11944Public Shadows Function WithCloseParenToken(closeParenToken as SyntaxToken) As ArrayRankSpecifierSyntax 11984Public Function Update(openParenToken As SyntaxToken, commaTokens As SyntaxTokenList, closeParenToken As SyntaxToken) As ArrayRankSpecifierSyntax 12025Public ReadOnly Property LessThanToken As SyntaxToken 12036Public Shadows Function WithLessThanToken(lessThanToken as SyntaxToken) As AttributeListSyntax 12072Public ReadOnly Property GreaterThanToken As SyntaxToken 12083Public Shadows Function WithGreaterThanToken(greaterThanToken as SyntaxToken) As AttributeListSyntax 12127Public Function Update(lessThanToken As SyntaxToken, attributes As SeparatedSyntaxList(Of AttributeSyntax), greaterThanToken As SyntaxToken) As AttributeListSyntax 12320Public ReadOnly Property AttributeModifier As SyntaxToken 12331Public Shadows Function WithAttributeModifier(attributeModifier as SyntaxToken) As AttributeTargetSyntax 12339Public ReadOnly Property ColonToken As SyntaxToken 12350Public Shadows Function WithColonToken(colonToken as SyntaxToken) As AttributeTargetSyntax 12387Public Function Update(attributeModifier As SyntaxToken, colonToken As SyntaxToken) As AttributeTargetSyntax 12615Public ReadOnly Property QuestionToken As SyntaxToken 12626Public Shadows Function WithQuestionToken(questionToken as SyntaxToken) As PrintStatementSyntax 12685Public Function Update(questionToken As SyntaxToken, expression As ExpressionSyntax) As PrintStatementSyntax 13353Public Shadows Function AddModifiers(ParamArray items As SyntaxToken()) As LocalDeclarationStatementSyntax 13462Public ReadOnly Property LabelToken As SyntaxToken 13473Public Shadows Function WithLabelToken(labelToken as SyntaxToken) As LabelStatementSyntax 13480Public ReadOnly Property ColonToken As SyntaxToken 13491Public Shadows Function WithColonToken(colonToken as SyntaxToken) As LabelStatementSyntax 13528Public Function Update(labelToken As SyntaxToken, colonToken As SyntaxToken) As LabelStatementSyntax 13569Public ReadOnly Property GoToKeyword As SyntaxToken 13580Public Shadows Function WithGoToKeyword(goToKeyword as SyntaxToken) As GoToStatementSyntax 13639Public Function Update(goToKeyword As SyntaxToken, label As LabelSyntax) As GoToStatementSyntax 13683Public ReadOnly Property LabelToken As SyntaxToken 13694Public Shadows Function WithLabelToken(labelToken as SyntaxToken) As LabelSyntax 13729Public Function Update(kind As SyntaxKind, labelToken As SyntaxToken) As LabelSyntax 13771Public ReadOnly Property StopOrEndKeyword As SyntaxToken 13782Public Shadows Function WithStopOrEndKeyword(stopOrEndKeyword as SyntaxToken) As StopOrEndStatementSyntax 13817Public Function Update(kind As SyntaxKind, stopOrEndKeyword As SyntaxToken) As StopOrEndStatementSyntax 13866Public ReadOnly Property ExitKeyword As SyntaxToken 13877Public Shadows Function WithExitKeyword(exitKeyword as SyntaxToken) As ExitStatementSyntax 13884Public ReadOnly Property BlockKeyword As SyntaxToken 13895Public Shadows Function WithBlockKeyword(blockKeyword as SyntaxToken) As ExitStatementSyntax 13935Public Function Update(kind As SyntaxKind, exitKeyword As SyntaxToken, blockKeyword As SyntaxToken) As ExitStatementSyntax 13978Public ReadOnly Property ContinueKeyword As SyntaxToken 13989Public Shadows Function WithContinueKeyword(continueKeyword as SyntaxToken) As ContinueStatementSyntax 13997Public ReadOnly Property BlockKeyword As SyntaxToken 14008Public Shadows Function WithBlockKeyword(blockKeyword as SyntaxToken) As ContinueStatementSyntax 14048Public Function Update(kind As SyntaxKind, continueKeyword As SyntaxToken, blockKeyword As SyntaxToken) As ContinueStatementSyntax 14089Public ReadOnly Property ReturnKeyword As SyntaxToken 14100Public Shadows Function WithReturnKeyword(returnKeyword as SyntaxToken) As ReturnStatementSyntax 14162Public Function Update(returnKeyword As SyntaxToken, expression As ExpressionSyntax) As ReturnStatementSyntax 14205Public ReadOnly Property IfKeyword As SyntaxToken 14216Public Shadows Function WithIfKeyword(ifKeyword as SyntaxToken) As SingleLineIfStatementSyntax 14241Public ReadOnly Property ThenKeyword As SyntaxToken 14252Public Shadows Function WithThenKeyword(thenKeyword as SyntaxToken) As SingleLineIfStatementSyntax 14363Public Function Update(ifKeyword As SyntaxToken, condition As ExpressionSyntax, thenKeyword As SyntaxToken, statements As SyntaxList(of StatementSyntax), elseClause As SingleLineElseClauseSyntax) As SingleLineIfStatementSyntax 14404Public ReadOnly Property ElseKeyword As SyntaxToken 14415Public Shadows Function WithElseKeyword(elseKeyword as SyntaxToken) As SingleLineElseClauseSyntax 14483Public Function Update(elseKeyword As SyntaxToken, statements As SyntaxList(of StatementSyntax)) As SingleLineElseClauseSyntax 14746Public ReadOnly Property IfKeyword As SyntaxToken 14757Public Shadows Function WithIfKeyword(ifKeyword as SyntaxToken) As IfStatementSyntax 14785Public ReadOnly Property ThenKeyword As SyntaxToken 14800Public Shadows Function WithThenKeyword(thenKeyword as SyntaxToken) As IfStatementSyntax 14844Public Function Update(ifKeyword As SyntaxToken, condition As ExpressionSyntax, thenKeyword As SyntaxToken) As IfStatementSyntax 15010Public ReadOnly Property ElseIfKeyword As SyntaxToken 15021Public Shadows Function WithElseIfKeyword(elseIfKeyword as SyntaxToken) As ElseIfStatementSyntax 15049Public ReadOnly Property ThenKeyword As SyntaxToken 15064Public Shadows Function WithThenKeyword(thenKeyword as SyntaxToken) As ElseIfStatementSyntax 15108Public Function Update(elseIfKeyword As SyntaxToken, condition As ExpressionSyntax, thenKeyword As SyntaxToken) As ElseIfStatementSyntax 15272Public ReadOnly Property ElseKeyword As SyntaxToken 15283Public Shadows Function WithElseKeyword(elseKeyword as SyntaxToken) As ElseStatementSyntax 15315Public Function Update(elseKeyword As SyntaxToken) As ElseStatementSyntax 15574Public ReadOnly Property TryKeyword As SyntaxToken 15585Public Shadows Function WithTryKeyword(tryKeyword as SyntaxToken) As TryStatementSyntax 15617Public Function Update(tryKeyword As SyntaxToken) As TryStatementSyntax 15785Public ReadOnly Property CatchKeyword As SyntaxToken 15796Public Shadows Function WithCatchKeyword(catchKeyword as SyntaxToken) As CatchStatementSyntax 15915Public Function Update(catchKeyword As SyntaxToken, identifierName As IdentifierNameSyntax, asClause As SimpleAsClauseSyntax, whenClause As CatchFilterClauseSyntax) As CatchStatementSyntax 15956Public ReadOnly Property WhenKeyword As SyntaxToken 15967Public Shadows Function WithWhenKeyword(whenKeyword as SyntaxToken) As CatchFilterClauseSyntax 16025Public Function Update(whenKeyword As SyntaxToken, filter As ExpressionSyntax) As CatchFilterClauseSyntax 16189Public ReadOnly Property FinallyKeyword As SyntaxToken 16200Public Shadows Function WithFinallyKeyword(finallyKeyword as SyntaxToken) As FinallyStatementSyntax 16232Public Function Update(finallyKeyword As SyntaxToken) As FinallyStatementSyntax 16273Public ReadOnly Property ErrorKeyword As SyntaxToken 16284Public Shadows Function WithErrorKeyword(errorKeyword as SyntaxToken) As ErrorStatementSyntax 16343Public Function Update(errorKeyword As SyntaxToken, errorNumber As ExpressionSyntax) As ErrorStatementSyntax 16386Public ReadOnly Property OnKeyword As SyntaxToken 16397Public Shadows Function WithOnKeyword(onKeyword as SyntaxToken) As OnErrorGoToStatementSyntax 16404Public ReadOnly Property ErrorKeyword As SyntaxToken 16415Public Shadows Function WithErrorKeyword(errorKeyword as SyntaxToken) As OnErrorGoToStatementSyntax 16422Public ReadOnly Property GoToKeyword As SyntaxToken 16433Public Shadows Function WithGoToKeyword(goToKeyword as SyntaxToken) As OnErrorGoToStatementSyntax 16443Public ReadOnly Property Minus As SyntaxToken 16457Public Shadows Function WithMinus(minus as SyntaxToken) As OnErrorGoToStatementSyntax 16528Public Function Update(kind As SyntaxKind, onKeyword As SyntaxToken, errorKeyword As SyntaxToken, goToKeyword As SyntaxToken, minus As SyntaxToken, label As LabelSyntax) As OnErrorGoToStatementSyntax 16568Public ReadOnly Property OnKeyword As SyntaxToken 16579Public Shadows Function WithOnKeyword(onKeyword as SyntaxToken) As OnErrorResumeNextStatementSyntax 16586Public ReadOnly Property ErrorKeyword As SyntaxToken 16597Public Shadows Function WithErrorKeyword(errorKeyword as SyntaxToken) As OnErrorResumeNextStatementSyntax 16604Public ReadOnly Property ResumeKeyword As SyntaxToken 16615Public Shadows Function WithResumeKeyword(resumeKeyword as SyntaxToken) As OnErrorResumeNextStatementSyntax 16622Public ReadOnly Property NextKeyword As SyntaxToken 16633Public Shadows Function WithNextKeyword(nextKeyword as SyntaxToken) As OnErrorResumeNextStatementSyntax 16676Public Function Update(onKeyword As SyntaxToken, errorKeyword As SyntaxToken, resumeKeyword As SyntaxToken, nextKeyword As SyntaxToken) As OnErrorResumeNextStatementSyntax 16720Public ReadOnly Property ResumeKeyword As SyntaxToken 16731Public Shadows Function WithResumeKeyword(resumeKeyword as SyntaxToken) As ResumeStatementSyntax 16797Public Function Update(kind As SyntaxKind, resumeKeyword As SyntaxToken, label As LabelSyntax) As ResumeStatementSyntax 16990Public ReadOnly Property SelectKeyword As SyntaxToken 17001Public Shadows Function WithSelectKeyword(selectKeyword as SyntaxToken) As SelectStatementSyntax 17011Public ReadOnly Property CaseKeyword As SyntaxToken 17026Public Shadows Function WithCaseKeyword(caseKeyword as SyntaxToken) As SelectStatementSyntax 17088Public Function Update(selectKeyword As SyntaxToken, caseKeyword As SyntaxToken, expression As ExpressionSyntax) As SelectStatementSyntax 17265Public ReadOnly Property CaseKeyword As SyntaxToken 17276Public Shadows Function WithCaseKeyword(caseKeyword as SyntaxToken) As CaseStatementSyntax 17346Public Function Update(kind As SyntaxKind, caseKeyword As SyntaxToken, cases As SeparatedSyntaxList(Of CaseClauseSyntax)) As CaseStatementSyntax 17402Public ReadOnly Property ElseKeyword As SyntaxToken 17413Public Shadows Function WithElseKeyword(elseKeyword as SyntaxToken) As ElseCaseClauseSyntax 17445Public Function Update(elseKeyword As SyntaxToken) As ElseCaseClauseSyntax 17592Public ReadOnly Property ToKeyword As SyntaxToken 17603Public Shadows Function WithToKeyword(toKeyword as SyntaxToken) As RangeCaseClauseSyntax 17669Public Function Update(lowerBound As ExpressionSyntax, toKeyword As SyntaxToken, upperBound As ExpressionSyntax) As RangeCaseClauseSyntax 17718Public ReadOnly Property IsKeyword As SyntaxToken 17733Public Shadows Function WithIsKeyword(isKeyword as SyntaxToken) As RelationalCaseClauseSyntax 17741Public ReadOnly Property OperatorToken As SyntaxToken 17752Public Shadows Function WithOperatorToken(operatorToken as SyntaxToken) As RelationalCaseClauseSyntax 17816Public Function Update(kind As SyntaxKind, isKeyword As SyntaxToken, operatorToken As SyntaxToken, value As ExpressionSyntax) As RelationalCaseClauseSyntax 17858Public ReadOnly Property SyncLockKeyword As SyntaxToken 17869Public Shadows Function WithSyncLockKeyword(syncLockKeyword as SyntaxToken) As SyncLockStatementSyntax 17928Public Function Update(syncLockKeyword As SyntaxToken, expression As ExpressionSyntax) As SyncLockStatementSyntax 18129Public ReadOnly Property DoKeyword As SyntaxToken 18140Public Shadows Function WithDoKeyword(doKeyword as SyntaxToken) As DoStatementSyntax 18206Public Function Update(kind As SyntaxKind, doKeyword As SyntaxToken, whileOrUntilClause As WhileOrUntilClauseSyntax) As DoStatementSyntax 18249Public ReadOnly Property LoopKeyword As SyntaxToken 18260Public Shadows Function WithLoopKeyword(loopKeyword as SyntaxToken) As LoopStatementSyntax 18326Public Function Update(kind As SyntaxKind, loopKeyword As SyntaxToken, whileOrUntilClause As WhileOrUntilClauseSyntax) As LoopStatementSyntax 18370Public ReadOnly Property WhileOrUntilKeyword As SyntaxToken 18381Public Shadows Function WithWhileOrUntilKeyword(whileOrUntilKeyword as SyntaxToken) As WhileOrUntilClauseSyntax 18443Public Function Update(kind As SyntaxKind, whileOrUntilKeyword As SyntaxToken, condition As ExpressionSyntax) As WhileOrUntilClauseSyntax 18485Public ReadOnly Property WhileKeyword As SyntaxToken 18496Public Shadows Function WithWhileKeyword(whileKeyword as SyntaxToken) As WhileStatementSyntax 18555Public Function Update(whileKeyword As SyntaxToken, condition As ExpressionSyntax) As WhileStatementSyntax 19035Public ReadOnly Property ForKeyword As SyntaxToken 19041Friend Overridable Function GetForKeywordCore() As SyntaxToken 19050Public Function WithForKeyword(forKeyword As SyntaxToken) As ForOrForEachStatementSyntax 19053Friend MustOverride Function WithForKeywordCore(forKeyword As SyntaxToken) As ForOrForEachStatementSyntax 19117Public Shadows ReadOnly Property ForKeyword As SyntaxToken 19123Friend Overrides Function GetForKeywordCore() As SyntaxToken 19127Friend Overrides Function WithForKeywordCore(forKeyword As SyntaxToken) As ForOrForEachStatementSyntax 19136Public Shadows Function WithForKeyword(forKeyword as SyntaxToken) As ForStatementSyntax 19172Public ReadOnly Property EqualsToken As SyntaxToken 19183Public Shadows Function WithEqualsToken(equalsToken as SyntaxToken) As ForStatementSyntax 19208Public ReadOnly Property ToKeyword As SyntaxToken 19219Public Shadows Function WithToKeyword(toKeyword as SyntaxToken) As ForStatementSyntax 19326Public Function Update(forKeyword As SyntaxToken, controlVariable As VisualBasicSyntaxNode, equalsToken As SyntaxToken, fromValue As ExpressionSyntax, toKeyword As SyntaxToken, toValue As ExpressionSyntax, stepClause As ForStepClauseSyntax) As ForStatementSyntax 19367Public ReadOnly Property StepKeyword As SyntaxToken 19378Public Shadows Function WithStepKeyword(stepKeyword as SyntaxToken) As ForStepClauseSyntax 19437Public Function Update(stepKeyword As SyntaxToken, stepValue As ExpressionSyntax) As ForStepClauseSyntax 19484Public Shadows ReadOnly Property ForKeyword As SyntaxToken 19490Friend Overrides Function GetForKeywordCore() As SyntaxToken 19494Friend Overrides Function WithForKeywordCore(forKeyword As SyntaxToken) As ForOrForEachStatementSyntax 19503Public Shadows Function WithForKeyword(forKeyword as SyntaxToken) As ForEachStatementSyntax 19510Public ReadOnly Property EachKeyword As SyntaxToken 19521Public Shadows Function WithEachKeyword(eachKeyword as SyntaxToken) As ForEachStatementSyntax 19557Public ReadOnly Property InKeyword As SyntaxToken 19568Public Shadows Function WithInKeyword(inKeyword as SyntaxToken) As ForEachStatementSyntax 19640Public Function Update(forKeyword As SyntaxToken, eachKeyword As SyntaxToken, controlVariable As VisualBasicSyntaxNode, inKeyword As SyntaxToken, expression As ExpressionSyntax) As ForEachStatementSyntax 19684Public ReadOnly Property NextKeyword As SyntaxToken 19695Public Shadows Function WithNextKeyword(nextKeyword as SyntaxToken) As NextStatementSyntax 19765Public Function Update(nextKeyword As SyntaxToken, controlVariables As SeparatedSyntaxList(Of ExpressionSyntax)) As NextStatementSyntax 19809Public ReadOnly Property UsingKeyword As SyntaxToken 19820Public Shadows Function WithUsingKeyword(usingKeyword as SyntaxToken) As UsingStatementSyntax 19920Public Function Update(usingKeyword As SyntaxToken, expression As ExpressionSyntax, variables As SeparatedSyntaxList(Of VariableDeclaratorSyntax)) As UsingStatementSyntax 19961Public ReadOnly Property ThrowKeyword As SyntaxToken 19972Public Shadows Function WithThrowKeyword(throwKeyword as SyntaxToken) As ThrowStatementSyntax 20034Public Function Update(throwKeyword As SyntaxToken, expression As ExpressionSyntax) As ThrowStatementSyntax 20105Public ReadOnly Property OperatorToken As SyntaxToken 20116Public Shadows Function WithOperatorToken(operatorToken as SyntaxToken) As AssignmentStatementSyntax 20184Public Function Update(kind As SyntaxKind, left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As AssignmentStatementSyntax 20225Public ReadOnly Property Mid As SyntaxToken 20235Public Shadows Function WithMid(mid as SyntaxToken) As MidExpressionSyntax 20299Public Function Update(mid As SyntaxToken, argumentList As ArgumentListSyntax) As MidExpressionSyntax 20340Public ReadOnly Property CallKeyword As SyntaxToken 20351Public Shadows Function WithCallKeyword(callKeyword as SyntaxToken) As CallStatementSyntax 20411Public Function Update(callKeyword As SyntaxToken, invocation As ExpressionSyntax) As CallStatementSyntax 20455Public ReadOnly Property AddHandlerOrRemoveHandlerKeyword As SyntaxToken 20466Public Shadows Function WithAddHandlerOrRemoveHandlerKeyword(addHandlerOrRemoveHandlerKeyword as SyntaxToken) As AddRemoveHandlerStatementSyntax 20491Public ReadOnly Property CommaToken As SyntaxToken 20502Public Shadows Function WithCommaToken(commaToken as SyntaxToken) As AddRemoveHandlerStatementSyntax 20574Public Function Update(kind As SyntaxKind, addHandlerOrRemoveHandlerKeyword As SyntaxToken, eventExpression As ExpressionSyntax, commaToken As SyntaxToken, delegateExpression As ExpressionSyntax) As AddRemoveHandlerStatementSyntax 20616Public ReadOnly Property RaiseEventKeyword As SyntaxToken 20627Public Shadows Function WithRaiseEventKeyword(raiseEventKeyword as SyntaxToken) As RaiseEventStatementSyntax 20718Public Function Update(raiseEventKeyword As SyntaxToken, name As IdentifierNameSyntax, argumentList As ArgumentListSyntax) As RaiseEventStatementSyntax 20761Public ReadOnly Property WithKeyword As SyntaxToken 20772Public Shadows Function WithWithKeyword(withKeyword as SyntaxToken) As WithStatementSyntax 20831Public Function Update(withKeyword As SyntaxToken, expression As ExpressionSyntax) As WithStatementSyntax 20873Public ReadOnly Property ReDimKeyword As SyntaxToken 20884Public Shadows Function WithReDimKeyword(reDimKeyword as SyntaxToken) As ReDimStatementSyntax 20895Public ReadOnly Property PreserveKeyword As SyntaxToken 20910Public Shadows Function WithPreserveKeyword(preserveKeyword as SyntaxToken) As ReDimStatementSyntax 20983Public Function Update(kind As SyntaxKind, reDimKeyword As SyntaxToken, preserveKeyword As SyntaxToken, clauses As SeparatedSyntaxList(Of RedimClauseSyntax)) As ReDimStatementSyntax 21145Public ReadOnly Property EraseKeyword As SyntaxToken 21156Public Shadows Function WithEraseKeyword(eraseKeyword as SyntaxToken) As EraseStatementSyntax 21223Public Function Update(eraseKeyword As SyntaxToken, expressions As SeparatedSyntaxList(Of ExpressionSyntax)) As EraseStatementSyntax 21296Public ReadOnly Property Token As SyntaxToken 21306Public Shadows Function WithToken(token as SyntaxToken) As LiteralExpressionSyntax 21341Public Function Update(kind As SyntaxKind, token As SyntaxToken) As LiteralExpressionSyntax 21382Public ReadOnly Property OpenParenToken As SyntaxToken 21393Public Shadows Function WithOpenParenToken(openParenToken as SyntaxToken) As ParenthesizedExpressionSyntax 21418Public ReadOnly Property CloseParenToken As SyntaxToken 21429Public Shadows Function WithCloseParenToken(closeParenToken as SyntaxToken) As ParenthesizedExpressionSyntax 21473Public Function Update(openParenToken As SyntaxToken, expression As ExpressionSyntax, closeParenToken As SyntaxToken) As ParenthesizedExpressionSyntax 21514Public ReadOnly Property OpenParenToken As SyntaxToken 21525Public Shadows Function WithOpenParenToken(openParenToken as SyntaxToken) As TupleExpressionSyntax 21558Public ReadOnly Property CloseParenToken As SyntaxToken 21569Public Shadows Function WithCloseParenToken(closeParenToken as SyntaxToken) As TupleExpressionSyntax 21613Public Function Update(openParenToken As SyntaxToken, arguments As SeparatedSyntaxList(Of SimpleArgumentSyntax), closeParenToken As SyntaxToken) As TupleExpressionSyntax 21654Public ReadOnly Property OpenParenToken As SyntaxToken 21665Public Shadows Function WithOpenParenToken(openParenToken as SyntaxToken) As TupleTypeSyntax 21698Public ReadOnly Property CloseParenToken As SyntaxToken 21709Public Shadows Function WithCloseParenToken(closeParenToken as SyntaxToken) As TupleTypeSyntax 21753Public Function Update(openParenToken As SyntaxToken, elements As SeparatedSyntaxList(Of TupleElementSyntax), closeParenToken As SyntaxToken) As TupleTypeSyntax 21897Public ReadOnly Property Identifier As SyntaxToken 21908Public Shadows Function WithIdentifier(identifier as SyntaxToken) As NamedTupleElementSyntax 21970Public Function Update(identifier As SyntaxToken, asClause As SimpleAsClauseSyntax) As NamedTupleElementSyntax 22001Public ReadOnly Property Keyword As SyntaxToken 22007Friend Overridable Function GetKeywordCore() As SyntaxToken 22016Public Function WithKeyword(keyword As SyntaxToken) As InstanceExpressionSyntax 22019Friend MustOverride Function WithKeywordCore(keyword As SyntaxToken) As InstanceExpressionSyntax 22049Public Shadows ReadOnly Property Keyword As SyntaxToken 22055Friend Overrides Function GetKeywordCore() As SyntaxToken 22059Friend Overrides Function WithKeywordCore(keyword As SyntaxToken) As InstanceExpressionSyntax 22068Public Shadows Function WithKeyword(keyword as SyntaxToken) As MeExpressionSyntax 22100Public Function Update(keyword As SyntaxToken) As MeExpressionSyntax 22140Public Shadows ReadOnly Property Keyword As SyntaxToken 22146Friend Overrides Function GetKeywordCore() As SyntaxToken 22150Friend Overrides Function WithKeywordCore(keyword As SyntaxToken) As InstanceExpressionSyntax 22159Public Shadows Function WithKeyword(keyword as SyntaxToken) As MyBaseExpressionSyntax 22191Public Function Update(keyword As SyntaxToken) As MyBaseExpressionSyntax 22231Public Shadows ReadOnly Property Keyword As SyntaxToken 22237Friend Overrides Function GetKeywordCore() As SyntaxToken 22241Friend Overrides Function WithKeywordCore(keyword As SyntaxToken) As InstanceExpressionSyntax 22250Public Shadows Function WithKeyword(keyword as SyntaxToken) As MyClassExpressionSyntax 22282Public Function Update(keyword As SyntaxToken) As MyClassExpressionSyntax 22323Public ReadOnly Property GetTypeKeyword As SyntaxToken 22334Public Shadows Function WithGetTypeKeyword(getTypeKeyword as SyntaxToken) As GetTypeExpressionSyntax 22341Public ReadOnly Property OpenParenToken As SyntaxToken 22352Public Shadows Function WithOpenParenToken(openParenToken as SyntaxToken) As GetTypeExpressionSyntax 22376Public ReadOnly Property CloseParenToken As SyntaxToken 22387Public Shadows Function WithCloseParenToken(closeParenToken as SyntaxToken) As GetTypeExpressionSyntax 22434Public Function Update(getTypeKeyword As SyntaxToken, openParenToken As SyntaxToken, type As TypeSyntax, closeParenToken As SyntaxToken) As GetTypeExpressionSyntax 22477Public ReadOnly Property TypeOfKeyword As SyntaxToken 22488Public Shadows Function WithTypeOfKeyword(typeOfKeyword as SyntaxToken) As TypeOfExpressionSyntax 22513Public ReadOnly Property OperatorToken As SyntaxToken 22524Public Shadows Function WithOperatorToken(operatorToken as SyntaxToken) As TypeOfExpressionSyntax 22595Public Function Update(kind As SyntaxKind, typeOfKeyword As SyntaxToken, expression As ExpressionSyntax, operatorToken As SyntaxToken, type As TypeSyntax) As TypeOfExpressionSyntax 22636Public ReadOnly Property GetXmlNamespaceKeyword As SyntaxToken 22647Public Shadows Function WithGetXmlNamespaceKeyword(getXmlNamespaceKeyword as SyntaxToken) As GetXmlNamespaceExpressionSyntax 22654Public ReadOnly Property OpenParenToken As SyntaxToken 22665Public Shadows Function WithOpenParenToken(openParenToken as SyntaxToken) As GetXmlNamespaceExpressionSyntax 22692Public ReadOnly Property CloseParenToken As SyntaxToken 22703Public Shadows Function WithCloseParenToken(closeParenToken as SyntaxToken) As GetXmlNamespaceExpressionSyntax 22750Public Function Update(getXmlNamespaceKeyword As SyntaxToken, openParenToken As SyntaxToken, name As XmlPrefixNameSyntax, closeParenToken As SyntaxToken) As GetXmlNamespaceExpressionSyntax 22815Public ReadOnly Property OperatorToken As SyntaxToken 22826Public Shadows Function WithOperatorToken(operatorToken as SyntaxToken) As MemberAccessExpressionSyntax 22894Public Function Update(kind As SyntaxKind, expression As ExpressionSyntax, operatorToken As SyntaxToken, name As SimpleNameSyntax) As MemberAccessExpressionSyntax 22960Public ReadOnly Property Token1 As SyntaxToken 22970Public Shadows Function WithToken1(token1 as SyntaxToken) As XmlMemberAccessExpressionSyntax 22980Public ReadOnly Property Token2 As SyntaxToken 22994Public Shadows Function WithToken2(token2 as SyntaxToken) As XmlMemberAccessExpressionSyntax 23004Public ReadOnly Property Token3 As SyntaxToken 23018Public Shadows Function WithToken3(token3 as SyntaxToken) As XmlMemberAccessExpressionSyntax 23092Public Function Update(kind As SyntaxKind, base As ExpressionSyntax, token1 As SyntaxToken, token2 As SyntaxToken, token3 As SyntaxToken, name As XmlNodeSyntax) As XmlMemberAccessExpressionSyntax 23252Public ReadOnly Property NewKeyword As SyntaxToken 23258Friend Overridable Function GetNewKeywordCore() As SyntaxToken 23267Public Function WithNewKeyword(newKeyword As SyntaxToken) As NewExpressionSyntax 23270Friend MustOverride Function WithNewKeywordCore(newKeyword As SyntaxToken) As NewExpressionSyntax 23336Public Shadows ReadOnly Property NewKeyword As SyntaxToken 23342Friend Overrides Function GetNewKeywordCore() As SyntaxToken 23346Friend Overrides Function WithNewKeywordCore(newKeyword As SyntaxToken) As NewExpressionSyntax 23355Public Shadows Function WithNewKeyword(newKeyword as SyntaxToken) As ObjectCreationExpressionSyntax 23521Public Function Update(newKeyword As SyntaxToken, attributeLists As SyntaxList(of AttributeListSyntax), type As TypeSyntax, argumentList As ArgumentListSyntax, initializer As ObjectCreationInitializerSyntax) As ObjectCreationExpressionSyntax 23562Public Shadows ReadOnly Property NewKeyword As SyntaxToken 23568Friend Overrides Function GetNewKeywordCore() As SyntaxToken 23572Friend Overrides Function WithNewKeywordCore(newKeyword As SyntaxToken) As NewExpressionSyntax 23581Public Shadows Function WithNewKeyword(newKeyword as SyntaxToken) As AnonymousObjectCreationExpressionSyntax 23691Public Function Update(newKeyword As SyntaxToken, attributeLists As SyntaxList(of AttributeListSyntax), initializer As ObjectMemberInitializerSyntax) As AnonymousObjectCreationExpressionSyntax 23735Public Shadows ReadOnly Property NewKeyword As SyntaxToken 23741Friend Overrides Function GetNewKeywordCore() As SyntaxToken 23745Friend Overrides Function WithNewKeywordCore(newKeyword As SyntaxToken) As NewExpressionSyntax 23754Public Shadows Function WithNewKeyword(newKeyword as SyntaxToken) As ArrayCreationExpressionSyntax 23955Public Function Update(newKeyword As SyntaxToken, attributeLists As SyntaxList(of AttributeListSyntax), type As TypeSyntax, arrayBounds As ArgumentListSyntax, rankSpecifiers As SyntaxList(of ArrayRankSpecifierSyntax), initializer As CollectionInitializerSyntax) As ArrayCreationExpressionSyntax 23997Public ReadOnly Property OpenBraceToken As SyntaxToken 24008Public Shadows Function WithOpenBraceToken(openBraceToken as SyntaxToken) As CollectionInitializerSyntax 24044Public ReadOnly Property CloseBraceToken As SyntaxToken 24055Public Shadows Function WithCloseBraceToken(closeBraceToken as SyntaxToken) As CollectionInitializerSyntax 24099Public Function Update(openBraceToken As SyntaxToken, initializers As SeparatedSyntaxList(Of ExpressionSyntax), closeBraceToken As SyntaxToken) As CollectionInitializerSyntax 24132Public ReadOnly Property Keyword As SyntaxToken 24138Friend Overridable Function GetKeywordCore() As SyntaxToken 24147Public Function WithKeyword(keyword As SyntaxToken) As CastExpressionSyntax 24150Friend MustOverride Function WithKeywordCore(keyword As SyntaxToken) As CastExpressionSyntax 24155Public ReadOnly Property OpenParenToken As SyntaxToken 24161Friend Overridable Function GetOpenParenTokenCore() As SyntaxToken 24170Public Function WithOpenParenToken(openParenToken As SyntaxToken) As CastExpressionSyntax 24173Friend MustOverride Function WithOpenParenTokenCore(openParenToken As SyntaxToken) As CastExpressionSyntax 24201Public ReadOnly Property CommaToken As SyntaxToken 24207Friend Overridable Function GetCommaTokenCore() As SyntaxToken 24216Public Function WithCommaToken(commaToken As SyntaxToken) As CastExpressionSyntax 24219Friend MustOverride Function WithCommaTokenCore(commaToken As SyntaxToken) As CastExpressionSyntax 24246Public ReadOnly Property CloseParenToken As SyntaxToken 24252Friend Overridable Function GetCloseParenTokenCore() As SyntaxToken 24261Public Function WithCloseParenToken(closeParenToken As SyntaxToken) As CastExpressionSyntax 24264Friend MustOverride Function WithCloseParenTokenCore(closeParenToken As SyntaxToken) As CastExpressionSyntax 24291Public Shadows ReadOnly Property Keyword As SyntaxToken 24297Friend Overrides Function GetKeywordCore() As SyntaxToken 24301Friend Overrides Function WithKeywordCore(keyword As SyntaxToken) As CastExpressionSyntax 24310Public Shadows Function WithKeyword(keyword as SyntaxToken) As CTypeExpressionSyntax 24317Public Shadows ReadOnly Property OpenParenToken As SyntaxToken 24323Friend Overrides Function GetOpenParenTokenCore() As SyntaxToken 24327Friend Overrides Function WithOpenParenTokenCore(openParenToken As SyntaxToken) As CastExpressionSyntax 24336Public Shadows Function WithOpenParenToken(openParenToken as SyntaxToken) As CTypeExpressionSyntax 24369Public Shadows ReadOnly Property CommaToken As SyntaxToken 24375Friend Overrides Function GetCommaTokenCore() As SyntaxToken 24379Friend Overrides Function WithCommaTokenCore(commaToken As SyntaxToken) As CastExpressionSyntax 24388Public Shadows Function WithCommaToken(commaToken as SyntaxToken) As CTypeExpressionSyntax 24420Public Shadows ReadOnly Property CloseParenToken As SyntaxToken 24426Friend Overrides Function GetCloseParenTokenCore() As SyntaxToken 24430Friend Overrides Function WithCloseParenTokenCore(closeParenToken As SyntaxToken) As CastExpressionSyntax 24439Public Shadows Function WithCloseParenToken(closeParenToken as SyntaxToken) As CTypeExpressionSyntax 24496Public Function Update(keyword As SyntaxToken, openParenToken As SyntaxToken, expression As ExpressionSyntax, commaToken As SyntaxToken, type As TypeSyntax, closeParenToken As SyntaxToken) As CTypeExpressionSyntax 24533Public Shadows ReadOnly Property Keyword As SyntaxToken 24539Friend Overrides Function GetKeywordCore() As SyntaxToken 24543Friend Overrides Function WithKeywordCore(keyword As SyntaxToken) As CastExpressionSyntax 24552Public Shadows Function WithKeyword(keyword as SyntaxToken) As DirectCastExpressionSyntax 24559Public Shadows ReadOnly Property OpenParenToken As SyntaxToken 24565Friend Overrides Function GetOpenParenTokenCore() As SyntaxToken 24569Friend Overrides Function WithOpenParenTokenCore(openParenToken As SyntaxToken) As CastExpressionSyntax 24578Public Shadows Function WithOpenParenToken(openParenToken as SyntaxToken) As DirectCastExpressionSyntax 24611Public Shadows ReadOnly Property CommaToken As SyntaxToken 24617Friend Overrides Function GetCommaTokenCore() As SyntaxToken 24621Friend Overrides Function WithCommaTokenCore(commaToken As SyntaxToken) As CastExpressionSyntax 24630Public Shadows Function WithCommaToken(commaToken as SyntaxToken) As DirectCastExpressionSyntax 24662Public Shadows ReadOnly Property CloseParenToken As SyntaxToken 24668Friend Overrides Function GetCloseParenTokenCore() As SyntaxToken 24672Friend Overrides Function WithCloseParenTokenCore(closeParenToken As SyntaxToken) As CastExpressionSyntax 24681Public Shadows Function WithCloseParenToken(closeParenToken as SyntaxToken) As DirectCastExpressionSyntax 24738Public Function Update(keyword As SyntaxToken, openParenToken As SyntaxToken, expression As ExpressionSyntax, commaToken As SyntaxToken, type As TypeSyntax, closeParenToken As SyntaxToken) As DirectCastExpressionSyntax 24775Public Shadows ReadOnly Property Keyword As SyntaxToken 24781Friend Overrides Function GetKeywordCore() As SyntaxToken 24785Friend Overrides Function WithKeywordCore(keyword As SyntaxToken) As CastExpressionSyntax 24794Public Shadows Function WithKeyword(keyword as SyntaxToken) As TryCastExpressionSyntax 24801Public Shadows ReadOnly Property OpenParenToken As SyntaxToken 24807Friend Overrides Function GetOpenParenTokenCore() As SyntaxToken 24811Friend Overrides Function WithOpenParenTokenCore(openParenToken As SyntaxToken) As CastExpressionSyntax 24820Public Shadows Function WithOpenParenToken(openParenToken as SyntaxToken) As TryCastExpressionSyntax 24853Public Shadows ReadOnly Property CommaToken As SyntaxToken 24859Friend Overrides Function GetCommaTokenCore() As SyntaxToken 24863Friend Overrides Function WithCommaTokenCore(commaToken As SyntaxToken) As CastExpressionSyntax 24872Public Shadows Function WithCommaToken(commaToken as SyntaxToken) As TryCastExpressionSyntax 24904Public Shadows ReadOnly Property CloseParenToken As SyntaxToken 24910Friend Overrides Function GetCloseParenTokenCore() As SyntaxToken 24914Friend Overrides Function WithCloseParenTokenCore(closeParenToken As SyntaxToken) As CastExpressionSyntax 24923Public Shadows Function WithCloseParenToken(closeParenToken as SyntaxToken) As TryCastExpressionSyntax 24980Public Function Update(keyword As SyntaxToken, openParenToken As SyntaxToken, expression As ExpressionSyntax, commaToken As SyntaxToken, type As TypeSyntax, closeParenToken As SyntaxToken) As TryCastExpressionSyntax 25022Public ReadOnly Property Keyword As SyntaxToken 25033Public Shadows Function WithKeyword(keyword as SyntaxToken) As PredefinedCastExpressionSyntax 25040Public ReadOnly Property OpenParenToken As SyntaxToken 25051Public Shadows Function WithOpenParenToken(openParenToken as SyntaxToken) As PredefinedCastExpressionSyntax 25076Public ReadOnly Property CloseParenToken As SyntaxToken 25087Public Shadows Function WithCloseParenToken(closeParenToken as SyntaxToken) As PredefinedCastExpressionSyntax 25134Public Function Update(keyword As SyntaxToken, openParenToken As SyntaxToken, expression As ExpressionSyntax, closeParenToken As SyntaxToken) As PredefinedCastExpressionSyntax 25215Public ReadOnly Property OperatorToken As SyntaxToken 25226Public Shadows Function WithOperatorToken(operatorToken as SyntaxToken) As BinaryExpressionSyntax 25294Public Function Update(kind As SyntaxKind, left As ExpressionSyntax, operatorToken As SyntaxToken, right As ExpressionSyntax) As BinaryExpressionSyntax 25338Public ReadOnly Property OperatorToken As SyntaxToken 25349Public Shadows Function WithOperatorToken(operatorToken as SyntaxToken) As UnaryExpressionSyntax 25411Public Function Update(kind As SyntaxKind, operatorToken As SyntaxToken, operand As ExpressionSyntax) As UnaryExpressionSyntax 25454Public ReadOnly Property IfKeyword As SyntaxToken 25465Public Shadows Function WithIfKeyword(ifKeyword as SyntaxToken) As BinaryConditionalExpressionSyntax 25472Public ReadOnly Property OpenParenToken As SyntaxToken 25483Public Shadows Function WithOpenParenToken(openParenToken as SyntaxToken) As BinaryConditionalExpressionSyntax 25508Public ReadOnly Property CommaToken As SyntaxToken 25519Public Shadows Function WithCommaToken(commaToken as SyntaxToken) As BinaryConditionalExpressionSyntax 25544Public ReadOnly Property CloseParenToken As SyntaxToken 25555Public Shadows Function WithCloseParenToken(closeParenToken as SyntaxToken) As BinaryConditionalExpressionSyntax 25612Public Function Update(ifKeyword As SyntaxToken, openParenToken As SyntaxToken, firstExpression As ExpressionSyntax, commaToken As SyntaxToken, secondExpression As ExpressionSyntax, closeParenToken As SyntaxToken) As BinaryConditionalExpressionSyntax 25656Public ReadOnly Property IfKeyword As SyntaxToken 25667Public Shadows Function WithIfKeyword(ifKeyword as SyntaxToken) As TernaryConditionalExpressionSyntax 25674Public ReadOnly Property OpenParenToken As SyntaxToken 25685Public Shadows Function WithOpenParenToken(openParenToken as SyntaxToken) As TernaryConditionalExpressionSyntax 25710Public ReadOnly Property FirstCommaToken As SyntaxToken 25721Public Shadows Function WithFirstCommaToken(firstCommaToken as SyntaxToken) As TernaryConditionalExpressionSyntax 25746Public ReadOnly Property SecondCommaToken As SyntaxToken 25757Public Shadows Function WithSecondCommaToken(secondCommaToken as SyntaxToken) As TernaryConditionalExpressionSyntax 25782Public ReadOnly Property CloseParenToken As SyntaxToken 25793Public Shadows Function WithCloseParenToken(closeParenToken as SyntaxToken) As TernaryConditionalExpressionSyntax 25860Public Function Update(ifKeyword As SyntaxToken, openParenToken As SyntaxToken, condition As ExpressionSyntax, firstCommaToken As SyntaxToken, whenTrue As ExpressionSyntax, secondCommaToken As SyntaxToken, whenFalse As ExpressionSyntax, closeParenToken As SyntaxToken) As TernaryConditionalExpressionSyntax 26307Public Shadows Function AddModifiers(ParamArray items As SyntaxToken()) As LambdaHeaderSyntax 26311Friend Overrides Function AddModifiersCore(ParamArray items As SyntaxToken()) As MethodBaseSyntax 26318Public ReadOnly Property SubOrFunctionKeyword As SyntaxToken 26329Public Shadows Function WithSubOrFunctionKeyword(subOrFunctionKeyword as SyntaxToken) As LambdaHeaderSyntax 26451Public Function Update(kind As SyntaxKind, attributeLists As SyntaxList(of AttributeListSyntax), modifiers As SyntaxTokenList, subOrFunctionKeyword As SyntaxToken, parameterList As ParameterListSyntax, asClause As SimpleAsClauseSyntax) As LambdaHeaderSyntax 26492Public ReadOnly Property OpenParenToken As SyntaxToken 26503Public Shadows Function WithOpenParenToken(openParenToken as SyntaxToken) As ArgumentListSyntax 26540Public ReadOnly Property CloseParenToken As SyntaxToken 26551Public Shadows Function WithCloseParenToken(closeParenToken as SyntaxToken) As ArgumentListSyntax 26595Public Function Update(openParenToken As SyntaxToken, arguments As SeparatedSyntaxList(Of ArgumentSyntax), closeParenToken As SyntaxToken) As ArgumentListSyntax 26652Public ReadOnly Property Empty As SyntaxToken 26662Public Shadows Function WithEmpty(empty as SyntaxToken) As OmittedArgumentSyntax 26694Public Function Update(empty As SyntaxToken) As OmittedArgumentSyntax 26872Public ReadOnly Property ColonEqualsToken As SyntaxToken 26883Public Shadows Function WithColonEqualsToken(colonEqualsToken as SyntaxToken) As NameColonEqualsSyntax 26924Public Function Update(name As IdentifierNameSyntax, colonEqualsToken As SyntaxToken) As NameColonEqualsSyntax 26985Public ReadOnly Property ToKeyword As SyntaxToken 26996Public Shadows Function WithToKeyword(toKeyword as SyntaxToken) As RangeArgumentSyntax 27062Public Function Update(lowerBound As ExpressionSyntax, toKeyword As SyntaxToken, upperBound As ExpressionSyntax) As RangeArgumentSyntax 27256Public ReadOnly Property InKeyword As SyntaxToken 27267Public Shadows Function WithInKeyword(inKeyword as SyntaxToken) As CollectionRangeVariableSyntax 27340Public Function Update(identifier As ModifiedIdentifierSyntax, asClause As SimpleAsClauseSyntax, inKeyword As SyntaxToken, expression As ExpressionSyntax) As CollectionRangeVariableSyntax 27666Public ReadOnly Property EqualsToken As SyntaxToken 27677Public Shadows Function WithEqualsToken(equalsToken as SyntaxToken) As VariableNameEqualsSyntax 27725Public Function Update(identifier As ModifiedIdentifierSyntax, asClause As SimpleAsClauseSyntax, equalsToken As SyntaxToken) As VariableNameEqualsSyntax 27783Public ReadOnly Property FunctionName As SyntaxToken 27794Public Shadows Function WithFunctionName(functionName as SyntaxToken) As FunctionAggregationSyntax 27804Public ReadOnly Property OpenParenToken As SyntaxToken 27819Public Shadows Function WithOpenParenToken(openParenToken as SyntaxToken) As FunctionAggregationSyntax 27850Public ReadOnly Property CloseParenToken As SyntaxToken 27865Public Shadows Function WithCloseParenToken(closeParenToken as SyntaxToken) As FunctionAggregationSyntax 27912Public Function Update(functionName As SyntaxToken, openParenToken As SyntaxToken, argument As ExpressionSyntax, closeParenToken As SyntaxToken) As FunctionAggregationSyntax 27954Public ReadOnly Property GroupKeyword As SyntaxToken 27965Public Shadows Function WithGroupKeyword(groupKeyword as SyntaxToken) As GroupAggregationSyntax 27997Public Function Update(groupKeyword As SyntaxToken) As GroupAggregationSyntax 28040Public ReadOnly Property FromKeyword As SyntaxToken 28051Public Shadows Function WithFromKeyword(fromKeyword as SyntaxToken) As FromClauseSyntax 28118Public Function Update(fromKeyword As SyntaxToken, variables As SeparatedSyntaxList(Of CollectionRangeVariableSyntax)) As FromClauseSyntax 28159Public ReadOnly Property LetKeyword As SyntaxToken 28170Public Shadows Function WithLetKeyword(letKeyword as SyntaxToken) As LetClauseSyntax 28237Public Function Update(letKeyword As SyntaxToken, variables As SeparatedSyntaxList(Of ExpressionRangeVariableSyntax)) As LetClauseSyntax 28280Public ReadOnly Property AggregateKeyword As SyntaxToken 28291Public Shadows Function WithAggregateKeyword(aggregateKeyword as SyntaxToken) As AggregateClauseSyntax 28350Public ReadOnly Property IntoKeyword As SyntaxToken 28361Public Shadows Function WithIntoKeyword(intoKeyword as SyntaxToken) As AggregateClauseSyntax 28445Public Function Update(aggregateKeyword As SyntaxToken, variables As SeparatedSyntaxList(Of CollectionRangeVariableSyntax), additionalQueryOperators As SyntaxList(of QueryClauseSyntax), intoKeyword As SyntaxToken, aggregationVariables As SeparatedSyntaxList(Of AggregationRangeVariableSyntax)) As AggregateClauseSyntax 28485Public ReadOnly Property DistinctKeyword As SyntaxToken 28496Public Shadows Function WithDistinctKeyword(distinctKeyword as SyntaxToken) As DistinctClauseSyntax 28528Public Function Update(distinctKeyword As SyntaxToken) As DistinctClauseSyntax 28569Public ReadOnly Property WhereKeyword As SyntaxToken 28580Public Shadows Function WithWhereKeyword(whereKeyword as SyntaxToken) As WhereClauseSyntax 28639Public Function Update(whereKeyword As SyntaxToken, condition As ExpressionSyntax) As WhereClauseSyntax 28682Public ReadOnly Property SkipOrTakeKeyword As SyntaxToken 28693Public Shadows Function WithSkipOrTakeKeyword(skipOrTakeKeyword as SyntaxToken) As PartitionWhileClauseSyntax 28700Public ReadOnly Property WhileKeyword As SyntaxToken 28711Public Shadows Function WithWhileKeyword(whileKeyword as SyntaxToken) As PartitionWhileClauseSyntax 28776Public Function Update(kind As SyntaxKind, skipOrTakeKeyword As SyntaxToken, whileKeyword As SyntaxToken, condition As ExpressionSyntax) As PartitionWhileClauseSyntax 28818Public ReadOnly Property SkipOrTakeKeyword As SyntaxToken 28829Public Shadows Function WithSkipOrTakeKeyword(skipOrTakeKeyword as SyntaxToken) As PartitionClauseSyntax 28890Public Function Update(kind As SyntaxKind, skipOrTakeKeyword As SyntaxToken, count As ExpressionSyntax) As PartitionClauseSyntax 28933Public ReadOnly Property GroupKeyword As SyntaxToken 28944Public Shadows Function WithGroupKeyword(groupKeyword as SyntaxToken) As GroupByClauseSyntax 28980Public ReadOnly Property ByKeyword As SyntaxToken 28991Public Shadows Function WithByKeyword(byKeyword as SyntaxToken) As GroupByClauseSyntax 29020Public ReadOnly Property IntoKeyword As SyntaxToken 29031Public Shadows Function WithIntoKeyword(intoKeyword as SyntaxToken) As GroupByClauseSyntax 29118Public Function Update(groupKeyword As SyntaxToken, items As SeparatedSyntaxList(Of ExpressionRangeVariableSyntax), byKeyword As SyntaxToken, keys As SeparatedSyntaxList(Of ExpressionRangeVariableSyntax), intoKeyword As SyntaxToken, aggregationVariables As SeparatedSyntaxList(Of AggregationRangeVariableSyntax)) As GroupByClauseSyntax 29151Public ReadOnly Property JoinKeyword As SyntaxToken 29157Friend Overridable Function GetJoinKeywordCore() As SyntaxToken 29166Public Function WithJoinKeyword(joinKeyword As SyntaxToken) As JoinClauseSyntax 29169Friend MustOverride Function WithJoinKeywordCore(joinKeyword As SyntaxToken) As JoinClauseSyntax 29232Public ReadOnly Property OnKeyword As SyntaxToken 29238Friend Overridable Function GetOnKeywordCore() As SyntaxToken 29247Public Function WithOnKeyword(onKeyword As SyntaxToken) As JoinClauseSyntax 29250Friend MustOverride Function WithOnKeywordCore(onKeyword As SyntaxToken) As JoinClauseSyntax 29327Public ReadOnly Property EqualsKeyword As SyntaxToken 29338Public Shadows Function WithEqualsKeyword(equalsKeyword as SyntaxToken) As JoinConditionSyntax 29403Public Function Update(left As ExpressionSyntax, equalsKeyword As SyntaxToken, right As ExpressionSyntax) As JoinConditionSyntax 29443Public Shadows ReadOnly Property JoinKeyword As SyntaxToken 29449Friend Overrides Function GetJoinKeywordCore() As SyntaxToken 29453Friend Overrides Function WithJoinKeywordCore(joinKeyword As SyntaxToken) As JoinClauseSyntax 29462Public Shadows Function WithJoinKeyword(joinKeyword as SyntaxToken) As SimpleJoinClauseSyntax 29541Public Shadows ReadOnly Property OnKeyword As SyntaxToken 29547Friend Overrides Function GetOnKeywordCore() As SyntaxToken 29551Friend Overrides Function WithOnKeywordCore(onKeyword As SyntaxToken) As JoinClauseSyntax 29560Public Shadows Function WithOnKeyword(onKeyword as SyntaxToken) As SimpleJoinClauseSyntax 29653Public Function Update(joinKeyword As SyntaxToken, joinedVariables As SeparatedSyntaxList(Of CollectionRangeVariableSyntax), additionalJoins As SyntaxList(of JoinClauseSyntax), onKeyword As SyntaxToken, joinConditions As SeparatedSyntaxList(Of JoinConditionSyntax)) As SimpleJoinClauseSyntax 29694Public ReadOnly Property GroupKeyword As SyntaxToken 29705Public Shadows Function WithGroupKeyword(groupKeyword as SyntaxToken) As GroupJoinClauseSyntax 29712Public Shadows ReadOnly Property JoinKeyword As SyntaxToken 29718Friend Overrides Function GetJoinKeywordCore() As SyntaxToken 29722Friend Overrides Function WithJoinKeywordCore(joinKeyword As SyntaxToken) As JoinClauseSyntax 29731Public Shadows Function WithJoinKeyword(joinKeyword as SyntaxToken) As GroupJoinClauseSyntax 29810Public Shadows ReadOnly Property OnKeyword As SyntaxToken 29816Friend Overrides Function GetOnKeywordCore() As SyntaxToken 29820Friend Overrides Function WithOnKeywordCore(onKeyword As SyntaxToken) As JoinClauseSyntax 29829Public Shadows Function WithOnKeyword(onKeyword as SyntaxToken) As GroupJoinClauseSyntax 29871Public ReadOnly Property IntoKeyword As SyntaxToken 29882Public Shadows Function WithIntoKeyword(intoKeyword as SyntaxToken) As GroupJoinClauseSyntax 29979Public Function Update(groupKeyword As SyntaxToken, joinKeyword As SyntaxToken, joinedVariables As SeparatedSyntaxList(Of CollectionRangeVariableSyntax), additionalJoins As SyntaxList(of JoinClauseSyntax), onKeyword As SyntaxToken, joinConditions As SeparatedSyntaxList(Of JoinConditionSyntax), intoKeyword As SyntaxToken, aggregationVariables As SeparatedSyntaxList(Of AggregationRangeVariableSyntax)) As GroupJoinClauseSyntax 30020Public ReadOnly Property OrderKeyword As SyntaxToken 30031Public Shadows Function WithOrderKeyword(orderKeyword as SyntaxToken) As OrderByClauseSyntax 30038Public ReadOnly Property ByKeyword As SyntaxToken 30049Public Shadows Function WithByKeyword(byKeyword as SyntaxToken) As OrderByClauseSyntax 30119Public Function Update(orderKeyword As SyntaxToken, byKeyword As SyntaxToken, orderings As SeparatedSyntaxList(Of OrderingSyntax)) As OrderByClauseSyntax 30184Public ReadOnly Property AscendingOrDescendingKeyword As SyntaxToken 30199Public Shadows Function WithAscendingOrDescendingKeyword(ascendingOrDescendingKeyword as SyntaxToken) As OrderingSyntax 30243Public Function Update(kind As SyntaxKind, expression As ExpressionSyntax, ascendingOrDescendingKeyword As SyntaxToken) As OrderingSyntax 30284Public ReadOnly Property SelectKeyword As SyntaxToken 30295Public Shadows Function WithSelectKeyword(selectKeyword as SyntaxToken) As SelectClauseSyntax 30363Public Function Update(selectKeyword As SyntaxToken, variables As SeparatedSyntaxList(Of ExpressionRangeVariableSyntax)) As SelectClauseSyntax 30590Public ReadOnly Property LessThanQuestionToken As SyntaxToken 30601Public Shadows Function WithLessThanQuestionToken(lessThanQuestionToken as SyntaxToken) As XmlDeclarationSyntax 30605Public ReadOnly Property XmlKeyword As SyntaxToken 30616Public Shadows Function WithXmlKeyword(xmlKeyword as SyntaxToken) As XmlDeclarationSyntax 30671Public ReadOnly Property QuestionGreaterThanToken As SyntaxToken 30682Public Shadows Function WithQuestionGreaterThanToken(questionGreaterThanToken as SyntaxToken) As XmlDeclarationSyntax 30743Public Function Update(lessThanQuestionToken As SyntaxToken, xmlKeyword As SyntaxToken, version As XmlDeclarationOptionSyntax, encoding As XmlDeclarationOptionSyntax, standalone As XmlDeclarationOptionSyntax, questionGreaterThanToken As SyntaxToken) As XmlDeclarationSyntax 30782Public ReadOnly Property Name As SyntaxToken 30792Public Shadows Function WithName(name as SyntaxToken) As XmlDeclarationOptionSyntax 30796Public Shadows ReadOnly Property Equals As SyntaxToken 30806Public Shadows Function WithEquals(equals as SyntaxToken) As XmlDeclarationOptionSyntax 30864Public Function Update(name As SyntaxToken, equals As SyntaxToken, value As XmlStringSyntax) As XmlDeclarationOptionSyntax 31064Public Shadows Function AddTextTokens(ParamArray items As SyntaxToken()) As XmlTextSyntax 31135Public ReadOnly Property LessThanToken As SyntaxToken 31146Public Shadows Function WithLessThanToken(lessThanToken as SyntaxToken) As XmlElementStartTagSyntax 31187Public ReadOnly Property GreaterThanToken As SyntaxToken 31198Public Shadows Function WithGreaterThanToken(greaterThanToken as SyntaxToken) As XmlElementStartTagSyntax 31249Public Function Update(lessThanToken As SyntaxToken, name As XmlNodeSyntax, attributes As SyntaxList(of XmlNodeSyntax), greaterThanToken As SyntaxToken) As XmlElementStartTagSyntax 31287Public ReadOnly Property LessThanSlashToken As SyntaxToken 31298Public Shadows Function WithLessThanSlashToken(lessThanSlashToken as SyntaxToken) As XmlElementEndTagSyntax 31319Public ReadOnly Property GreaterThanToken As SyntaxToken 31330Public Shadows Function WithGreaterThanToken(greaterThanToken as SyntaxToken) As XmlElementEndTagSyntax 31374Public Function Update(lessThanSlashToken As SyntaxToken, name As XmlNameSyntax, greaterThanToken As SyntaxToken) As XmlElementEndTagSyntax 31413Public ReadOnly Property LessThanToken As SyntaxToken 31424Public Shadows Function WithLessThanToken(lessThanToken as SyntaxToken) As XmlEmptyElementSyntax 31465Public ReadOnly Property SlashGreaterThanToken As SyntaxToken 31476Public Shadows Function WithSlashGreaterThanToken(slashGreaterThanToken as SyntaxToken) As XmlEmptyElementSyntax 31527Public Function Update(lessThanToken As SyntaxToken, name As XmlNodeSyntax, attributes As SyntaxList(of XmlNodeSyntax), slashGreaterThanToken As SyntaxToken) As XmlEmptyElementSyntax 31580Public ReadOnly Property EqualsToken As SyntaxToken 31591Public Shadows Function WithEqualsToken(equalsToken as SyntaxToken) As XmlAttributeSyntax 31653Public Function Update(name As XmlNodeSyntax, equalsToken As SyntaxToken, value As XmlNodeSyntax) As XmlAttributeSyntax 31706Public ReadOnly Property StartQuoteToken As SyntaxToken 31717Public Shadows Function WithStartQuoteToken(startQuoteToken as SyntaxToken) As XmlStringSyntax 31743Public Shadows Function AddTextTokens(ParamArray items As SyntaxToken()) As XmlStringSyntax 31747Public ReadOnly Property EndQuoteToken As SyntaxToken 31758Public Shadows Function WithEndQuoteToken(endQuoteToken as SyntaxToken) As XmlStringSyntax 31798Public Function Update(startQuoteToken As SyntaxToken, textTokens As SyntaxTokenList, endQuoteToken As SyntaxToken) As XmlStringSyntax 31835Public ReadOnly Property Name As SyntaxToken 31845Public Shadows Function WithName(name as SyntaxToken) As XmlPrefixNameSyntax 31877Public Function Update(name As SyntaxToken) As XmlPrefixNameSyntax 31934Public ReadOnly Property LocalName As SyntaxToken 31945Public Shadows Function WithLocalName(localName as SyntaxToken) As XmlNameSyntax 31986Public Function Update(prefix As XmlPrefixSyntax, localName As SyntaxToken) As XmlNameSyntax 32026Public ReadOnly Property LessThanToken As SyntaxToken 32037Public Shadows Function WithLessThanToken(lessThanToken as SyntaxToken) As XmlBracketedNameSyntax 32055Public ReadOnly Property GreaterThanToken As SyntaxToken 32066Public Shadows Function WithGreaterThanToken(greaterThanToken as SyntaxToken) As XmlBracketedNameSyntax 32110Public Function Update(lessThanToken As SyntaxToken, name As XmlNameSyntax, greaterThanToken As SyntaxToken) As XmlBracketedNameSyntax 32147Public ReadOnly Property Name As SyntaxToken 32157Public Shadows Function WithName(name as SyntaxToken) As XmlPrefixSyntax 32161Public ReadOnly Property ColonToken As SyntaxToken 32172Public Shadows Function WithColonToken(colonToken as SyntaxToken) As XmlPrefixSyntax 32209Public Function Update(name As SyntaxToken, colonToken As SyntaxToken) As XmlPrefixSyntax 32247Public ReadOnly Property LessThanExclamationMinusMinusToken As SyntaxToken 32258Public Shadows Function WithLessThanExclamationMinusMinusToken(lessThanExclamationMinusMinusToken as SyntaxToken) As XmlCommentSyntax 32281Public Shadows Function AddTextTokens(ParamArray items As SyntaxToken()) As XmlCommentSyntax 32285Public ReadOnly Property MinusMinusGreaterThanToken As SyntaxToken 32296Public Shadows Function WithMinusMinusGreaterThanToken(minusMinusGreaterThanToken as SyntaxToken) As XmlCommentSyntax 32336Public Function Update(lessThanExclamationMinusMinusToken As SyntaxToken, textTokens As SyntaxTokenList, minusMinusGreaterThanToken As SyntaxToken) As XmlCommentSyntax 32374Public ReadOnly Property LessThanQuestionToken As SyntaxToken 32385Public Shadows Function WithLessThanQuestionToken(lessThanQuestionToken as SyntaxToken) As XmlProcessingInstructionSyntax 32389Public ReadOnly Property Name As SyntaxToken 32399Public Shadows Function WithName(name as SyntaxToken) As XmlProcessingInstructionSyntax 32422Public Shadows Function AddTextTokens(ParamArray items As SyntaxToken()) As XmlProcessingInstructionSyntax 32426Public ReadOnly Property QuestionGreaterThanToken As SyntaxToken 32437Public Shadows Function WithQuestionGreaterThanToken(questionGreaterThanToken as SyntaxToken) As XmlProcessingInstructionSyntax 32480Public Function Update(lessThanQuestionToken As SyntaxToken, name As SyntaxToken, textTokens As SyntaxTokenList, questionGreaterThanToken As SyntaxToken) As XmlProcessingInstructionSyntax 32517Public ReadOnly Property BeginCDataToken As SyntaxToken 32528Public Shadows Function WithBeginCDataToken(beginCDataToken as SyntaxToken) As XmlCDataSectionSyntax 32551Public Shadows Function AddTextTokens(ParamArray items As SyntaxToken()) As XmlCDataSectionSyntax 32555Public ReadOnly Property EndCDataToken As SyntaxToken 32566Public Shadows Function WithEndCDataToken(endCDataToken as SyntaxToken) As XmlCDataSectionSyntax 32606Public Function Update(beginCDataToken As SyntaxToken, textTokens As SyntaxTokenList, endCDataToken As SyntaxToken) As XmlCDataSectionSyntax 32645Public ReadOnly Property LessThanPercentEqualsToken As SyntaxToken 32656Public Shadows Function WithLessThanPercentEqualsToken(lessThanPercentEqualsToken as SyntaxToken) As XmlEmbeddedExpressionSyntax 32675Public ReadOnly Property PercentGreaterThanToken As SyntaxToken 32686Public Shadows Function WithPercentGreaterThanToken(percentGreaterThanToken as SyntaxToken) As XmlEmbeddedExpressionSyntax 32730Public Function Update(lessThanPercentEqualsToken As SyntaxToken, expression As ExpressionSyntax, percentGreaterThanToken As SyntaxToken) As XmlEmbeddedExpressionSyntax 32929Public ReadOnly Property QuestionMarkToken As SyntaxToken 32940Public Shadows Function WithQuestionMarkToken(questionMarkToken as SyntaxToken) As NullableTypeSyntax 32981Public Function Update(elementType As TypeSyntax, questionMarkToken As SyntaxToken) As NullableTypeSyntax 33022Public ReadOnly Property Keyword As SyntaxToken 33033Public Shadows Function WithKeyword(keyword as SyntaxToken) As PredefinedTypeSyntax 33065Public Function Update(keyword As SyntaxToken) As PredefinedTypeSyntax 33111Public ReadOnly Property Identifier As SyntaxToken 33117Friend Overridable Function GetIdentifierCore() As SyntaxToken 33126Public Function WithIdentifier(identifier As SyntaxToken) As SimpleNameSyntax 33129Friend MustOverride Function WithIdentifierCore(identifier As SyntaxToken) As SimpleNameSyntax 33160Public Shadows ReadOnly Property Identifier As SyntaxToken 33166Friend Overrides Function GetIdentifierCore() As SyntaxToken 33170Friend Overrides Function WithIdentifierCore(identifier As SyntaxToken) As SimpleNameSyntax 33179Public Shadows Function WithIdentifier(identifier as SyntaxToken) As IdentifierNameSyntax 33211Public Function Update(identifier As SyntaxToken) As IdentifierNameSyntax 33253Public Shadows ReadOnly Property Identifier As SyntaxToken 33259Friend Overrides Function GetIdentifierCore() As SyntaxToken 33263Friend Overrides Function WithIdentifierCore(identifier As SyntaxToken) As SimpleNameSyntax 33272Public Shadows Function WithIdentifier(identifier as SyntaxToken) As GenericNameSyntax 33336Public Function Update(identifier As SyntaxToken, typeArgumentList As TypeArgumentListSyntax) As GenericNameSyntax 33396Public ReadOnly Property DotToken As SyntaxToken 33407Public Shadows Function WithDotToken(dotToken as SyntaxToken) As QualifiedNameSyntax 33473Public Function Update(left As NameSyntax, dotToken As SyntaxToken, right As SimpleNameSyntax) As QualifiedNameSyntax 33513Public ReadOnly Property GlobalKeyword As SyntaxToken 33524Public Shadows Function WithGlobalKeyword(globalKeyword as SyntaxToken) As GlobalNameSyntax 33556Public Function Update(globalKeyword As SyntaxToken) As GlobalNameSyntax 33597Public ReadOnly Property OpenParenToken As SyntaxToken 33608Public Shadows Function WithOpenParenToken(openParenToken as SyntaxToken) As TypeArgumentListSyntax 33615Public ReadOnly Property OfKeyword As SyntaxToken 33626Public Shadows Function WithOfKeyword(ofKeyword as SyntaxToken) As TypeArgumentListSyntax 33659Public ReadOnly Property CloseParenToken As SyntaxToken 33670Public Shadows Function WithCloseParenToken(closeParenToken as SyntaxToken) As TypeArgumentListSyntax 33717Public Function Update(openParenToken As SyntaxToken, ofKeyword As SyntaxToken, arguments As SeparatedSyntaxList(Of TypeSyntax), closeParenToken As SyntaxToken) As TypeArgumentListSyntax 33900Public ReadOnly Property OpenParenToken As SyntaxToken 33911Public Shadows Function WithOpenParenToken(openParenToken as SyntaxToken) As CrefSignatureSyntax 33938Public ReadOnly Property CloseParenToken As SyntaxToken 33949Public Shadows Function WithCloseParenToken(closeParenToken as SyntaxToken) As CrefSignatureSyntax 33993Public Function Update(openParenToken As SyntaxToken, argumentTypes As SeparatedSyntaxList(Of CrefSignaturePartSyntax), closeParenToken As SyntaxToken) As CrefSignatureSyntax 34031Public ReadOnly Property Modifier As SyntaxToken 34046Public Shadows Function WithModifier(modifier as SyntaxToken) As CrefSignaturePartSyntax 34104Public Function Update(modifier As SyntaxToken, type As TypeSyntax) As CrefSignaturePartSyntax 34138Public ReadOnly Property OperatorKeyword As SyntaxToken 34149Public Shadows Function WithOperatorKeyword(operatorKeyword as SyntaxToken) As CrefOperatorReferenceSyntax 34153Public ReadOnly Property OperatorToken As SyntaxToken 34164Public Shadows Function WithOperatorToken(operatorToken as SyntaxToken) As CrefOperatorReferenceSyntax 34201Public Function Update(operatorKeyword As SyntaxToken, operatorToken As SyntaxToken) As CrefOperatorReferenceSyntax 34251Public ReadOnly Property DotToken As SyntaxToken 34262Public Shadows Function WithDotToken(dotToken as SyntaxToken) As QualifiedCrefOperatorReferenceSyntax 34324Public Function Update(left As NameSyntax, dotToken As SyntaxToken, right As CrefOperatorReferenceSyntax) As QualifiedCrefOperatorReferenceSyntax 34365Public ReadOnly Property YieldKeyword As SyntaxToken 34376Public Shadows Function WithYieldKeyword(yieldKeyword as SyntaxToken) As YieldStatementSyntax 34435Public Function Update(yieldKeyword As SyntaxToken, expression As ExpressionSyntax) As YieldStatementSyntax 34476Public ReadOnly Property AwaitKeyword As SyntaxToken 34487Public Shadows Function WithAwaitKeyword(awaitKeyword as SyntaxToken) As AwaitExpressionSyntax 34546Public Function Update(awaitKeyword As SyntaxToken, expression As ExpressionSyntax) As AwaitExpressionSyntax 34617Public Shadows Function AddTokens(ParamArray items As SyntaxToken()) As SkippedTokensTriviaSyntax 34798Public ReadOnly Property EqualsToken As SyntaxToken 34809Public Shadows Function WithEqualsToken(equalsToken as SyntaxToken) As XmlCrefAttributeSyntax 34813Public ReadOnly Property StartQuoteToken As SyntaxToken 34824Public Shadows Function WithStartQuoteToken(startQuoteToken as SyntaxToken) As XmlCrefAttributeSyntax 34843Public ReadOnly Property EndQuoteToken As SyntaxToken 34854Public Shadows Function WithEndQuoteToken(endQuoteToken as SyntaxToken) As XmlCrefAttributeSyntax 34908Public Function Update(name As XmlNameSyntax, equalsToken As SyntaxToken, startQuoteToken As SyntaxToken, reference As CrefReferenceSyntax, endQuoteToken As SyntaxToken) As XmlCrefAttributeSyntax 34963Public ReadOnly Property EqualsToken As SyntaxToken 34974Public Shadows Function WithEqualsToken(equalsToken as SyntaxToken) As XmlNameAttributeSyntax 34978Public ReadOnly Property StartQuoteToken As SyntaxToken 34989Public Shadows Function WithStartQuoteToken(startQuoteToken as SyntaxToken) As XmlNameAttributeSyntax 35008Public ReadOnly Property EndQuoteToken As SyntaxToken 35019Public Shadows Function WithEndQuoteToken(endQuoteToken as SyntaxToken) As XmlNameAttributeSyntax 35073Public Function Update(name As XmlNameSyntax, equalsToken As SyntaxToken, startQuoteToken As SyntaxToken, reference As IdentifierNameSyntax, endQuoteToken As SyntaxToken) As XmlNameAttributeSyntax 35136Public ReadOnly Property QuestionMarkToken As SyntaxToken 35147Public Shadows Function WithQuestionMarkToken(questionMarkToken as SyntaxToken) As ConditionalAccessExpressionSyntax 35214Public Function Update(expression As ExpressionSyntax, questionMarkToken As SyntaxToken, whenNotNull As ExpressionSyntax) As ConditionalAccessExpressionSyntax 35255Public ReadOnly Property NameOfKeyword As SyntaxToken 35266Public Shadows Function WithNameOfKeyword(nameOfKeyword as SyntaxToken) As NameOfExpressionSyntax 35273Public ReadOnly Property OpenParenToken As SyntaxToken 35284Public Shadows Function WithOpenParenToken(openParenToken as SyntaxToken) As NameOfExpressionSyntax 35309Public ReadOnly Property CloseParenToken As SyntaxToken 35320Public Shadows Function WithCloseParenToken(closeParenToken as SyntaxToken) As NameOfExpressionSyntax 35367Public Function Update(nameOfKeyword As SyntaxToken, openParenToken As SyntaxToken, argument As ExpressionSyntax, closeParenToken As SyntaxToken) As NameOfExpressionSyntax 35408Public ReadOnly Property DollarSignDoubleQuoteToken As SyntaxToken 35419Public Shadows Function WithDollarSignDoubleQuoteToken(dollarSignDoubleQuoteToken as SyntaxToken) As InterpolatedStringExpressionSyntax 35449Public ReadOnly Property DoubleQuoteToken As SyntaxToken 35460Public Shadows Function WithDoubleQuoteToken(doubleQuoteToken as SyntaxToken) As InterpolatedStringExpressionSyntax 35504Public Function Update(dollarSignDoubleQuoteToken As SyntaxToken, contents As SyntaxList(of InterpolatedStringContentSyntax), doubleQuoteToken As SyntaxToken) As InterpolatedStringExpressionSyntax 35559Public ReadOnly Property TextToken As SyntaxToken 35570Public Shadows Function WithTextToken(textToken as SyntaxToken) As InterpolatedStringTextSyntax 35602Public Function Update(textToken As SyntaxToken) As InterpolatedStringTextSyntax 35646Public ReadOnly Property OpenBraceToken As SyntaxToken 35657Public Shadows Function WithOpenBraceToken(openBraceToken as SyntaxToken) As InterpolationSyntax 35725Public ReadOnly Property CloseBraceToken As SyntaxToken 35736Public Shadows Function WithCloseBraceToken(closeBraceToken as SyntaxToken) As InterpolationSyntax 35794Public Function Update(openBraceToken As SyntaxToken, expression As ExpressionSyntax, alignmentClause As InterpolationAlignmentClauseSyntax, formatClause As InterpolationFormatClauseSyntax, closeBraceToken As SyntaxToken) As InterpolationSyntax 35836Public ReadOnly Property CommaToken As SyntaxToken 35847Public Shadows Function WithCommaToken(commaToken as SyntaxToken) As InterpolationAlignmentClauseSyntax 35905Public Function Update(commaToken As SyntaxToken, value As ExpressionSyntax) As InterpolationAlignmentClauseSyntax 35946Public ReadOnly Property ColonToken As SyntaxToken 35957Public Shadows Function WithColonToken(colonToken as SyntaxToken) As InterpolationFormatClauseSyntax 35964Public ReadOnly Property FormatStringToken As SyntaxToken 35975Public Shadows Function WithFormatStringToken(formatStringToken as SyntaxToken) As InterpolationFormatClauseSyntax 36012Public Function Update(colonToken As SyntaxToken, formatStringToken As SyntaxToken) As InterpolationFormatClauseSyntax 36043Public ReadOnly Property HashToken As SyntaxToken 36049Friend Overridable Function GetHashTokenCore() As SyntaxToken 36058Public Function WithHashToken(hashToken As SyntaxToken) As DirectiveTriviaSyntax 36061Friend MustOverride Function WithHashTokenCore(hashToken As SyntaxToken) As DirectiveTriviaSyntax 36092Public Shadows ReadOnly Property HashToken As SyntaxToken 36098Friend Overrides Function GetHashTokenCore() As SyntaxToken 36102Friend Overrides Function WithHashTokenCore(hashToken As SyntaxToken) As DirectiveTriviaSyntax 36111Public Shadows Function WithHashToken(hashToken as SyntaxToken) As ConstDirectiveTriviaSyntax 36118Public ReadOnly Property ConstKeyword As SyntaxToken 36129Public Shadows Function WithConstKeyword(constKeyword as SyntaxToken) As ConstDirectiveTriviaSyntax 36136Public ReadOnly Property Name As SyntaxToken 36146Public Shadows Function WithName(name as SyntaxToken) As ConstDirectiveTriviaSyntax 36153Public ReadOnly Property EqualsToken As SyntaxToken 36164Public Shadows Function WithEqualsToken(equalsToken as SyntaxToken) As ConstDirectiveTriviaSyntax 36232Public Function Update(hashToken As SyntaxToken, constKeyword As SyntaxToken, name As SyntaxToken, equalsToken As SyntaxToken, value As ExpressionSyntax) As ConstDirectiveTriviaSyntax 36275Public Shadows ReadOnly Property HashToken As SyntaxToken 36281Friend Overrides Function GetHashTokenCore() As SyntaxToken 36285Friend Overrides Function WithHashTokenCore(hashToken As SyntaxToken) As DirectiveTriviaSyntax 36294Public Shadows Function WithHashToken(hashToken as SyntaxToken) As IfDirectiveTriviaSyntax 36301Public ReadOnly Property ElseKeyword As SyntaxToken 36316Public Shadows Function WithElseKeyword(elseKeyword as SyntaxToken) As IfDirectiveTriviaSyntax 36320Public ReadOnly Property IfOrElseIfKeyword As SyntaxToken 36331Public Shadows Function WithIfOrElseIfKeyword(ifOrElseIfKeyword as SyntaxToken) As IfDirectiveTriviaSyntax 36353Public ReadOnly Property ThenKeyword As SyntaxToken 36368Public Shadows Function WithThenKeyword(thenKeyword as SyntaxToken) As IfDirectiveTriviaSyntax 36421Public Function Update(kind As SyntaxKind, hashToken As SyntaxToken, elseKeyword As SyntaxToken, ifOrElseIfKeyword As SyntaxToken, condition As ExpressionSyntax, thenKeyword As SyntaxToken) As IfDirectiveTriviaSyntax 36461Public Shadows ReadOnly Property HashToken As SyntaxToken 36467Friend Overrides Function GetHashTokenCore() As SyntaxToken 36471Friend Overrides Function WithHashTokenCore(hashToken As SyntaxToken) As DirectiveTriviaSyntax 36480Public Shadows Function WithHashToken(hashToken as SyntaxToken) As ElseDirectiveTriviaSyntax 36484Public ReadOnly Property ElseKeyword As SyntaxToken 36495Public Shadows Function WithElseKeyword(elseKeyword as SyntaxToken) As ElseDirectiveTriviaSyntax 36532Public Function Update(hashToken As SyntaxToken, elseKeyword As SyntaxToken) As ElseDirectiveTriviaSyntax 36572Public Shadows ReadOnly Property HashToken As SyntaxToken 36578Friend Overrides Function GetHashTokenCore() As SyntaxToken 36582Friend Overrides Function WithHashTokenCore(hashToken As SyntaxToken) As DirectiveTriviaSyntax 36591Public Shadows Function WithHashToken(hashToken as SyntaxToken) As EndIfDirectiveTriviaSyntax 36595Public ReadOnly Property EndKeyword As SyntaxToken 36606Public Shadows Function WithEndKeyword(endKeyword as SyntaxToken) As EndIfDirectiveTriviaSyntax 36610Public ReadOnly Property IfKeyword As SyntaxToken 36621Public Shadows Function WithIfKeyword(ifKeyword as SyntaxToken) As EndIfDirectiveTriviaSyntax 36661Public Function Update(hashToken As SyntaxToken, endKeyword As SyntaxToken, ifKeyword As SyntaxToken) As EndIfDirectiveTriviaSyntax 36701Public Shadows ReadOnly Property HashToken As SyntaxToken 36707Friend Overrides Function GetHashTokenCore() As SyntaxToken 36711Friend Overrides Function WithHashTokenCore(hashToken As SyntaxToken) As DirectiveTriviaSyntax 36720Public Shadows Function WithHashToken(hashToken as SyntaxToken) As RegionDirectiveTriviaSyntax 36727Public ReadOnly Property RegionKeyword As SyntaxToken 36738Public Shadows Function WithRegionKeyword(regionKeyword as SyntaxToken) As RegionDirectiveTriviaSyntax 36745Public ReadOnly Property Name As SyntaxToken 36755Public Shadows Function WithName(name as SyntaxToken) As RegionDirectiveTriviaSyntax 36795Public Function Update(hashToken As SyntaxToken, regionKeyword As SyntaxToken, name As SyntaxToken) As RegionDirectiveTriviaSyntax 36835Public Shadows ReadOnly Property HashToken As SyntaxToken 36841Friend Overrides Function GetHashTokenCore() As SyntaxToken 36845Friend Overrides Function WithHashTokenCore(hashToken As SyntaxToken) As DirectiveTriviaSyntax 36854Public Shadows Function WithHashToken(hashToken as SyntaxToken) As EndRegionDirectiveTriviaSyntax 36861Public ReadOnly Property EndKeyword As SyntaxToken 36872Public Shadows Function WithEndKeyword(endKeyword as SyntaxToken) As EndRegionDirectiveTriviaSyntax 36879Public ReadOnly Property RegionKeyword As SyntaxToken 36890Public Shadows Function WithRegionKeyword(regionKeyword as SyntaxToken) As EndRegionDirectiveTriviaSyntax 36930Public Function Update(hashToken As SyntaxToken, endKeyword As SyntaxToken, regionKeyword As SyntaxToken) As EndRegionDirectiveTriviaSyntax 36971Public Shadows ReadOnly Property HashToken As SyntaxToken 36977Friend Overrides Function GetHashTokenCore() As SyntaxToken 36981Friend Overrides Function WithHashTokenCore(hashToken As SyntaxToken) As DirectiveTriviaSyntax 36990Public Shadows Function WithHashToken(hashToken as SyntaxToken) As ExternalSourceDirectiveTriviaSyntax 36994Public ReadOnly Property ExternalSourceKeyword As SyntaxToken 37005Public Shadows Function WithExternalSourceKeyword(externalSourceKeyword as SyntaxToken) As ExternalSourceDirectiveTriviaSyntax 37009Public ReadOnly Property OpenParenToken As SyntaxToken 37020Public Shadows Function WithOpenParenToken(openParenToken as SyntaxToken) As ExternalSourceDirectiveTriviaSyntax 37024Public ReadOnly Property ExternalSource As SyntaxToken 37035Public Shadows Function WithExternalSource(externalSource as SyntaxToken) As ExternalSourceDirectiveTriviaSyntax 37039Public ReadOnly Property CommaToken As SyntaxToken 37050Public Shadows Function WithCommaToken(commaToken as SyntaxToken) As ExternalSourceDirectiveTriviaSyntax 37054Public ReadOnly Property LineStart As SyntaxToken 37065Public Shadows Function WithLineStart(lineStart as SyntaxToken) As ExternalSourceDirectiveTriviaSyntax 37069Public ReadOnly Property CloseParenToken As SyntaxToken 37080Public Shadows Function WithCloseParenToken(closeParenToken as SyntaxToken) As ExternalSourceDirectiveTriviaSyntax 37132Public Function Update(hashToken As SyntaxToken, externalSourceKeyword As SyntaxToken, openParenToken As SyntaxToken, externalSource As SyntaxToken, commaToken As SyntaxToken, lineStart As SyntaxToken, closeParenToken As SyntaxToken) As ExternalSourceDirectiveTriviaSyntax 37172Public Shadows ReadOnly Property HashToken As SyntaxToken 37178Friend Overrides Function GetHashTokenCore() As SyntaxToken 37182Friend Overrides Function WithHashTokenCore(hashToken As SyntaxToken) As DirectiveTriviaSyntax 37191Public Shadows Function WithHashToken(hashToken as SyntaxToken) As EndExternalSourceDirectiveTriviaSyntax 37195Public ReadOnly Property EndKeyword As SyntaxToken 37206Public Shadows Function WithEndKeyword(endKeyword as SyntaxToken) As EndExternalSourceDirectiveTriviaSyntax 37210Public ReadOnly Property ExternalSourceKeyword As SyntaxToken 37221Public Shadows Function WithExternalSourceKeyword(externalSourceKeyword as SyntaxToken) As EndExternalSourceDirectiveTriviaSyntax 37261Public Function Update(hashToken As SyntaxToken, endKeyword As SyntaxToken, externalSourceKeyword As SyntaxToken) As EndExternalSourceDirectiveTriviaSyntax 37301Public Shadows ReadOnly Property HashToken As SyntaxToken 37307Friend Overrides Function GetHashTokenCore() As SyntaxToken 37311Friend Overrides Function WithHashTokenCore(hashToken As SyntaxToken) As DirectiveTriviaSyntax 37320Public Shadows Function WithHashToken(hashToken as SyntaxToken) As ExternalChecksumDirectiveTriviaSyntax 37324Public ReadOnly Property ExternalChecksumKeyword As SyntaxToken 37335Public Shadows Function WithExternalChecksumKeyword(externalChecksumKeyword as SyntaxToken) As ExternalChecksumDirectiveTriviaSyntax 37339Public ReadOnly Property OpenParenToken As SyntaxToken 37350Public Shadows Function WithOpenParenToken(openParenToken as SyntaxToken) As ExternalChecksumDirectiveTriviaSyntax 37354Public ReadOnly Property ExternalSource As SyntaxToken 37365Public Shadows Function WithExternalSource(externalSource as SyntaxToken) As ExternalChecksumDirectiveTriviaSyntax 37369Public ReadOnly Property FirstCommaToken As SyntaxToken 37380Public Shadows Function WithFirstCommaToken(firstCommaToken as SyntaxToken) As ExternalChecksumDirectiveTriviaSyntax 37384Public ReadOnly Property Guid As SyntaxToken 37394Public Shadows Function WithGuid(guid as SyntaxToken) As ExternalChecksumDirectiveTriviaSyntax 37398Public ReadOnly Property SecondCommaToken As SyntaxToken 37409Public Shadows Function WithSecondCommaToken(secondCommaToken as SyntaxToken) As ExternalChecksumDirectiveTriviaSyntax 37413Public ReadOnly Property Checksum As SyntaxToken 37424Public Shadows Function WithChecksum(checksum as SyntaxToken) As ExternalChecksumDirectiveTriviaSyntax 37428Public ReadOnly Property CloseParenToken As SyntaxToken 37439Public Shadows Function WithCloseParenToken(closeParenToken as SyntaxToken) As ExternalChecksumDirectiveTriviaSyntax 37497Public Function Update(hashToken As SyntaxToken, externalChecksumKeyword As SyntaxToken, openParenToken As SyntaxToken, externalSource As SyntaxToken, firstCommaToken As SyntaxToken, guid As SyntaxToken, secondCommaToken As SyntaxToken, checksum As SyntaxToken, closeParenToken As SyntaxToken) As ExternalChecksumDirectiveTriviaSyntax 37538Public Shadows ReadOnly Property HashToken As SyntaxToken 37544Friend Overrides Function GetHashTokenCore() As SyntaxToken 37548Friend Overrides Function WithHashTokenCore(hashToken As SyntaxToken) As DirectiveTriviaSyntax 37557Public Shadows Function WithHashToken(hashToken as SyntaxToken) As EnableWarningDirectiveTriviaSyntax 37561Public ReadOnly Property EnableKeyword As SyntaxToken 37572Public Shadows Function WithEnableKeyword(enableKeyword as SyntaxToken) As EnableWarningDirectiveTriviaSyntax 37576Public ReadOnly Property WarningKeyword As SyntaxToken 37587Public Shadows Function WithWarningKeyword(warningKeyword as SyntaxToken) As EnableWarningDirectiveTriviaSyntax 37657Public Function Update(hashToken As SyntaxToken, enableKeyword As SyntaxToken, warningKeyword As SyntaxToken, errorCodes As SeparatedSyntaxList(Of IdentifierNameSyntax)) As EnableWarningDirectiveTriviaSyntax 37698Public Shadows ReadOnly Property HashToken As SyntaxToken 37704Friend Overrides Function GetHashTokenCore() As SyntaxToken 37708Friend Overrides Function WithHashTokenCore(hashToken As SyntaxToken) As DirectiveTriviaSyntax 37717Public Shadows Function WithHashToken(hashToken as SyntaxToken) As DisableWarningDirectiveTriviaSyntax 37721Public ReadOnly Property DisableKeyword As SyntaxToken 37732Public Shadows Function WithDisableKeyword(disableKeyword as SyntaxToken) As DisableWarningDirectiveTriviaSyntax 37736Public ReadOnly Property WarningKeyword As SyntaxToken 37747Public Shadows Function WithWarningKeyword(warningKeyword as SyntaxToken) As DisableWarningDirectiveTriviaSyntax 37817Public Function Update(hashToken As SyntaxToken, disableKeyword As SyntaxToken, warningKeyword As SyntaxToken, errorCodes As SeparatedSyntaxList(Of IdentifierNameSyntax)) As DisableWarningDirectiveTriviaSyntax 37857Public Shadows ReadOnly Property HashToken As SyntaxToken 37863Friend Overrides Function GetHashTokenCore() As SyntaxToken 37867Friend Overrides Function WithHashTokenCore(hashToken As SyntaxToken) As DirectiveTriviaSyntax 37876Public Shadows Function WithHashToken(hashToken as SyntaxToken) As ReferenceDirectiveTriviaSyntax 37880Public ReadOnly Property ReferenceKeyword As SyntaxToken 37891Public Shadows Function WithReferenceKeyword(referenceKeyword as SyntaxToken) As ReferenceDirectiveTriviaSyntax 37895Public ReadOnly Property File As SyntaxToken 37905Public Shadows Function WithFile(file as SyntaxToken) As ReferenceDirectiveTriviaSyntax 37945Public Function Update(hashToken As SyntaxToken, referenceKeyword As SyntaxToken, file As SyntaxToken) As ReferenceDirectiveTriviaSyntax 37988Public Shadows ReadOnly Property HashToken As SyntaxToken 37994Friend Overrides Function GetHashTokenCore() As SyntaxToken 37998Friend Overrides Function WithHashTokenCore(hashToken As SyntaxToken) As DirectiveTriviaSyntax 38007Public Shadows Function WithHashToken(hashToken as SyntaxToken) As BadDirectiveTriviaSyntax 38039Public Function Update(hashToken As SyntaxToken) As BadDirectiveTriviaSyntax
Lowering\Instrumentation\CodeCoverageInstrumenter.vb (1)
546Private Shared Function SkipAttributes(syntax As SyntaxNode, attributes As SyntaxList(Of AttributeListSyntax), modifiers As SyntaxTokenList, keyword As SyntaxToken) As Text.TextSpan
Lowering\Instrumentation\DebugInfoInjector_SequencePoints.vb (1)
97Dim firstModifierOrKeyword As SyntaxToken
Symbols\LabelSymbol.vb (1)
98Friend Overridable ReadOnly Property LabelName As SyntaxToken
Symbols\LexicalSortKey.vb (1)
147Public Sub New(token As SyntaxToken, compilation As VisualBasicCompilation)
Symbols\Source\CustomEventAccessorSymbol.vb (2)
254Private Shared Function CheckEventMethodParameterModifier(container As Symbol, token As SyntaxToken, flag As SourceParameterFlags, diagnostics As BindingDiagnosticBag) As SourceParameterFlags 271Private Shared Function CheckAddRemoveParameterModifier(container As Symbol, token As SyntaxToken, flag As SourceParameterFlags, diagnostics As BindingDiagnosticBag) As SourceParameterFlags
Symbols\Source\LocalSymbol.vb (14)
32declaringIdentifier As SyntaxToken, 46declaringIdentifier As SyntaxToken, 59declaringIdentifier As SyntaxToken, 79declaringIdentifier As SyntaxToken, 92declaringIdentifier As SyntaxToken, 171Friend MustOverride ReadOnly Property IdentifierToken As SyntaxToken 486Protected ReadOnly _identifierToken As SyntaxToken 491identifierToken As SyntaxToken, 598Friend NotOverridable Overrides ReadOnly Property IdentifierToken As SyntaxToken 648declaringIdentifier As SyntaxToken, 684declaringIdentifier As SyntaxToken, 748declaringIdentifier As SyntaxToken, 831declaringIdentifier As SyntaxToken, 995Friend Overrides ReadOnly Property IdentifierToken As SyntaxToken
Symbols\Source\RangeVariableSymbol.vb (3)
130declaringIdentifier As SyntaxToken, 160Private ReadOnly _identifierToken As SyntaxToken 164declaringIdentifier As SyntaxToken,
Symbols\Source\SourceFieldSymbol.vb (2)
873Private Shared Function GetFieldLocationFromSyntax(node As SyntaxToken) As TextSpan 880Friend Shared Function FindFieldOrWithEventsSymbolFromSyntax(variableName As SyntaxToken,
Symbols\Source\SourceLabelSymbol.vb (3)
19Private ReadOnly _labelName As SyntaxToken ' the label name token, this can be an identifier or an integer literal. This is used as its location. 23Public Sub New(labelNameToken As SyntaxToken, containingMethod As MethodSymbol, binder As Binder) 36Friend Overrides ReadOnly Property LabelName As SyntaxToken
Symbols\Source\SourceMethodSymbol.vb (4)
146Dim partialToken As SyntaxToken = Nothing 151Dim token As SyntaxToken = modifierList(index) 177Dim nextToken As SyntaxToken = modifierList(index) 2234Private Shared Function GetNameToken(methodStatement As MethodBaseSyntax) As SyntaxToken
Symbols\Source\SourceNamedTypeSymbol.vb (5)
128Friend Function GetTypeIdentifierToken(node As VisualBasicSyntaxNode) As SyntaxToken 287Dim id As SyntaxToken = Nothing 405ByRef id As SyntaxToken) As DeclarationModifiers 476Dim id As SyntaxToken = GetTypeIdentifierToken(node) 663Dim id As SyntaxToken = Nothing
Symbols\Source\SourcePropertyAccessorSymbol.vb (1)
464Private Shared Function CheckParameterModifier(container As Symbol, token As SyntaxToken, flag As SourceParameterFlags, diagnostics As BindingDiagnosticBag) As SourceParameterFlags
Symbols\Source\SourcePropertySymbol.vb (1)
233identifier As SyntaxToken,
Symbols\Source\SourceSymbolHelpers.vb (1)
12Public Function GetAsClauseLocation(identifier As SyntaxToken, asClauseOpt As AsClauseSyntax) As SyntaxNodeOrToken
Symbols\Source\UnboundLambdaParameterSymbol.vb (2)
38Public ReadOnly Property IdentifierSyntax As SyntaxToken 101Private Shared Function GetModifierToken(modifiers As SyntaxTokenList, tokenKind As SyntaxKind) As SyntaxToken
Symbols\Symbol.vb (1)
373Dim token = CType(location.SourceTree.GetRoot().FindToken(location.SourceSpan.Start), SyntaxToken)
Symbols\SynthesizedSymbols\SynthesizedLocal.vb (1)
51Friend NotOverridable Overrides ReadOnly Property IdentifierToken As SyntaxToken
Syntax\CompilationUnitSyntax.vb (1)
11Private ReadOnly Property ICompilationUnitSyntax_EndOfFileToken As SyntaxToken Implements ICompilationUnitSyntax.EndOfFileToken
Syntax\CrefOperatorReferenceSyntax.vb (2)
13Public ReadOnly Property Keyword As SyntaxToken 21Public Function WithKeyword(keyword As SyntaxToken) As CrefOperatorReferenceSyntax
Syntax\MethodBaseSyntax.vb (40)
14Public MustOverride ReadOnly Property DeclarationKeyword As SyntaxToken 20Public MustOverride Function WithDeclarationKeyword(keyword As SyntaxToken) As MethodBaseSyntax 24Public ReadOnly Property Keyword As SyntaxToken 32Public Function WithKeyword(keyword As SyntaxToken) As MethodBaseSyntax 40Public Overrides ReadOnly Property DeclarationKeyword As SyntaxToken 46Public Overrides Function WithDeclarationKeyword(keyword As SyntaxToken) As MethodBaseSyntax 52Public Shadows ReadOnly Property Keyword As SyntaxToken 60Public Shadows Function WithKeyword(keyword As SyntaxToken) As MethodStatementSyntax 68Public Overrides ReadOnly Property DeclarationKeyword As SyntaxToken 74Public Overrides Function WithDeclarationKeyword(keyword As SyntaxToken) As MethodBaseSyntax 80Public Shadows ReadOnly Property Keyword As SyntaxToken 88Public Shadows Function WithKeyword(keyword As SyntaxToken) As DelegateStatementSyntax 95Public Overrides ReadOnly Property DeclarationKeyword As SyntaxToken 101Public Overrides Function WithDeclarationKeyword(keyword As SyntaxToken) As MethodBaseSyntax 107Public Shadows ReadOnly Property Keyword As SyntaxToken 115Public Shadows Function WithKeyword(keyword As SyntaxToken) As DeclareStatementSyntax 123Public Overrides ReadOnly Property DeclarationKeyword As SyntaxToken 129Public Overrides Function WithDeclarationKeyword(keyword As SyntaxToken) As MethodBaseSyntax 135Public Shadows ReadOnly Property Keyword As SyntaxToken 143Public Shadows Function WithKeyword(keyword As SyntaxToken) As LambdaHeaderSyntax 151Public Overrides ReadOnly Property DeclarationKeyword As SyntaxToken 157Public Overrides Function WithDeclarationKeyword(keyword As SyntaxToken) As MethodBaseSyntax 163Public Shadows ReadOnly Property Keyword As SyntaxToken 171Public Shadows Function WithKeyword(keyword As SyntaxToken) As SubNewStatementSyntax 179Public Overrides ReadOnly Property DeclarationKeyword As SyntaxToken 185Public Overrides Function WithDeclarationKeyword(keyword As SyntaxToken) As MethodBaseSyntax 191Public Shadows ReadOnly Property Keyword As SyntaxToken 199Public Shadows Function WithKeyword(keyword As SyntaxToken) As EventStatementSyntax 207Public Overrides ReadOnly Property DeclarationKeyword As SyntaxToken 213Public Overrides Function WithDeclarationKeyword(keyword As SyntaxToken) As MethodBaseSyntax 219Public Shadows ReadOnly Property Keyword As SyntaxToken 227Public Shadows Function WithKeyword(keyword As SyntaxToken) As PropertyStatementSyntax 235Public Overrides ReadOnly Property DeclarationKeyword As SyntaxToken 241Public Overrides Function WithDeclarationKeyword(keyword As SyntaxToken) As MethodBaseSyntax 247Public Shadows ReadOnly Property Keyword As SyntaxToken 255Public Shadows Function WithKeyword(keyword As SyntaxToken) As OperatorStatementSyntax 263Public Overrides ReadOnly Property DeclarationKeyword As SyntaxToken 269Public Overrides Function WithDeclarationKeyword(keyword As SyntaxToken) As MethodBaseSyntax 275Public Shadows ReadOnly Property Keyword As SyntaxToken 283Public Shadows Function WithKeyword(keyword As SyntaxToken) As AccessorStatementSyntax
Syntax\SyntaxEquivalence.vb (2)
36Public Function AreEquivalent(before As SyntaxToken, after As SyntaxToken) As Boolean
Syntax\SyntaxExtensions.vb (6)
34Public Function NormalizeWhitespace(token As SyntaxToken, indentation As String, elasticTrivia As Boolean) As SyntaxToken 39Public Function NormalizeWhitespace(token As SyntaxToken, Optional indentation As String = Microsoft.CodeAnalysis.SyntaxNodeExtensions.DefaultIndentation, Optional eol As String = Microsoft.CodeAnalysis.SyntaxNodeExtensions.DefaultEOL, Optional elasticTrivia As Boolean = False, Optional useDefaultCasing As Boolean = False) As SyntaxToken 103Public Function WithIdentifier(simpleName As SimpleNameSyntax, identifier As SyntaxToken) As SimpleNameSyntax 125Dim nameToken As SyntaxToken = expr.ExtractAnonymousTypeMemberName(ignore)
Syntax\SyntaxFactory.vb (61)
184Public Shared Function Token(kind As SyntaxKind, Optional text As String = Nothing) As SyntaxToken 186Return CType(InternalSyntax.SyntaxFactory.Token(ElasticMarker.UnderlyingNode, kind, ElasticMarker.UnderlyingNode, text), SyntaxToken) 189Friend Shared Function Token(kind As SyntaxKind, trailing As SyntaxTrivia, Optional text As String = Nothing) As SyntaxToken 193Public Shared Function Token(kind As SyntaxKind, trailing As SyntaxTriviaList, Optional text As String = Nothing) As SyntaxToken 195Return CType(InternalSyntax.SyntaxFactory.Token(ElasticMarker.UnderlyingNode, kind, trailing.Node, text), SyntaxToken) 198Public Shared Function Token(leading As SyntaxTriviaList, kind As SyntaxKind, Optional text As String = Nothing) As SyntaxToken 200Return CType(InternalSyntax.SyntaxFactory.Token(leading.Node, kind, ElasticMarker.UnderlyingNode, text), SyntaxToken) 203Friend Shared Function Token(leading As SyntaxTrivia, kind As SyntaxKind, trailing As SyntaxTrivia, Optional text As String = Nothing) As SyntaxToken 207Public Shared Function Token(leading As SyntaxTriviaList, kind As SyntaxKind, trailing As SyntaxTriviaList, Optional text As String = Nothing) As SyntaxToken 209Return CType(InternalSyntax.SyntaxFactory.Token(leading.Node, kind, trailing.Node, text), SyntaxToken) 214Public Shared Function Literal(value As Integer) As SyntaxToken 220Public Shared Function Literal(text As String, value As Integer) As SyntaxToken 229Public Shared Function Literal(leading As SyntaxTriviaList, text As String, value As Integer, trailing As SyntaxTriviaList) As SyntaxToken 231leading.Node, trailing.Node), SyntaxToken) 237Public Shared Function Literal(value As UInteger) As SyntaxToken 244Public Shared Function Literal(text As String, value As UInteger) As SyntaxToken 253Public Shared Function Literal(leading As SyntaxTriviaList, text As String, value As UInteger, trailing As SyntaxTriviaList) As SyntaxToken 255leading.Node, trailing.Node), SyntaxToken) 260Public Shared Function Literal(value As Long) As SyntaxToken 267Public Shared Function Literal(text As String, value As Long) As SyntaxToken 276Public Shared Function Literal(leading As SyntaxTriviaList, text As String, value As Long, trailing As SyntaxTriviaList) As SyntaxToken 278leading.Node, trailing.Node), SyntaxToken) 283Public Shared Function Literal(value As ULong) As SyntaxToken 290Public Shared Function Literal(text As String, value As ULong) As SyntaxToken 299Public Shared Function Literal(leading As SyntaxTriviaList, text As String, value As ULong, trailing As SyntaxTriviaList) As SyntaxToken 301leading.Node, trailing.Node), SyntaxToken) 306Public Shared Function Literal(value As Single) As SyntaxToken 313Public Shared Function Literal(text As String, value As Single) As SyntaxToken 322Public Shared Function Literal(leading As SyntaxTriviaList, text As String, value As Single, trailing As SyntaxTriviaList) As SyntaxToken 324leading.Node, trailing.Node), SyntaxToken) 329Public Shared Function Literal(value As Double) As SyntaxToken 336Public Shared Function Literal(text As String, value As Double) As SyntaxToken 345Public Shared Function Literal(leading As SyntaxTriviaList, text As String, value As Double, trailing As SyntaxTriviaList) As SyntaxToken 347leading.Node, trailing.Node), SyntaxToken) 352Public Shared Function Literal(value As Decimal) As SyntaxToken 359Public Shared Function Literal(text As String, value As Decimal) As SyntaxToken 368Public Shared Function Literal(leading As SyntaxTriviaList, text As String, value As Decimal, trailing As SyntaxTriviaList) As SyntaxToken 370leading.Node, trailing.Node), SyntaxToken) 375Public Shared Function Literal(value As String) As SyntaxToken 382Public Shared Function Literal(text As String, value As String) As SyntaxToken 391Public Shared Function Literal(leading As SyntaxTriviaList, text As String, value As String, trailing As SyntaxTriviaList) As SyntaxToken 393leading.Node, trailing.Node), SyntaxToken) 398Public Shared Function Literal(value As Char) As SyntaxToken 405Public Shared Function Literal(text As String, value As Char) As SyntaxToken 414Public Shared Function Literal(leading As SyntaxTriviaList, text As String, value As Char, trailing As SyntaxTriviaList) As SyntaxToken 416leading.Node, trailing.Node), SyntaxToken) 438Public Shared Function TypeStatement(ByVal statementKind As SyntaxKind, Optional ByVal attributes As SyntaxList(Of AttributeListSyntax) = Nothing, Optional ByVal modifiers As SyntaxTokenList = Nothing, Optional ByVal keyword As SyntaxToken = Nothing, Optional ByVal identifier As SyntaxToken = Nothing, Optional ByVal typeParameterList As TypeParameterListSyntax = Nothing) As TypeStatementSyntax 836Public Shared Function XmlTextNewLine(text As String) As SyntaxToken 847Public Shared Function XmlTextNewLine(text As String, value As String, leading As SyntaxTriviaList, trailing As SyntaxTriviaList) As SyntaxToken 863Public Shared Function XmlTextNewLine(text As String, continueXmlDocumentationComment As Boolean) As SyntaxToken 890Public Shared Function XmlText(ParamArray textTokens As SyntaxToken()) As XmlTextSyntax 898Public Shared Function XmlTextLiteral(value As String) As SyntaxToken 912Public Shared Function XmlTextLiteral(text As String, value As String) As SyntaxToken 922Private Shared Function XmlReplaceBracketTokens(originalToken As SyntaxToken, rewrittenToken As SyntaxToken) As SyntaxToken 978Public Shared Function AreEquivalent(oldToken As SyntaxToken, newToken As SyntaxToken) As Boolean 1031Private Shared Function IsPartOfLinqQueryNotFollowedByNewLine(token As SyntaxToken, statementNode As SyntaxNode, endOfFileToken As SyntaxToken) As Boolean
Syntax\SyntaxFacts.vb (7)
285Dim beginTerminator As SyntaxToken = Nothing 308Dim followingToken As SyntaxToken = possibleBlock.GetLastToken(includeZeroWidth:=True).GetNextToken() 333ByRef beginTerminator As SyntaxToken, 514Dim beginTerminator As SyntaxToken = Nothing 614Public Shared Function VarianceKindFromToken(token As SyntaxToken) As VarianceKind 801Public Shared Function AllowsTrailingImplicitLineContinuation(token As SyntaxToken) As Boolean 1040Public Shared Function AllowsLeadingImplicitLineContinuation(token As SyntaxToken) As Boolean
Syntax\SyntaxNodeExtensions.vb (2)
102Friend Function ExtractAnonymousTypeMemberName(input As ExpressionSyntax, <Out()> ByRef failedToInferFromXmlName As XmlNameSyntax) As SyntaxToken 322Public Function QueryClauseKeywordOrRangeVariableIdentifier(syntax As SyntaxNode) As SyntaxToken
Syntax\SyntaxNodeFactories.vb (30)
128Public Shared Function ParseToken(text As String, Optional offset As Integer = 0, Optional startStatement As Boolean = False) As SyntaxToken 142''' the <see cref="SyntaxToken.GetLocation"/> API may yield surprising results for 151Optional options As VisualBasicParseOptions = Nothing) As IEnumerable(Of SyntaxToken) 312Public Shared Function IntegerLiteralToken(text As String, base As LiteralBase, typeSuffix As TypeCharacter, value As ULong) As SyntaxToken 316Public Shared Function IntegerLiteralToken(leadingTrivia As SyntaxTriviaList, text As String, base As LiteralBase, typeSuffix As TypeCharacter, value As ULong, trailingTrivia As SyntaxTriviaList) As SyntaxToken 324Public Shared Function FloatingLiteralToken(text As String, typeSuffix As TypeCharacter, value As Double) As SyntaxToken 328Public Shared Function FloatingLiteralToken(leadingTrivia As SyntaxTriviaList, text As String, typeSuffix As TypeCharacter, value As Double, trailingTrivia As SyntaxTriviaList) As SyntaxToken 336Public Shared Function Identifier(text As String, isBracketed As Boolean, identifierText As String, typeCharacter As TypeCharacter) As SyntaxToken 340Friend Shared Function Identifier(leadingTrivia As SyntaxTrivia, text As String, isBracketed As Boolean, identifierText As String, typeCharacter As TypeCharacter, trailingTrivia As SyntaxTrivia) As SyntaxToken 344Public Shared Function Identifier(leadingTrivia As SyntaxTriviaList, text As String, isBracketed As Boolean, identifierText As String, typeCharacter As TypeCharacter, trailingTrivia As SyntaxTriviaList) As SyntaxToken 352Public Shared Function Identifier(text As String) As SyntaxToken 356Friend Shared Function Identifier(leadingTrivia As SyntaxTrivia, text As String, trailingTrivia As SyntaxTrivia) As SyntaxToken 360Public Shared Function Identifier(leadingTrivia As SyntaxTriviaList, text As String, trailingTrivia As SyntaxTriviaList) As SyntaxToken 371Public Shared Function BracketedIdentifier(text As String) As SyntaxToken 378Public Shared Function BracketedIdentifier(leadingTrivia As SyntaxTriviaList, text As String, trailingTrivia As SyntaxTriviaList) As SyntaxToken 393Friend Shared Function MissingIdentifier() As SyntaxToken 401Friend Shared Function MissingIdentifier(kind As SyntaxKind) As SyntaxToken 410Friend Shared Function MissingKeyword(kind As SyntaxKind) As SyntaxToken 418Friend Shared Function MissingPunctuation(kind As SyntaxKind) As SyntaxToken 426Friend Shared Function MissingStringLiteral() As SyntaxToken 433Friend Shared Function MissingCharacterLiteralToken() As SyntaxToken 440Friend Shared Function MissingIntegerLiteralToken() As SyntaxToken 450Friend Shared Function MissingToken(kind As SyntaxKind) As SyntaxToken 451Dim t As SyntaxToken 744Public Shared Function BadToken(text As String) As SyntaxToken 748Public Shared Function BadToken(leadingTrivia As SyntaxTriviaList, text As String, trailingTrivia As SyntaxTriviaList) As SyntaxToken 805Public Shared Function TokenList(token As SyntaxToken) As SyntaxTokenList 813Public Shared Function TokenList(ParamArray tokens As SyntaxToken()) As SyntaxTokenList 821Public Shared Function TokenList(tokens As IEnumerable(Of SyntaxToken)) As SyntaxTokenList 914Public Shared Function SeparatedList(Of TNode As SyntaxNode)(nodes As IEnumerable(Of TNode), separators As IEnumerable(Of SyntaxToken)) As SeparatedSyntaxList(Of TNode)
Syntax\SyntaxNodePartials.vb (4)
25Private Shared ReadOnly s_hasDirectivesFunction As Func(Of SyntaxToken, Boolean) = Function(n) n.ContainsDirectives 28Dim token = CType(MyBase.ParentTrivia.Token, SyntaxToken) 53Dim token As SyntaxToken = CType(MyBase.ParentTrivia.Token, SyntaxToken)
Syntax\SyntaxNodeRemover.vb (4)
122Public Overrides Function VisitToken(token As SyntaxToken) As SyntaxToken 233Private Sub AddTrivia(token As SyntaxToken, node As SyntaxNode) 260Private Sub AddTrivia(node As SyntaxNode, token As SyntaxToken)
Syntax\SyntaxNormalizer.vb (20)
24Private _previousToken As SyntaxToken 29Private ReadOnly _lineBreaksAfterToken As Dictionary(Of SyntaxToken, Integer) = New Dictionary(Of SyntaxToken, Integer)() 63Friend Shared Function Normalize(token As SyntaxToken, indentWhitespace As String, eolWhitespace As String, useElasticTrivia As Boolean, useDefaultCasing As Boolean) As SyntaxToken 65Dim result As SyntaxToken = normalizer.VisitToken(token) 106Public Overrides Function VisitToken(token As SyntaxToken) As SyntaxToken 114Dim newToken As SyntaxToken 144Dim nextToken As SyntaxToken = GetNextRelevantToken(token) 302Private Function IsLastTokenOnLine(token As SyntaxToken) As Boolean 307Private Function LineBreaksBetween(currentToken As SyntaxToken, nextToken As SyntaxToken) As Integer 414Private Function NeedsSeparator(token As SyntaxToken, nextToken As SyntaxToken) As Boolean 669Private Function GetNextRelevantToken(token As SyntaxToken) As SyntaxToken 670Dim nextToken = token.GetNextToken(Function(t As SyntaxToken) 701Private Sub AddLinebreaksAfterTokenIfNeeded(node As SyntaxToken, linebreaksAfterToken As Integer) 707Private Function EndsWithColonSeparator(node As SyntaxToken) As Boolean
Syntax\SyntaxReplacer.vb (39)
19Optional tokens As IEnumerable(Of SyntaxToken) = Nothing, 20Optional computeReplacementToken As Func(Of SyntaxToken, SyntaxToken, SyntaxToken) = Nothing, 34root As SyntaxToken, 37Optional tokens As IEnumerable(Of SyntaxToken) = Nothing, 38Optional computeReplacementToken As Func(Of SyntaxToken, SyntaxToken, SyntaxToken) = Nothing, 40Optional computeReplacementTrivia As Func(Of SyntaxTrivia, SyntaxTrivia, SyntaxTrivia) = Nothing) As SyntaxToken 55Private ReadOnly _computeReplacementToken As Func(Of SyntaxToken, SyntaxToken, SyntaxToken) 59Private ReadOnly _tokenSet As HashSet(Of SyntaxToken) 70tokens As IEnumerable(Of SyntaxToken), 71computeReplacementToken As Func(Of SyntaxToken, SyntaxToken, SyntaxToken), 80Me._tokenSet = If(tokens IsNot Nothing, New HashSet(Of SyntaxToken)(tokens), s_noTokens) 97Private Shared ReadOnly s_noTokens As HashSet(Of SyntaxToken) = New HashSet(Of SyntaxToken)() 160Public Overrides Function VisitToken(token As SyntaxToken) As SyntaxToken 197Public Shared Function ReplaceTokenInList(root As SyntaxNode, tokenInList As SyntaxToken, newTokens As IEnumerable(Of SyntaxToken)) As SyntaxNode 201Public Shared Function InsertTokenInList(root As SyntaxNode, tokenInList As SyntaxToken, newTokens As IEnumerable(Of SyntaxToken), insertBefore As Boolean) As SyntaxNode 213Public Shared Function ReplaceTriviaInList(root As SyntaxToken, triviaInList As SyntaxTrivia, newTrivia As IEnumerable(Of SyntaxTrivia)) As SyntaxToken 217Public Shared Function InsertTriviaInList(root As SyntaxToken, triviaInList As SyntaxTrivia, newTrivia As IEnumerable(Of SyntaxTrivia), insertBefore As Boolean) As SyntaxToken 268Public Overrides Function VisitToken(token As SyntaxToken) As SyntaxToken 343Private ReadOnly _originalToken As SyntaxToken 344Private ReadOnly _newTokens As IEnumerable(Of SyntaxToken) 346Public Sub New(originalToken As SyntaxToken, newTokens As IEnumerable(Of SyntaxToken), editKind As ListEditKind) 352Public Overrides Function VisitToken(token As SyntaxToken) As SyntaxToken
Syntax\TypeStatementSyntax.vb (20)
20Public MustOverride ReadOnly Property DeclarationKeyword As SyntaxToken 26Public MustOverride Function WithDeclarationKeyword(keyword As SyntaxToken) As TypeStatementSyntax 30Public ReadOnly Property Keyword As SyntaxToken 38Public Function WithKeyword(keyword As SyntaxToken) As TypeStatementSyntax 46Public Overrides ReadOnly Property DeclarationKeyword As SyntaxToken 52Public Overrides Function WithDeclarationKeyword(keyword As SyntaxToken) As TypeStatementSyntax 58Public Shadows ReadOnly Property Keyword As SyntaxToken 66Public Shadows Function WithKeyword(keyword As SyntaxToken) As ModuleStatementSyntax 74Public Overrides ReadOnly Property DeclarationKeyword As SyntaxToken 80Public Overrides Function WithDeclarationKeyword(keyword As SyntaxToken) As TypeStatementSyntax 86Public Shadows ReadOnly Property Keyword As SyntaxToken 94Public Shadows Function WithKeyword(keyword As SyntaxToken) As StructureStatementSyntax 102Public Overrides ReadOnly Property DeclarationKeyword As SyntaxToken 108Public Overrides Function WithDeclarationKeyword(keyword As SyntaxToken) As TypeStatementSyntax 114Public Shadows ReadOnly Property Keyword As SyntaxToken 122Public Shadows Function WithKeyword(keyword As SyntaxToken) As ClassStatementSyntax 130Public Overrides ReadOnly Property DeclarationKeyword As SyntaxToken 136Public Overrides Function WithDeclarationKeyword(keyword As SyntaxToken) As TypeStatementSyntax 142Public Shadows ReadOnly Property Keyword As SyntaxToken 150Public Shadows Function WithKeyword(keyword As SyntaxToken) As InterfaceStatementSyntax
Syntax\VisualBasicSyntaxNode.vb (13)
319Optional includeDocumentationComments As Boolean = False) As SyntaxToken 320Return CType(MyBase.GetFirstToken(includeZeroWidth, includeSkipped, includeDirectives, includeDocumentationComments), SyntaxToken) 326Optional includeDocumentationComments As Boolean = False) As SyntaxToken 327Return CType(MyBase.GetLastToken(includeZeroWidth, includeSkipped, includeDirectives, includeDocumentationComments), SyntaxToken) 370Dim token As SyntaxToken = child.AsToken 396Optional tokens As IEnumerable(Of SyntaxToken) = Nothing, 397Optional computeReplacementToken As Func(Of SyntaxToken, SyntaxToken, SyntaxToken) = Nothing, 416Protected Overrides Function ReplaceTokenInListCore(originalToken As SyntaxToken, newTokens As IEnumerable(Of SyntaxToken)) As SyntaxNode 420Protected Overrides Function InsertTokensInListCore(originalToken As SyntaxToken, newTokens As IEnumerable(Of SyntaxToken), insertBefore As Boolean) As SyntaxNode
Syntax\VisualBasicSyntaxNode_TreeTraversalHelpers.vb (1)
19Public Shadows Function FindToken(position As Integer, Optional findInsideTrivia As Boolean = False) As SyntaxToken
Syntax\VisualBasicSyntaxRewriter.vb (8)
45Public Overridable Function VisitToken(token As SyntaxToken) As SyntaxToken 128Public Overridable Function VisitListElement(token As SyntaxToken) As SyntaxToken 141Dim separator As SyntaxToken = list.GetSeparator(i) 142Dim visitedSeparator As SyntaxToken = Me.VisitListSeparator(separator) 186Public Overridable Function VisitListSeparator(token As SyntaxToken) As SyntaxToken
Syntax\VisualBasicSyntaxTree.vb (3)
329Public Overrides Function GetDiagnostics(token As SyntaxToken) As IEnumerable(Of Diagnostic) 406Private Function InDocumentationComment(token As SyntaxToken) As Boolean 411Return InDocumentationComment(CType(trivia.Token, SyntaxToken))
Syntax\VisualBasicSyntaxWalker.vb (4)
8''' visiting each SyntaxNode and its child <see cref="SyntaxNode"/>s and <see cref="SyntaxToken"/>s in depth-first order. 55Public Overridable Sub VisitToken(token As SyntaxToken) 62Public Overridable Sub VisitLeadingTrivia(token As SyntaxToken) 70Public Overridable Sub VisitTrailingTrivia(token As SyntaxToken)
VisualBasicExtensions.vb (23)
34''' Determines if <see cref="SyntaxToken"/> is of a specified kind. 40Public Function IsKind(token As SyntaxToken, kind As SyntaxKind) As Boolean 157Friend Function FirstOrDefault(list As SyntaxTokenList, kind As SyntaxKind) As SyntaxToken 163Friend Function First(list As SyntaxTokenList, kind As SyntaxKind) As SyntaxToken 196''' Returns <see cref="SyntaxKind"/> for <see cref="SyntaxToken"/> from <see cref="SyntaxToken.RawKind"/> property. 199Public Function Kind(token As SyntaxToken) As SyntaxKind 275Friend Function Errors(token As SyntaxToken) As InternalSyntax.SyntaxDiagnosticInfoList 280Friend Function GetSyntaxErrors(token As SyntaxToken, tree As SyntaxTree) As ReadOnlyCollection(Of Diagnostic) 290Public Function IsBracketed(token As SyntaxToken) As Boolean 304Public Function GetTypeCharacter(token As SyntaxToken) As TypeCharacter 332Public Function GetBase(token As SyntaxToken) As LiteralBase? 346Public Function IsKeyword(token As SyntaxToken) As Boolean 356Public Function IsReservedKeyword(token As SyntaxToken) As Boolean 365Public Function IsContextualKeyword(token As SyntaxToken) As Boolean 375Public Function IsPreprocessorKeyword(token As SyntaxToken) As Boolean 383Public Function GetIdentifierText(token As SyntaxToken) As String 396Public Function Insert(list As SyntaxTokenList, index As Integer, ParamArray items As SyntaxToken()) As SyntaxTokenList 428Public Function Add(list As SyntaxTokenList, ParamArray items As SyntaxToken()) As SyntaxTokenList 440Public Function ReplaceTrivia(token As SyntaxToken, oldTrivia As SyntaxTrivia, newTrivia As SyntaxTrivia) As SyntaxToken 448Public Function ReplaceTrivia(token As SyntaxToken, trivia As IEnumerable(Of SyntaxTrivia), computeReplacementTrivia As Func(Of SyntaxTrivia, SyntaxTrivia, SyntaxTrivia)) As SyntaxToken
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (277)
src\Analyzers\VisualBasic\Analyzers\AddAccessibilityModifiers\VisualBasicAddAccessibilityModifiers.vb (1)
22ByRef name As SyntaxToken,
src\Analyzers\VisualBasic\Analyzers\AddAccessibilityModifiers\VisualBasicAddAccessibilityModifiersDiagnosticAnalyzer.vb (1)
58Dim name As SyntaxToken = Nothing
src\Analyzers\VisualBasic\Analyzers\AddRequiredParentheses\VisualBasicAddRequiredParenthesesDiagnosticAnalyzer.vb (1)
47Protected Overrides Function GetPartsOfBinaryLike(binaryLike As BinaryExpressionSyntax) As (ExpressionSyntax, SyntaxToken, ExpressionSyntax)
src\Analyzers\VisualBasic\Analyzers\RemoveUnnecessaryImports\VisualBasicRemoveUnnecessaryImportsDiagnosticAnalyzer.vb (1)
60Protected Overrides Function TryGetLastToken(node As SyntaxNode) As SyntaxToken?
src\Analyzers\VisualBasic\Analyzers\UseCollectionInitializer\VisualBasicUpdateExpressionSyntaxHelper.vb (2)
14Public Sub GetPartsOfForeachStatement(statement As StatementSyntax, ByRef awaitKeyword As SyntaxToken, ByRef identifier As SyntaxToken, ByRef expression As ExpressionSyntax, ByRef statements As IEnumerable(Of StatementSyntax)) Implements IUpdateExpressionSyntaxHelper(Of ExpressionSyntax, StatementSyntax).GetPartsOfForeachStatement
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\EmbeddedLanguages\VirtualChars\VisualBasicVirtualCharService.vb (2)
30Protected Overrides Function IsMultiLineRawStringToken(token As SyntaxToken) As Boolean 34Protected Overrides Function TryConvertToVirtualCharsWorker(token As SyntaxToken) As VirtualCharSequence
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ParenthesizedExpressionSyntaxExtensions.vb (3)
13Private Function EndsQuery(token As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean 28Private Function EndsVariableDeclarator(token As SyntaxToken) As Boolean 34Private Function EndsLambda(token As SyntaxToken) As Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (3)
16name As SyntaxToken, 30Public Function LookupName(semanticModel As SemanticModel, name As SyntaxToken, 72Public Function GetSymbolInfo(semanticModel As SemanticModel, token As SyntaxToken) As SymbolInfo
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SingleLineRewriter.vb (2)
20Public Overrides Function VisitToken(token As SyntaxToken) As SyntaxToken
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\StatementSyntaxExtensions.vb (2)
304Public Function GetNameToken(member As StatementSyntax) As SyntaxToken 354Public Function GetMemberKeywordToken(member As DeclarationStatementSyntax) As SyntaxToken
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxNodeExtensions.vb (9)
379token As SyntaxToken, 754Public Function GetBraces(node As SyntaxNode) As (openBrace As SyntaxToken, closeBrace As SyntaxToken) 759Function(n As SyntaxNode) CType(Nothing, (SyntaxToken, SyntaxToken))) 763Public Function GetParentheses(node As SyntaxNode) As ValueTuple(Of SyntaxToken, SyntaxToken) 782Function(n As SyntaxNode) CType(Nothing, (SyntaxToken, SyntaxToken)))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTokenExtensions.vb (26)
13Public Function IsKind(token As SyntaxToken, kind1 As SyntaxKind, kind2 As SyntaxKind) As Boolean 19Public Function IsKind(token As SyntaxToken, ParamArray kinds As SyntaxKind()) As Boolean 24Public Function IsKindOrHasMatchingText(token As SyntaxToken, kind As SyntaxKind) As Boolean 30Public Function HasMatchingText(token As SyntaxToken, kind As SyntaxKind) As Boolean 35Public Function IsCharacterLiteral(token As SyntaxToken) As Boolean 40Public Function IsNumericLiteral(token As SyntaxToken) As Boolean 49Public Function IsNewOnRightSideOfDotOrBang(token As SyntaxToken) As Boolean 57Public Function IsSkipped(token As SyntaxToken) As Boolean 62Public Function FirstAncestorOrSelf(token As SyntaxToken, predicate As Func(Of SyntaxNode, Boolean)) As SyntaxNode 67Public Function HasAncestor(Of T As SyntaxNode)(token As SyntaxToken) As Boolean 78Public Function IsChildToken(Of TParent As SyntaxNode)(token As SyntaxToken, childGetter As Func(Of TParent, SyntaxToken)) As Boolean 97Public Function IsChildSeparatorToken(Of TParent As SyntaxNode, TChild As SyntaxNode)(token As SyntaxToken, childGetter As Func(Of TParent, SeparatedSyntaxList(Of TChild))) As Boolean 115Public Function IsDescendantOf(token As SyntaxToken, node As SyntaxNode) As Boolean 121Friend Function GetInnermostDeclarationContext(node As SyntaxToken) As SyntaxNode 179Public Function GetContainingMember(token As SyntaxToken) As DeclarationStatementSyntax 188Public Function GetContainingMemberBlockBegin(token As SyntaxToken) As StatementSyntax 196Public Function IsFirstTokenOnLine(token As SyntaxToken) As Boolean 209Public Function SpansPreprocessorDirective(tokens As IEnumerable(Of SyntaxToken)) As Boolean 214Public Function GetPreviousTokenIfTouchingWord(token As SyntaxToken, position As Integer) As SyntaxToken 221Public Function IsWord(token As SyntaxToken) As Boolean 226Public Function IntersectsWith(token As SyntaxToken, position As Integer) As Boolean 231Public Function GetNextNonZeroWidthTokenOrEndOfFile(token As SyntaxToken) As SyntaxToken 237Public Function IsValidAttributeTarget(token As SyntaxToken) As Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTreeExtensions.vb (5)
16Public Function IsLastTokenOfStatementWithEndOfLine(token As SyntaxToken) As Boolean 48token As SyntaxToken, 224Private Function AtEndOfIncompleteStringOrCharLiteral(token As SyntaxToken, position As Integer, lastChar As String) As Boolean 271Private Function IsGlobalStatementContext(token As SyntaxToken, position As Integer) As Boolean 301Dim token As SyntaxToken = syntaxTree.FindTokenOnLeftOfPosition(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Indentation\VisualBasicSmartTokenFormatter.vb (1)
34Public Function FormatToken(token As SyntaxToken, cancellationToken As CancellationToken) As IList(Of TextChange) Implements ISmartTokenFormatter.FormatToken
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SelectedMembers\VisualBasicSelectedMembers.vb (1)
27Protected Overrides Function GetDeclaratorsAndIdentifiers(member As StatementSyntax) As ImmutableArray(Of (declarator As SyntaxNode, identifier As SyntaxToken))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SemanticFacts\VisualBasicSemanticFacts.vb (3)
64Public Function GetDeclaredSymbol(semanticModel As SemanticModel, token As SyntaxToken, cancellationToken As CancellationToken) As ISymbol Implements ISemanticFacts.GetDeclaredSymbol 260Public Function GetBestOrAllSymbols(semanticModel As SemanticModel, node As SyntaxNode, token As SyntaxToken, cancellationToken As CancellationToken) As ImmutableArray(Of ISymbol) Implements ISemanticFacts.GetBestOrAllSymbols 307Private Shared Function CreatePreprocessingSymbol(model As SemanticModel, token As SyntaxToken) As IPreprocessingSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicDocumentationCommentService.vb (1)
28Protected Overrides Function GetIdentifier(xmlName As XmlNameAttributeSyntax) As SyntaxToken
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicSyntaxFacts.vb (59)
98Public Function ParseToken(text As String) As SyntaxToken Implements ISyntaxFacts.ParseToken 113Public Function IsVerbatimIdentifier(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsVerbatimIdentifier 117Public Function IsOperator(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsOperator 122Public Function IsContextualKeyword(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsContextualKeyword 126Public Function IsReservedKeyword(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsReservedKeyword 130Public Function IsPreprocessorKeyword(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsPreprocessorKeyword 254Public Function IsThisConstructorInitializer(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsThisConstructorInitializer 263Public Function IsBaseConstructorInitializer(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsBaseConstructorInitializer 272Public Function IsQueryKeyword(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsQueryKeyword 303Public Function IsPredefinedType(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsPredefinedType 308Public Function IsPredefinedType(token As SyntaxToken, type As PredefinedType) As Boolean Implements ISyntaxFacts.IsPredefinedType 323Public Function TryGetPredefinedType(token As SyntaxToken, ByRef type As PredefinedType) As Boolean Implements ISyntaxFacts.TryGetPredefinedType 328Private Shared Function GetPredefinedType(token As SyntaxToken) As PredefinedType 367Public Function IsPredefinedOperator(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsPredefinedOperator 372Public Function IsPredefinedOperator(token As SyntaxToken, op As PredefinedOperator) As Boolean Implements ISyntaxFacts.IsPredefinedOperator 377Public Function TryGetPredefinedOperator(token As SyntaxToken, ByRef op As PredefinedOperator) As Boolean Implements ISyntaxFacts.TryGetPredefinedOperator 382Private Shared Function GetPredefinedOperator(token As SyntaxToken) As PredefinedOperator 491Public Function IsLiteral(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsLiteral 512Public Function IsStringLiteralOrInterpolatedStringLiteral(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsStringLiteralOrInterpolatedStringLiteral 516Public Function IsBindableToken(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsBindableToken 1082Public Function TryGetBindableParent(token As SyntaxToken) As SyntaxNode Implements ISyntaxFacts.TryGetBindableParent 1244Public Function IsNumericLiteral(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsNumericLiteral 1250Public Function IsVerbatimStringLiteral(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsVerbatimStringLiteral 1405Public Sub GetPartsOfAssignmentStatement(statement As SyntaxNode, ByRef left As SyntaxNode, ByRef operatorToken As SyntaxToken, ByRef right As SyntaxNode) Implements ISyntaxFacts.GetPartsOfAssignmentStatement 1410Public Sub GetPartsOfAssignmentExpressionOrStatement(statement As SyntaxNode, ByRef left As SyntaxNode, ByRef operatorToken As SyntaxToken, ByRef right As SyntaxNode) Implements ISyntaxFacts.GetPartsOfAssignmentExpressionOrStatement 1417Public Function GetIdentifierOfSimpleName(node As SyntaxNode) As SyntaxToken Implements ISyntaxFacts.GetIdentifierOfSimpleName 1421Public Function GetIdentifierOfVariableDeclarator(node As SyntaxNode) As SyntaxToken Implements ISyntaxFacts.GetIdentifierOfVariableDeclarator 1425Public Function GetIdentifierOfTypeDeclaration(node As SyntaxNode) As SyntaxToken Implements ISyntaxFacts.GetIdentifierOfTypeDeclaration 1447Public Function AreEquivalent(token1 As SyntaxToken, token2 As SyntaxToken) As Boolean Implements ISyntaxFacts.AreEquivalent 1463Public Sub GetPartsOfTupleExpression(Of TArgumentSyntax As SyntaxNode)(node As SyntaxNode, ByRef openParen As SyntaxToken, ByRef arguments As SeparatedSyntaxList(Of TArgumentSyntax), ByRef closeParen As SyntaxToken) Implements ISyntaxFacts.GetPartsOfTupleExpression 1490Public Function ContainsInterleavedDirective(span As TextSpan, token As SyntaxToken, cancellationToken As CancellationToken) As Boolean Implements ISyntaxFacts.ContainsInterleavedDirective 1549Public Function GetDeclarationIdentifierIfOverride(token As SyntaxToken) As SyntaxToken? Implements ISyntaxFacts.GetDeclarationIdentifierIfOverride 1612ByRef globalKeyword As SyntaxToken, 1613ByRef [alias] As SyntaxToken, 1714Public Sub GetPartsOfIsPatternExpression(node As SyntaxNode, ByRef left As SyntaxNode, ByRef isToken As SyntaxToken, ByRef right As SyntaxNode) Implements ISyntaxFacts.GetPartsOfIsPatternExpression 1722Public Sub GetPartsOfParenthesizedPattern(node As SyntaxNode, ByRef openParen As SyntaxToken, ByRef pattern As SyntaxNode, ByRef closeParen As SyntaxToken) Implements ISyntaxFacts.GetPartsOfParenthesizedPattern 1726Public Sub GetPartsOfBinaryPattern(node As SyntaxNode, ByRef left As SyntaxNode, ByRef operatorToken As SyntaxToken, ByRef right As SyntaxNode) Implements ISyntaxFacts.GetPartsOfBinaryPattern 1730Public Sub GetPartsOfUnaryPattern(node As SyntaxNode, ByRef operatorToken As SyntaxToken, ByRef pattern As SyntaxNode) Implements ISyntaxFacts.GetPartsOfUnaryPattern 1734Public Sub GetPartsOfRelationalPattern(node As SyntaxNode, ByRef operatorToken As SyntaxToken, ByRef expression As SyntaxNode) Implements ISyntaxFacts.GetPartsOfRelationalPattern 1820Public Sub GetPartsOfArgumentList(node As SyntaxNode, ByRef openParenToken As SyntaxToken, ByRef arguments As SeparatedSyntaxList(Of SyntaxNode), ByRef closeParenToken As SyntaxToken) Implements ISyntaxFacts.GetPartsOfArgumentList 1839Public Sub GetPartsOfBinaryExpression(node As SyntaxNode, ByRef left As SyntaxNode, ByRef operatorToken As SyntaxToken, ByRef right As SyntaxNode) Implements ISyntaxFacts.GetPartsOfBinaryExpression 1853Public Sub GetPartsOfConditionalAccessExpression(node As SyntaxNode, ByRef expression As SyntaxNode, ByRef operatorToken As SyntaxToken, ByRef whenNotNull As SyntaxNode) Implements ISyntaxFacts.GetPartsOfConditionalAccessExpression 1871Public Sub GetPartsOfInterpolationExpression(node As SyntaxNode, ByRef stringStartToken As SyntaxToken, ByRef contents As SyntaxList(Of SyntaxNode), ByRef stringEndToken As SyntaxToken) Implements ISyntaxFacts.GetPartsOfInterpolationExpression 1884Public Sub GetPartsOfGenericName(node As SyntaxNode, ByRef identifier As SyntaxToken, ByRef typeArguments As SeparatedSyntaxList(Of SyntaxNode)) Implements ISyntaxFacts.GetPartsOfGenericName 1890Public Sub GetPartsOfMemberAccessExpression(node As SyntaxNode, ByRef expression As SyntaxNode, ByRef operatorToken As SyntaxToken, ByRef name As SyntaxNode) Implements ISyntaxFacts.GetPartsOfMemberAccessExpression 1910Public Sub GetPartsOfObjectCreationExpression(node As SyntaxNode, ByRef keyword As SyntaxToken, ByRef type As SyntaxNode, ByRef argumentList As SyntaxNode, ByRef initializer As SyntaxNode) Implements ISyntaxFacts.GetPartsOfObjectCreationExpression 1918Public Sub GetPartsOfImplicitObjectCreationExpression(node As SyntaxNode, ByRef keyword As SyntaxToken, ByRef argumentList As SyntaxNode, ByRef initializer As SyntaxNode) Implements ISyntaxFacts.GetPartsOfImplicitObjectCreationExpression 1922Public Sub GetPartsOfParameter(node As SyntaxNode, ByRef identifier As SyntaxToken, ByRef [default] As SyntaxNode) Implements ISyntaxFacts.GetPartsOfParameter 1928Public Sub GetPartsOfParenthesizedExpression(node As SyntaxNode, ByRef openParen As SyntaxToken, ByRef expression As SyntaxNode, ByRef closeParen As SyntaxToken) Implements ISyntaxFacts.GetPartsOfParenthesizedExpression 1935Public Sub GetPartsOfPrefixUnaryExpression(node As SyntaxNode, ByRef operatorToken As SyntaxToken, ByRef operand As SyntaxNode) Implements ISyntaxFacts.GetPartsOfPrefixUnaryExpression 1941Public Sub GetPartsOfQualifiedName(node As SyntaxNode, ByRef left As SyntaxNode, ByRef dotToken As SyntaxToken, ByRef right As SyntaxNode) Implements ISyntaxFacts.GetPartsOfQualifiedName 1990Public Function GetTokenOfLiteralExpression(node As SyntaxNode) As SyntaxToken Implements ISyntaxFacts.GetTokenOfLiteralExpression
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\ImportsClauseComparer.vb (2)
14Private ReadOnly _tokenComparer As IComparer(Of SyntaxToken) 21Public Sub New(tokenComparer As IComparer(Of SyntaxToken))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\ImportsStatementComparer.vb (1)
16Public Sub New(tokenComparer As IComparer(Of SyntaxToken))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\NameSyntaxComparer.vb (3)
10Private ReadOnly _tokenComparer As IComparer(Of SyntaxToken) 13Friend Sub New(tokenComparer As IComparer(Of SyntaxToken)) 21Public Shared Function Create(tokenComparer As IComparer(Of SyntaxToken)) As IComparer(Of NameSyntax)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\TokenComparer.vb (6)
9Implements IComparer(Of SyntaxToken) 22Public Function Compare(token1 As SyntaxToken, 23token2 As SyntaxToken) As Integer Implements IComparer(Of SyntaxToken).Compare 45Private Shared Function CompareWorker(x As SyntaxToken, y As SyntaxToken) As Integer
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\TypeSyntaxComparer.vb (3)
10Private ReadOnly _tokenComparer As IComparer(Of SyntaxToken) 13Friend Sub New(tokenComparer As IComparer(Of SyntaxToken)) 21Public Shared Function Create(tokenComparer As IComparer(Of SyntaxToken)) As IComparer(Of TypeSyntax)
src\Workspaces\VisualBasic\Portable\Formatting\DefaultOperationProvider.vb (8)
54ByRef previousToken As SyntaxToken, 55ByRef currentToken As SyntaxToken, 122currentToken As SyntaxToken) As AdjustNewLinesOperation 177Private Shared Function ContainEndOfLine(previousToken As SyntaxToken, nextToken As SyntaxToken) As Boolean 181Private Shared Function IsFirstXmlTag(currentToken As SyntaxToken) As Boolean 209Public Overrides Function GetAdjustSpacesOperationSlow(ByRef previousToken As SyntaxToken, ByRef currentToken As SyntaxToken, ByRef nextOperation As NextGetAdjustSpacesOperation) As AdjustSpacesOperation
src\Workspaces\VisualBasic\Portable\Formatting\Engine\AggregatedFormattingResult.vb (2)
19Protected Overrides Function Rewriter(changeMap As Dictionary(Of ValueTuple(Of SyntaxToken, SyntaxToken), TriviaData), cancellationToken As CancellationToken) As SyntaxNode
src\Workspaces\VisualBasic\Portable\Formatting\Engine\FormattingResult.vb (2)
25Protected Overrides Function Rewriter(changeMap As Dictionary(Of ValueTuple(Of SyntaxToken, SyntaxToken), TriviaData), cancellationToken As CancellationToken) As SyntaxNode
src\Workspaces\VisualBasic\Portable\Formatting\Engine\Trivia\TriviaDataFactory.Analyzer.vb (4)
8Public Shared Function Leading(token As SyntaxToken) As AnalysisResult 15Public Shared Function Trailing(token As SyntaxToken) As AnalysisResult 22Public Shared Function Between(token1 As SyntaxToken, token2 As SyntaxToken) As AnalysisResult
src\Workspaces\VisualBasic\Portable\Formatting\Engine\Trivia\TriviaDataFactory.ComplexTrivia.vb (4)
20Public Sub New(options As LineFormattingOptions, treeInfo As TreeData, token1 As SyntaxToken, token2 As SyntaxToken) 60Dim commonToken1 As SyntaxToken = Me.Token1 61Dim commonToken2 As SyntaxToken = Me.Token2
src\Workspaces\VisualBasic\Portable\Formatting\Engine\Trivia\TriviaDataFactory.FormattedComplexTrivia.vb (2)
19token1 As SyntaxToken, 20token2 As SyntaxToken,
src\Workspaces\VisualBasic\Portable\Formatting\Engine\Trivia\TriviaDataFactory.ModifiedComplexTrivia.vb (2)
72Dim commonToken1 As SyntaxToken = Me._original.Token1 73Dim commonToken2 As SyntaxToken = Me._original.Token2
src\Workspaces\VisualBasic\Portable\Formatting\Engine\Trivia\TriviaDataFactory.TriviaRewriter.vb (17)
17Private ReadOnly _lastToken As SyntaxToken 20Private ReadOnly _trailingTriviaMap As Dictionary(Of SyntaxToken, SyntaxTriviaList) 21Private ReadOnly _leadingTriviaMap As Dictionary(Of SyntaxToken, SyntaxTriviaList) 23Public Sub New(node As SyntaxNode, spanToFormat As TextSpanMutableIntervalTree, map As Dictionary(Of ValueTuple(Of SyntaxToken, SyntaxToken), TriviaData), cancellationToken As CancellationToken) 32_trailingTriviaMap = New Dictionary(Of SyntaxToken, SyntaxTriviaList)() 33_leadingTriviaMap = New Dictionary(Of SyntaxToken, SyntaxTriviaList)() 42Private Sub PreprocessTriviaListMap(map As Dictionary(Of ValueTuple(Of SyntaxToken, SyntaxToken), TriviaData)) 58Private Function GetTrailingAndLeadingTrivia(pair As KeyValuePair(Of ValueTuple(Of SyntaxToken, SyntaxToken), TriviaData)) As (SyntaxTriviaList, SyntaxTriviaList) 84Private Function GetTextSpan(pair As ValueTuple(Of SyntaxToken, SyntaxToken)) As TextSpan 129Public Overrides Function VisitToken(token As SyntaxToken) As SyntaxToken 165Private Shared Function CreateNewToken(leadingTrivia As SyntaxTriviaList, token As SyntaxToken, trailingTrivia As SyntaxTriviaList) As SyntaxToken
src\Workspaces\VisualBasic\Portable\Formatting\Engine\Trivia\TriviaDataFactory.vb (10)
27Public Overrides Function CreateLeadingTrivia(token As SyntaxToken) As TriviaData 44Public Overrides Function CreateTrailingTrivia(token As SyntaxToken) As TriviaData 61Public Overrides Function Create(token1 As SyntaxToken, token2 As SyntaxToken) As TriviaData 88Private Function GetLineContinuationTriviaInfo(token1 As SyntaxToken, token2 As SyntaxToken, result As Analyzer.AnalysisResult) As TriviaData 146Private Function GetWhitespaceOnlyTriviaInfo(token1 As SyntaxToken, token2 As SyntaxToken, result As Analyzer.AnalysisResult) As TriviaData 173Private Function CalculateSpaces(token1 As SyntaxToken, token2 As SyntaxToken) As Integer
src\Workspaces\VisualBasic\Portable\Formatting\Engine\Trivia\VisualBasicTriviaFormatter.vb (2)
23token1 As SyntaxToken, 24token2 As SyntaxToken,
src\Workspaces\VisualBasic\Portable\Formatting\Engine\VisualBasicFormatEngine.vb (2)
18startToken As SyntaxToken, 19endToken As SyntaxToken)
src\Workspaces\VisualBasic\Portable\Formatting\Engine\VisualBasicStructuredTriviaFormatEngine.vb (2)
29token1 As SyntaxToken, 30token2 As SyntaxToken)
src\Workspaces\VisualBasic\Portable\Formatting\FormattingHelpers.vb (18)
10Public Function IsLessThanInAttribute(token As SyntaxToken) As Boolean 21Public Function IsGreaterThanInAttribute(token As SyntaxToken) As Boolean 32Public Function IsQuoteInXmlString(token As SyntaxToken) As Boolean 48Public Function IsContentInXmlString(token As SyntaxToken) As Boolean 62Public Function IsXmlToken(token As SyntaxToken) As Boolean 236Public Function IsGreaterThanInXmlTag(tag As SyntaxNode, token As SyntaxToken) As Boolean 250Public Function IsQuestionInNullableType(currentToken As SyntaxToken) As Boolean 259Public Function IsColonAfterAttributeTarget(previousToken As SyntaxToken, currentToken As SyntaxToken) As Boolean 267Public Function IsExclamationInDictionaryAccess(token As SyntaxToken) As Boolean 291Public Function IsParenInArgumentList(token As SyntaxToken) As Boolean 300Public Function IsParenInBinaryCondition(token As SyntaxToken) As Boolean 309Public Function IsParenInTernaryCondition(token As SyntaxToken) As Boolean 318Public Function IsXmlTokenInXmlDeclaration(token As SyntaxToken) As Boolean 327Public Function IsMemberAccessDotWithoutExpression(token As SyntaxToken) As Boolean 345Public Function IsDictionaryAccessExclamationWithoutExpression(token As SyntaxToken) As Boolean 358Public Function IsNamedFieldInitializerDot(token As SyntaxToken) As Boolean 367Friend Function IsOverloadableOperator(token As SyntaxToken) As Boolean
src\Workspaces\VisualBasic\Portable\Formatting\Rules\AdjustSpaceFormattingRule.vb (3)
16Public Overrides Function GetAdjustSpacesOperationSlow(ByRef previousToken As SyntaxToken, ByRef currentToken As SyntaxToken, ByRef nextFunc As NextGetAdjustSpacesOperation) As AdjustSpacesOperation 362Private Shared Function PrecedingTriviaContainsLineBreak(previousToken As SyntaxToken) As Boolean
src\Workspaces\VisualBasic\Portable\Formatting\Rules\AlignTokensFormattingRule.vb (1)
21Dim tokens = New List(Of SyntaxToken)()
src\Workspaces\VisualBasic\Portable\Formatting\Rules\BaseFormattingRule.vb (27)
15Protected Shared Sub AddIndentBlockOperation(operations As List(Of IndentBlockOperation), startToken As SyntaxToken, endToken As SyntaxToken, Optional [option] As IndentBlockOption = IndentBlockOption.RelativePosition) 25baseToken As SyntaxToken, 26startToken As SyntaxToken, 27endToken As SyntaxToken, 34Protected Shared Sub SetAlignmentBlockOperation(operations As List(Of IndentBlockOperation), baseToken As SyntaxToken, startToken As SyntaxToken, endToken As SyntaxToken, Optional [option] As IndentBlockOption = IndentBlockOption.RelativePosition) 38Protected Shared Sub SetAlignmentBlockOperation(operations As List(Of IndentBlockOperation), baseToken As SyntaxToken, startToken As SyntaxToken, endToken As SyntaxToken, span As TextSpan, Optional [option] As IndentBlockOption = IndentBlockOption.RelativePosition) 42Protected Shared Sub AddAbsolutePositionIndentBlockOperation(operations As List(Of IndentBlockOperation), startToken As SyntaxToken, endToken As SyntaxToken, indentation As Integer, Optional [option] As IndentBlockOption = IndentBlockOption.AbsolutePosition) 46Protected Shared Sub AddAbsolutePositionIndentBlockOperation(operations As List(Of IndentBlockOperation), startToken As SyntaxToken, endToken As SyntaxToken, indentation As Integer, span As TextSpan, Optional [option] As IndentBlockOption = IndentBlockOption.AbsolutePosition) 50Private Shared Function GetAlignmentSpan(startToken As SyntaxToken, endToken As SyntaxToken) As TextSpan 55Private Shared Function GetIndentBlockSpan(startToken As SyntaxToken, endToken As SyntaxToken) As TextSpan 72Protected Shared Sub AddSuppressWrappingIfOnSingleLineOperation(operations As List(Of SuppressOperation), startToken As SyntaxToken, endToken As SyntaxToken) 77Protected Shared Sub AddSuppressAllOperationIfOnMultipleLine(operations As List(Of SuppressOperation), startToken As SyntaxToken, endToken As SyntaxToken) 83Protected Shared Sub AddAnchorIndentationOperation(operations As List(Of AnchorIndentationOperation), startToken As SyntaxToken, endToken As SyntaxToken) 91Protected Shared Sub AddAlignIndentationOfTokensToBaseTokenOperation(operations As List(Of AlignTokensOperation), containingNode As SyntaxNode, baseToken As SyntaxToken, tokens As IEnumerable(Of SyntaxToken))
src\Workspaces\VisualBasic\Portable\Formatting\Rules\ElasticTriviaFormattingRule.vb (12)
88Public Overrides Function GetAdjustSpacesOperationSlow(ByRef previousToken As SyntaxToken, ByRef currentToken As SyntaxToken, ByRef nextOperation As NextGetAdjustSpacesOperation) As AdjustSpacesOperation 125ByRef previousToken As SyntaxToken, 126ByRef currentToken As SyntaxToken, 230Private Shared Function AfterLastImportStatement(token As SyntaxToken, nextToken As SyntaxToken) As Boolean 249Private Shared Function AfterLastInheritsOrImplements(token As SyntaxToken, nextToken As SyntaxToken) As Boolean 266Private Shared Function LineBreaksAfter(previousToken As SyntaxToken, currentToken As SyntaxToken) As Integer? 335Private Shared Function GetActualLines(token1 As SyntaxToken, token2 As SyntaxToken, lines As Integer, Optional leadingBlankLines As Integer = 0) As Integer
src\Workspaces\VisualBasic\Portable\Formatting\Rules\NodeBasedFormattingRule.vb (13)
199Private Shared Function GetOuterBlockWithDifferentStartTokenUsingXmlElement(firstTokenOfInnerBlock As SyntaxToken) As SyntaxNode 226baseToken As SyntaxToken, 227startToken As SyntaxToken, 228endToken As SyntaxToken) 239baseToken As SyntaxToken, 240alignmentStartToken As SyntaxToken, 241alignmentEndToken As SyntaxToken, 242indentationStartToken As SyntaxToken, 243indentationEndToken As SyntaxToken) 296Private Shared Function IsFirstXmlElementTokenOnLine(xmlToken As SyntaxToken) As Boolean 310Private Shared Function GetFirstAndLastMembers(node As SyntaxNode) As ValueTuple(Of SyntaxToken, SyntaxToken) 485Private Shared Function GetEndTokenForForBlock(node As ForOrForEachBlockSyntax) As SyntaxToken
src\Workspaces\VisualBasic\Portable\Formatting\Rules\StructuredTriviaFormattingRule.vb (6)
16Public Overrides Function GetAdjustNewLinesOperationSlow(ByRef previousToken As SyntaxToken, ByRef currentToken As SyntaxToken, ByRef nextOperation As NextGetAdjustNewLinesOperation) As AdjustNewLinesOperation 24Public Overrides Function GetAdjustSpacesOperationSlow(ByRef previousToken As SyntaxToken, ByRef currentToken As SyntaxToken, ByRef nextOperation As NextGetAdjustSpacesOperation) As AdjustSpacesOperation 34Private Shared Function UnderStructuredTrivia(previousToken As SyntaxToken, currentToken As SyntaxToken) As Boolean
src\Workspaces\VisualBasic\Portable\Formatting\VisualBasicSyntaxFormatting.vb (2)
46Protected Overrides Function Format(root As SyntaxNode, options As SyntaxFormattingOptions, formattingRules As ImmutableArray(Of AbstractFormattingRule), startToken As SyntaxToken, endToken As SyntaxToken, cancellationToken As CancellationToken) As AbstractFormattingResult
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (200)
src\Analyzers\VisualBasic\CodeFixes\AddAnonymousTypeMemberName\VisualBasicAddAnonymousTypeMemberNameCodeFixProvider.vb (1)
38Protected Overrides Function WithName(declarator As FieldInitializerSyntax, nameToken As SyntaxToken) As FieldInitializerSyntax
src\Analyzers\VisualBasic\CodeFixes\DocumentationComments\VisualBasicRemoveDocCommentNodeCodeFixProvider.vb (2)
75Protected Overrides Function IsXmlWhitespaceToken(token As SyntaxToken) As Boolean 79Protected Overrides Function IsXmlNewLineToken(token As SyntaxToken) As Boolean
src\Analyzers\VisualBasic\CodeFixes\GenerateConstructor\GenerateConstructorCodeFixProvider.vb (1)
58Protected Overrides Function IsCandidate(node As SyntaxNode, token As SyntaxToken, diagnostic As Diagnostic) As Boolean
src\Analyzers\VisualBasic\CodeFixes\GenerateConstructor\VisualBasicGenerateConstructorService.vb (5)
29Protected Overrides Function TryInitializeImplicitObjectCreation(document As SemanticDocument, node As SyntaxNode, cancellationToken As CancellationToken, ByRef token As SyntaxToken, ByRef arguments As ImmutableArray(Of Argument), ByRef typeToGenerateIn As INamedTypeSymbol) As Boolean 61ByRef token As SyntaxToken, 96ByRef token As SyntaxToken, 131ByRef token As SyntaxToken, 169Protected Overrides Function GetCurrentConstructor(semanticModel As SemanticModel, token As SyntaxToken, cancellationToken As CancellationToken) As IMethodSymbol
src\Analyzers\VisualBasic\CodeFixes\GenerateDefaultConstructors\VisualBasicGenerateDefaultConstructorsCodeFixProvider.vb (1)
28Protected Overrides Function TryGetTypeName(typeDeclaration As SyntaxNode) As SyntaxToken?
src\Analyzers\VisualBasic\CodeFixes\GenerateEnumMember\GenerateEnumMemberCodeFixProvider.vb (1)
40Protected Overrides Function IsCandidate(node As SyntaxNode, token As SyntaxToken, diagnostic As Diagnostic) As Boolean
src\Analyzers\VisualBasic\CodeFixes\GenerateEnumMember\VisualBasicGenerateEnumMemberService.vb (1)
28ByRef identifierToken As SyntaxToken, ByRef simpleNameOrMemberAccessExpression As ExpressionSyntax) As Boolean
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\GenerateConversionCodeFixProvider.vb (1)
40Protected Overrides Function IsCandidate(node As SyntaxNode, token As SyntaxToken, diagnostic As Diagnostic) As Boolean
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\GenerateParameterizedMemberCodeFixProvider.vb (1)
59Protected Overrides Function IsCandidate(node As SyntaxNode, token As SyntaxToken, diagnostic As Diagnostic) As Boolean
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\VisualBasicGenerateConversionService.vb (2)
55Protected Overrides Function TryInitializeExplicitConversionState(document As SemanticDocument, expression As SyntaxNode, classInterfaceModuleStructTypes As ISet(Of TypeKind), cancellationToken As CancellationToken, ByRef identifierToken As SyntaxToken, ByRef methodSymbol As IMethodSymbol, ByRef typeToGenerateIn As INamedTypeSymbol) As Boolean 69Protected Overrides Function TryInitializeImplicitConversionState(document As SemanticDocument, expression As SyntaxNode, classInterfaceModuleStructTypes As ISet(Of TypeKind), cancellationToken As CancellationToken, ByRef identifierToken As SyntaxToken, ByRef methodSymbol As IMethodSymbol, ByRef typeToGenerateIn As INamedTypeSymbol) As Boolean
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\VisualBasicGenerateMethodService.vb (2)
44ByRef identifierToken As SyntaxToken, 78ByRef identifierToken As SyntaxToken,
src\Analyzers\VisualBasic\CodeFixes\GenerateVariable\VisualBasicGenerateVariableCodeFixProvider.vb (1)
52Protected Overrides Function IsCandidate(node As SyntaxNode, token As SyntaxToken, diagnostic As Diagnostic) As Boolean
src\Analyzers\VisualBasic\CodeFixes\ImplementAbstractClass\VisualBasicImplementAbstractClassCodeFixProvider.vb (1)
26Protected Overrides Function GetClassIdentifier(classNode As ClassBlockSyntax) As SyntaxToken
src\Analyzers\VisualBasic\CodeFixes\Iterator\VisualBasicConvertToIteratorCodeFixProvider.vb (2)
113Dim iteratorToken As SyntaxToken = Token(SyntaxKind.IteratorKeyword).WithAdditionalAnnotations(Formatter.Annotation) 132Dim iteratorToken As SyntaxToken = Token(SyntaxKind.IteratorKeyword).WithAdditionalAnnotations(Formatter.Annotation)
src\Analyzers\VisualBasic\CodeFixes\MakeMethodAsynchronous\VisualBasicMakeMethodAsynchronousCodeFixProvider.vb (1)
27Private Shared ReadOnly s_asyncToken As SyntaxToken = SyntaxFactory.Token(SyntaxKind.AsyncKeyword)
src\Analyzers\VisualBasic\CodeFixes\RemoveUnusedParametersAndValues\VisualBasicRemoveUnusedValuesCodeFixProvider.vb (2)
40Protected Overrides Function TryUpdateNameForFlaggedNode(node As SyntaxNode, newName As SyntaxToken) As SyntaxNode 55Protected Overrides Function GetForEachStatementIdentifier(node As ForEachBlockSyntax) As SyntaxToken
src\Analyzers\VisualBasic\CodeFixes\UseCompoundAssignment\VisualBasicUseCompoundAssignmentCodeFixProvider.vb (2)
23Protected Overrides Function Token(kind As SyntaxKind) As SyntaxToken 28assignmentOpKind As SyntaxKind, left As ExpressionSyntax, syntaxToken As SyntaxToken, right As ExpressionSyntax) As AssignmentStatementSyntax
src\Analyzers\VisualBasic\CodeFixes\UseConditionalExpression\MultiLineConditionalExpressionFormattingRule.vb (3)
31Private Shared Function IsCommaOfNewConditional(token As SyntaxToken) As Boolean 41ByRef previousToken As SyntaxToken, ByRef currentToken As SyntaxToken, ByRef nextOperation As NextGetAdjustNewLinesOperation) As AdjustNewLinesOperation
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\AttributeGenerator.vb (3)
15Public Function GenerateAttributeBlocks(attributes As ImmutableArray(Of AttributeData), options As CodeGenerationContextInfo, Optional target As SyntaxToken? = Nothing) As SyntaxList(Of AttributeListSyntax) 25Private Function GenerateAttributeBlock(attribute As AttributeData, options As CodeGenerationContextInfo, target As SyntaxToken?) As AttributeListSyntax 30Private Function GenerateAttribute(attribute As AttributeData, options As CodeGenerationContextInfo, target As SyntaxToken?) As AttributeSyntax
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ConstructorGenerator.vb (2)
83Dim tokens As ArrayBuilder(Of SyntaxToken) = Nothing 84Using x = ArrayBuilder(Of SyntaxToken).GetInstance(tokens)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ConversionGenerator.vb (1)
40Dim modifiers = New List(Of SyntaxToken) From {
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\EventGenerator.vb (2)
166Dim tokens As ArrayBuilder(Of SyntaxToken) = Nothing 167Using x = ArrayBuilder(Of SyntaxToken).GetInstance(tokens)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\FieldGenerator.vb (2)
106Dim tokens As ArrayBuilder(Of SyntaxToken) = Nothing 107Using x = ArrayBuilder(Of SyntaxToken).GetInstance(tokens)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\MethodGenerator.vb (2)
144Dim result As ArrayBuilder(Of SyntaxToken) = Nothing 145Using x = ArrayBuilder(Of SyntaxToken).GetInstance(result)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (1)
165Dim tokens = New List(Of SyntaxToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\PropertyGenerator.vb (4)
165Dim modifiers As ArrayBuilder(Of SyntaxToken) = Nothing 166Using x = ArrayBuilder(Of SyntaxToken).GetInstance(modifiers) 178Dim tokens As ArrayBuilder(Of SyntaxToken) = Nothing 179Using x = ArrayBuilder(Of SyntaxToken).GetInstance(tokens)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationHelpers.vb (1)
17tokens As ArrayBuilder(Of SyntaxToken),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationService.vb (5)
328target As SyntaxToken?, 423ComputePositionAndTriviaForRemoveAttributeFromAttributeList(attributeToRemove, Function(t As SyntaxToken) t.IsKind(SyntaxKind.CommaToken), positionOfRemovedNode, trivia) 633Public Overrides Function UpdateDeclarationModifiers(Of TDeclarationNode As SyntaxNode)(declaration As TDeclarationNode, newModifiers As IEnumerable(Of SyntaxToken), options As VisualBasicCodeGenerationContextInfo, cancellationToken As CancellationToken) As TDeclarationNode 650Dim newModifierTokens As ArrayBuilder(Of SyntaxToken) = Nothing 651Using x = ArrayBuilder(Of SyntaxToken).GetInstance(newModifierTokens)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicDeclarationComparer.vb (7)
288Private Shared Function ContainsToken(list As IEnumerable(Of SyntaxToken), kind As SyntaxKind) As Boolean 289Return list.Contains(Function(token As SyntaxToken) 302Private Shared Function GetAccessibilityPrecedence(declaration As SyntaxNode, modifiers As IEnumerable(Of SyntaxToken)) As Integer 390Private Shared Function EqualIdentifierName(x As SyntaxToken, y As SyntaxToken, ByRef comparisonResult As Integer) As Boolean 395Private Shared Function EqualOperatorPrecedence(x As SyntaxToken, y As SyntaxToken, ByRef comparisonResult As Integer) As Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\IsStatementTerminatingTokenVisitor.vb (3)
18Private ReadOnly _targetToken As SyntaxToken 20Public Sub New(targetToken As SyntaxToken) 134Private Function TargetTokenMatches(token As SyntaxToken) As Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTokenExtensions.vb (7)
12Friend Function HasColonBeforePosition(token As SyntaxToken, position As Integer) As Boolean 55Friend Function HasNonContinuableEndOfLineBeforePosition(token As SyntaxToken, position As Integer, Optional checkForSecondEol As Boolean = False) As Boolean 96Friend Function FollowsBadEndDirective(targetToken As SyntaxToken) As Boolean 114Friend Function FollowsEndOfStatement(token As SyntaxToken, position As Integer) As Boolean 120Friend Function MustBeginNewStatement(token As SyntaxToken, position As Integer) As Boolean 126Friend Function IsMandatoryNamedParameterPosition(token As SyntaxToken) As Boolean 148Friend Function IsModifier(token As SyntaxToken) As Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTreeExtensions.vb (29)
14Friend Function GetTargetToken(syntaxTree As SyntaxTree, position As Integer, cancellationToken As CancellationToken) As SyntaxToken 47Public Function IsPreProcessorKeywordContext(syntaxTree As SyntaxTree, position As Integer, preProcessorTokenOnLeftOfPosition As SyntaxToken, cancellationToken As CancellationToken) As Boolean 63Public Function IsNamespaceContext(syntaxTree As SyntaxTree, position As Integer, token As SyntaxToken, cancellationToken As CancellationToken, Optional semanticModelOpt As SemanticModel = Nothing) As Boolean 115Friend Function IsTypeDeclarationContext(syntaxTree As SyntaxTree, position As Integer, token As SyntaxToken, cancellationToken As CancellationToken) As Boolean 122syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, allowAfterModifiersOrDim As Boolean, cancellationToken As CancellationToken, ParamArray allowedParentBlocks As SyntaxKind()) As Boolean 163Private Function IsDimOrModifierOrAttributeList(token As SyntaxToken) As Boolean 188Friend Function IsTypeMemberDeclarationKeywordContext(syntaxTree As SyntaxTree, position As Integer, token As SyntaxToken, cancellationToken As CancellationToken) As Boolean 197Friend Function IsInterfaceMemberDeclarationKeywordContext(syntaxTree As SyntaxTree, position As Integer, token As SyntaxToken, cancellationToken As CancellationToken) As Boolean 205Friend Function IsTypeDeclarationKeywordContext(syntaxTree As SyntaxTree, position As Integer, token As SyntaxToken, cancellationToken As CancellationToken) As Boolean 212Friend Function IsFieldNameDeclarationContext(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, cancellationToken As CancellationToken) As Boolean 268Friend Function IsLabelContext(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, cancellationToken As CancellationToken) As Boolean 315Public Function IsDelegateCreationContext(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean 346syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, cancellationToken As CancellationToken, Optional semanticModelOpt As SemanticModel = Nothing) As Boolean 459Public Function IsAttributeNameContext(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, cancellationToken As CancellationToken) As Boolean 479Public Function IsTypeContext(syntaxTree As SyntaxTree, position As Integer, token As SyntaxToken, cancellationToken As CancellationToken, Optional semanticModelOpt As SemanticModel = Nothing) As Boolean 546ByRef token As SyntaxToken, cancellationToken As CancellationToken) 582Friend Function IsSingleLineStatementContext(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, cancellationToken As CancellationToken) As Boolean 625Friend Function IsMultiLineStatementStartContext(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, cancellationToken As CancellationToken) As Boolean 662Friend Function IsStartOfSelectCaseBlock(syntaxTree As SyntaxTree, position As Integer, token As SyntaxToken, cancellationToken As CancellationToken) As Boolean 670Friend Function IsAfterStatementOfKind(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, cancellationToken As CancellationToken, ParamArray kinds As SyntaxKind()) As Boolean 684Friend Function IsInStatementBlockOfKind(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, cancellationToken As CancellationToken, ParamArray kinds As SyntaxKind()) As Boolean 716Public Function IsQueryIntoClauseContext(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, cancellationToken As CancellationToken) As Boolean 750Public Function IsRaiseEventContext(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, cancellationToken As CancellationToken) As Boolean 762Public Function IsObjectCreationTypeContext(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, cancellationToken As CancellationToken) As Boolean 775Friend Function IsEnumTypeMemberAccessContext(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean 813targetToken As SyntaxToken, 853Friend Function GetExpressionTerminatingToken(expression As SyntaxNode) As SyntaxToken 955Private Function GetQueryClauseTerminatingToken(queryClause As QueryClauseSyntax) As SyntaxToken 1073tokenOnLeftOfPosition As SyntaxToken,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\VisualBasicSyntaxContext.vb (9)
55leftToken As SyntaxToken, 56targetToken As SyntaxToken, 140Private Shared Function ComputeIsTaskLikeTypeContext(targetToken As SyntaxToken) As Boolean 153Private Shared Shadows Function ComputeIsWithinAsyncMethod(targetToken As SyntaxToken) As Boolean 202targetToken As SyntaxToken, 262Private Shared Function ComputeIsWithinPreprocessorContext(position As Integer, targetToken As SyntaxToken) As Boolean 273Private Shared Function ComputeIsPreprocessorStartContext(position As Integer, targetToken As SyntaxToken) As Boolean 284Private Shared Function ComputeIsEnumBaseListContext(targetToken As SyntaxToken) As Boolean 291Private Shared Function ComputeIsRightAfterUsingOrImportDirective(targetToken As SyntaxToken) As Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\StringExtensions.vb (1)
61Public Function ToIdentifierToken(text As String, Optional afterDot As Boolean = False, Optional symbol As ISymbol = Nothing, Optional withinAsyncMethod As Boolean = False) As SyntaxToken
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Indentation\SpecialFormattingOperation.vb (7)
26Public Overrides Function GetAdjustNewLinesOperationSlow(ByRef previousToken As SyntaxToken, ByRef currentToken As SyntaxToken, ByRef nextOperation As NextGetAdjustNewLinesOperation) As AdjustNewLinesOperation 45Public Overrides Function GetAdjustSpacesOperationSlow(ByRef previousToken As SyntaxToken, ByRef currentToken As SyntaxToken, ByRef nextOperation As NextGetAdjustSpacesOperation) As AdjustSpacesOperation 147Dim endToken As SyntaxToken 201Private Overloads Shared Sub AddAlignTokensOperations(Of T As SyntaxNode)(operations As List(Of AlignTokensOperation), node As SyntaxNode, baseTokenGetter As Func(Of T, SyntaxToken)) 215Private Overloads Shared Sub AddAlignTokensOperations(operations As List(Of AlignTokensOperation), baseToken As SyntaxToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Indentation\VisualBasicIndentationService.Indenter.vb (13)
35Protected Overrides Function ShouldUseTokenIndenter(indenter As Indenter, ByRef token As SyntaxToken) As Boolean 53tokenOpt As SyntaxToken?, 101Private Shared Function GetTokenOnLeft(trivia As SyntaxTrivia) As SyntaxToken 110Private Shared Function GetIndentationBasedOnToken(indenter As Indenter, token As SyntaxToken, Optional trivia As SyntaxTrivia = Nothing) As IndentationResult 150Private Shared Function GetIndentationOfCurrentPosition(indenter As Indenter, token As SyntaxToken, position As Integer) As IndentationResult 154Private Shared Function GetIndentationOfCurrentPosition(indenter As Indenter, token As SyntaxToken, position As Integer, extraSpaces As Integer) As IndentationResult 170Private Shared Function IsLineContinuable(lastVisibleTokenOnPreviousLine As SyntaxToken, trivia As SyntaxTrivia) As Boolean 180Dim visibleTokenOnCurrentLine As SyntaxToken = lastVisibleTokenOnPreviousLine.GetNextToken() 203Private Shared Function IsCloseBraceOfInitializerSyntax(visibleTokenOnCurrentLine As SyntaxToken) As Boolean 232Private Shared Function GetIndentationFromOperationService(indenter As Indenter, token As SyntaxToken, position As Integer) As IndentationResult? 261Private Shared Function GetIndentationFromTokenLineAfterLineContinuation(indenter As Indenter, token As SyntaxToken, trivia As SyntaxTrivia) As IndentationResult 311Private Shared Function IsCommaInParameters(token As SyntaxToken) As Boolean 318Private Shared Function GetIndentationFromTwoLines(indenter As Indenter, firstLine As TextLine, secondLine As TextLine, token As SyntaxToken, position As Integer) As IndentationResult
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Indentation\VisualBasicIndentationService.vb (2)
44ByRef token As SyntaxToken, 122Private Shared Function IsInvalidToken(token As SyntaxToken) As Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicAddImportsService.vb (4)
117Implements IComparer(Of SyntaxToken) 118Public Function Compare(x As SyntaxToken, y As SyntaxToken) As Integer Implements IComparer(Of SyntaxToken).Compare
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicMoveDeclarationNearReferenceService.vb (1)
41Protected Overrides Function GetIdentifierOfVariableDeclarator(variableDeclarator As VariableDeclaratorSyntax) As SyntaxToken
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSemanticFactsService.vb (7)
44Protected Overrides Function ToIdentifierToken(identifier As String) As SyntaxToken 107semanticModel As SemanticModel, location As SyntaxNode, containerOpt As SyntaxNode, baseName As String, cancellationToken As CancellationToken) As SyntaxToken Implements ISemanticFactsService.GenerateUniqueName 112semanticModel As SemanticModel, location As SyntaxNode, containerOpt As SyntaxNode, baseName As String, usedNames As IEnumerable(Of String), cancellationToken As CancellationToken) As SyntaxToken Implements ISemanticFactsService.GenerateUniqueName 117semanticModel As SemanticModel, location As SyntaxNode, containerOpt As SyntaxNode, baseName As String, cancellationToken As CancellationToken) As SyntaxToken Implements ISemanticFactsService.GenerateUniqueLocalName 122semanticModel As SemanticModel, location As SyntaxNode, containerOpt As SyntaxNode, baseName As String, usedName As IEnumerable(Of String), cancellationToken As CancellationToken) As SyntaxToken Implements ISemanticFactsService.GenerateUniqueLocalName 126Private Function ISemanticFactsService_GenerateUniqueName(semanticModel As SemanticModel, location As SyntaxNode, containerOpt As SyntaxNode, baseName As String, filter As Func(Of ISymbol, Boolean), usedNames As IEnumerable(Of String), cancellationToken As CancellationToken) As SyntaxToken Implements ISemanticFactsService.GenerateUniqueName 130Private Function ISemanticFactsService_GenerateUniqueName(baseName As String, usedNames As IEnumerable(Of String)) As SyntaxToken Implements ISemanticFactsService.GenerateUniqueName
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSyntaxGeneratorInternal.vb (9)
57Public Overloads Overrides Function LocalDeclarationStatement(type As SyntaxNode, identifier As SyntaxToken, Optional initializer As SyntaxNode = Nothing, Optional isConst As Boolean = False) As SyntaxNode 67Public Overrides Function EqualsValueClause(operatorToken As SyntaxToken, value As SyntaxNode) As SyntaxNode 80Public Overrides Function Identifier(text As String) As SyntaxToken 116Public Overrides Function InterpolatedStringExpression(startToken As SyntaxToken, content As IEnumerable(Of SyntaxNode), endToken As SyntaxToken) As SyntaxNode 121Public Overrides Function InterpolatedStringText(textToken As SyntaxToken) As SyntaxNode 125Public Overrides Function InterpolatedStringTextToken(content As String, value As String) As SyntaxToken 465Public Overrides Function IsPatternExpression(expression As SyntaxNode, isToken As SyntaxToken, pattern As SyntaxNode) As SyntaxNode 513Public Overrides Function UnaryPattern(operatorToken As SyntaxToken, pattern As SyntaxNode) As SyntaxNode
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (18)
184Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 201previousToken As SyntaxToken) As IEnumerable(Of TypeInferenceInfo) 227Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 432Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 448Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 495Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 522Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 589Private Function InferTypeInCatchFilterClause(catchFilterClause As CatchFilterClauseSyntax, Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 653Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 674Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 692Private Function InferTypeInForStepClause(forStepClause As ForStepClauseSyntax, Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 717Private Function InferTypeForReturnStatement(returnStatement As ReturnStatementSyntax, Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 757Private Function InferTypeInYieldStatement(yieldStatement As YieldStatementSyntax, Optional previoustoken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 811Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 829Private Function InferTypeInThrowStatement(Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 879Optional previousToken As SyntaxToken? = Nothing) As IEnumerable(Of TypeInferenceInfo) 1021Private Shared Function GetArgumentListIndex(argumentList As ArgumentListSyntax, previousToken As SyntaxToken) As Integer 1033Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Utilities\ModifierCollectionFacts.vb (28)
15Private ReadOnly _accessibilityKeyword As SyntaxToken 16Private ReadOnly _asyncKeyword As SyntaxToken 18Private ReadOnly _inheritenceKeyword As SyntaxToken 19Private ReadOnly _iteratorKeyword As SyntaxToken 20Private ReadOnly _overridableSharedOrPartialKeyword As SyntaxToken 21Private ReadOnly _overridesOrShadowsKeyword As SyntaxToken 22Private ReadOnly _narrowingOrWideningKeyword As SyntaxToken 23Private ReadOnly _mutabilityOrWithEventsKeyword As SyntaxToken 24Private ReadOnly _defaultKeyword As SyntaxToken 25Private ReadOnly _overloadsKeyword As SyntaxToken 26Private ReadOnly _customKeyword As SyntaxToken 27Private ReadOnly _dimKeyword As SyntaxToken 28Private ReadOnly _sharedKeyword As SyntaxToken 32Public Sub New(syntaxTree As SyntaxTree, position As Integer, token As SyntaxToken, cancellationToken As CancellationToken) 218Public ReadOnly Property AccessibilityKeyword As SyntaxToken 224Public ReadOnly Property AsyncKeyword As SyntaxToken 230Public ReadOnly Property IteratorKeyword As SyntaxToken 242Public ReadOnly Property OverridableSharedOrPartialKeyword As SyntaxToken 248Public ReadOnly Property OverridesOrShadowsKeyword As SyntaxToken 254Public ReadOnly Property InheritenceKeyword As SyntaxToken 260Public ReadOnly Property DefaultKeyword As SyntaxToken 266Public ReadOnly Property NarrowingOrWideningKeyword As SyntaxToken 272Public ReadOnly Property OverloadsKeyword As SyntaxToken 278Public ReadOnly Property MutabilityOrWithEventsKeyword As SyntaxToken 284Public ReadOnly Property CustomKeyword As SyntaxToken 290Public ReadOnly Property DimKeyword As SyntaxToken 296Public ReadOnly Property SharedKeyword As SyntaxToken 302Private Shared Function ComputeAllowableDeclarationTypes(syntaxTree As SyntaxTree, position As Integer, token As SyntaxToken, cancellationToken As CancellationToken) As PossibleDeclarationTypes
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Utilities\VisualBasicSimplificationHelpers.vb (2)
10Public Function TryEscapeIdentifierToken(identifierToken As SyntaxToken) As SyntaxToken
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (26)
AutomaticCompletion\AutomaticLineEnderCommandHandler.vb (3)
72Dim lastToken = CType(root.FindTokenOnLeftOfPosition(line.End, includeSkipped:=False), SyntaxToken) 98If SyntaxFacts.AllowsTrailingImplicitLineContinuation(CType(nonMissingToken, SyntaxToken)) Then 118Return If(SyntaxFacts.AllowsLeadingImplicitLineContinuation(CType(nextToken, SyntaxToken)), Nothing, " _")
AutomaticEndConstructCorrection\AutomaticEndConstructCorrector.vb (13)
98Dim token As SyntaxToken = Nothing 106Private Shared Function GetLinkedEditSpans(snapshot As ITextSnapshot, token As SyntaxToken) As IEnumerable(Of ITrackingSpan) 117Private Function IsValidChange(bufferChanges As TextContentChangedEventArgs, ByRef token As SyntaxToken, cancellationToken As CancellationToken) As Boolean 161Private Shared Function IsChangeOnCorrectToken(token As SyntaxToken) As Boolean 184Private Shared Function CorrespondingBeginTokenExist(token As SyntaxToken) As Boolean 199Private Shared Function GetCorrespondingBeginToken(token As SyntaxToken) As SyntaxToken 219Private Shared Function IsChangeOnEndToken(token As SyntaxToken) As Boolean 228Private Shared Function CorrespondingEndTokenExist(token As SyntaxToken) As Boolean 234Private Shared Function GetCorrespondingEndToken(token As SyntaxToken) As SyntaxToken 248Private Shared Function IsChangeOnBeginToken(token As SyntaxToken) As Boolean 276Private Shared Function GetBeginToken(node As SyntaxNode) As SyntaxToken
DocumentationComments\XmlTagCompletionCommandHandler.vb (1)
50Protected Overrides Function GetLocalName(name As XmlNameSyntax) As SyntaxToken
EndConstructGeneration\EndConstructState.vb (3)
10Private ReadOnly _tokenToLeft As SyntaxToken 13Public Sub New(caretPosition As Integer, semanticModel As Lazy(Of SemanticModel), syntaxTree As SyntaxTree, tokenToLeft As SyntaxToken, newLineCharacter As String) 41Public ReadOnly Property TokenToLeft As SyntaxToken
EndConstructGeneration\VisualBasicEndConstructGenerationService.vb (1)
316Private Shared Function GetNodeFromToken(Of T As SyntaxNode)(token As SyntaxToken, expectedKind As SyntaxKind) As T
TextStructureNavigation\VisualBasicTextStructureNavigatorProvider.vb (2)
33Protected Overrides Function IsWithinNaturalLanguage(token As SyntaxToken, position As Integer) As Boolean 60Protected Overrides Function GetExtentOfWordFromToken(token As SyntaxToken, position As SnapshotPoint) As TextExtent
Utilities\LineAdjustmentFormattingRule.vb (3)
19Public Overrides Function GetAdjustNewLinesOperationSlow(ByRef previousToken As SyntaxToken, ByRef currentToken As SyntaxToken, ByRef nextOperation As NextGetAdjustNewLinesOperation) As AdjustNewLinesOperation 24Dim current = CType(currentToken, SyntaxToken)
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (5)
Symbols\EEDisplayClassFieldLocalSymbol.vb (1)
54Friend Overrides ReadOnly Property IdentifierToken As SyntaxToken
Symbols\EELocalConstantSymbol.vb (1)
51Friend Overrides ReadOnly Property IdentifierToken As SyntaxToken
Symbols\EELocalSymbol.vb (1)
77Friend Overrides ReadOnly Property IdentifierToken As SyntaxToken
Symbols\EEStaticLocalSymbol.vb (1)
48Friend Overrides ReadOnly Property IdentifierToken As SyntaxToken
Symbols\PlaceholderLocalSymbol.vb (1)
70Friend Overrides ReadOnly Property IdentifierToken As SyntaxToken
Microsoft.CodeAnalysis.VisualBasic.Features (309)
BraceCompletion\BracketBraceCompletionService.vb (4)
34Protected Overrides Function IsValidOpeningBraceToken(token As SyntaxToken) As Boolean 38Protected Overrides Function IsValidClosingBraceToken(token As SyntaxToken) As Boolean 43Protected Overrides Function IsValidOpenBraceTokenAtPosition(text As SourceText, token As SyntaxToken, position As Integer) As Boolean 72Private Shared Function IsBracketInCData(token As SyntaxToken) As Boolean
BraceCompletion\CurlyBraceCompletionService.vb (2)
38Protected Overrides Function IsValidOpeningBraceToken(token As SyntaxToken) As Boolean 42Protected Overrides Function IsValidClosingBraceToken(token As SyntaxToken) As Boolean
BraceCompletion\InterpolatedStringBraceCompletionService.vb (3)
28Protected Overrides Function IsValidOpenBraceTokenAtPosition(text As SourceText, token As SyntaxToken, position As Integer) As Boolean 40Protected Overrides Function IsValidOpeningBraceToken(token As SyntaxToken) As Boolean 44Protected Overrides Function IsValidClosingBraceToken(token As SyntaxToken) As Boolean
BraceCompletion\InterpolationBraceCompletionService.vb (3)
27Protected Overrides Function IsValidOpenBraceTokenAtPosition(text As SourceText, token As SyntaxToken, position As Integer) As Boolean 39Protected Overrides Function IsValidOpeningBraceToken(token As SyntaxToken) As Boolean 44Protected Overrides Function IsValidClosingBraceToken(token As SyntaxToken) As Boolean
BraceCompletion\LessAndGreaterThanCompletionService.vb (3)
28Protected Overrides Function IsValidOpeningBraceToken(token As SyntaxToken) As Boolean 32Protected Overrides Function IsValidClosingBraceToken(token As SyntaxToken) As Boolean 36Protected Overrides Function IsValidOpenBraceTokenAtPosition(text As SourceText, token As SyntaxToken, position As Integer) As Boolean
BraceCompletion\ParenthesisBraceCompletionService.vb (3)
28Protected Overrides Function IsValidOpeningBraceToken(token As SyntaxToken) As Boolean 32Protected Overrides Function IsValidClosingBraceToken(token As SyntaxToken) As Boolean 36Protected Overrides Function IsValidOpenBraceTokenAtPosition(text As SourceText, token As SyntaxToken, position As Integer) As Boolean
BraceCompletion\StringLiteralBraceCompletionService.vb (2)
38Protected Overrides Function IsValidOpeningBraceToken(token As SyntaxToken) As Boolean 42Protected Overrides Function IsValidClosingBraceToken(token As SyntaxToken) As Boolean
BraceMatching\LessThanGreaterThanBraceMatcher.vb (2)
20Protected Overrides Function AllowedForToken(token As SyntaxToken) As Boolean 25Dim tok = CType(token, SyntaxToken)
ChangeSignature\ChangeSignatureFormattingRule.vb (4)
24Dim firstToken As SyntaxToken = node.GetFirstToken() 25Dim lastToken As SyntaxToken = node.GetLastToken() 36Public Overrides Function GetAdjustNewLinesOperationSlow(ByRef previousToken As SyntaxToken, ByRef currentToken As SyntaxToken, ByRef nextOperation As NextGetAdjustNewLinesOperation) As AdjustNewLinesOperation
ChangeSignature\VisualBasicChangeSignatureService.vb (1)
784Protected Overrides Function CommaTokenWithElasticSpace() As SyntaxToken
CodeFixes\CorrectNextControlVariable\CorrectNextControlVariableCodeFixProvider.vb (1)
69Private Shared Function FindControlVariable(nextStatement As NextStatementSyntax, nestingLevel As Integer) As SyntaxToken?
CodeFixes\GenerateType\GenerateTypeCodeFixProvider.vb (1)
48Protected Overrides Function IsCandidate(node As SyntaxNode, token As SyntaxToken, diagnostic As Diagnostic) As Boolean
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.ReplaceKeywordCodeAction.vb (2)
15Private ReadOnly _invalidToken As SyntaxToken 22Public Sub New(createBlockKind As SyntaxKind, invalidToken As SyntaxToken, syntax As SyntaxNode, containingBlock As SyntaxNode, document As Document,
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.ReplaceTokenKeywordCodeAction.vb (2)
15Private ReadOnly _invalidToken As SyntaxToken 19invalidToken As SyntaxToken,
CodeFixes\IncorrectExitContinue\IncorrectExitContinueCodeFixProvider.vb (2)
315invalidToken As SyntaxToken, 325Private Shared Sub CreateReplaceTokenKeywordActions(blockKinds As IEnumerable(Of SyntaxKind), invalidToken As SyntaxToken, document As Document, codeActions As List(Of CodeAction))
CodeFixes\IncorrectFunctionReturnType\IncorrectFunctionReturnTypeCodeFixProvider.vb (1)
73Private Shared Function GetNodeToFix(Of T As SyntaxNode)(token As SyntaxToken, span As TextSpan) As T
CodeFixes\MoveToTopOfFile\MoveToTopOfFileCodeFixProvider.MoveToLineCodeAction.vb (2)
16Private ReadOnly _token As SyntaxToken 19Public Sub New(document As Document, token As SyntaxToken, destinationLine As Integer, title As String)
CodeFixes\Suppression\VisualBasicSuppressionCodeFixProvider.vb (3)
82Protected Overrides Function GetContainingStatement(token As SyntaxToken) As SyntaxNode 86Protected Overrides Function TokenHasTrailingLineContinuationChar(token As SyntaxToken) As Boolean 112Protected Overrides Function IsEndOfFileToken(token As SyntaxToken) As Boolean
Completion\CompletionProviders\AwaitCompletionProvider.vb (2)
49Protected Overrides Function GetAsyncSupportingDeclaration(targetToken As SyntaxToken, position As Integer) As SyntaxNode 81Protected Overrides Function GetDotTokenLeftOfPosition(syntaxTree As SyntaxTree, position As Integer, cancellationToken As CancellationToken) As SyntaxToken?
Completion\CompletionProviders\CrefCompletionProvider.vb (7)
100Protected Overrides Async Function GetSymbolsAsync(document As Document, position As Integer, options As CompletionOptions, cancellationToken As CancellationToken) As Task(Of (SyntaxToken, SemanticModel, ImmutableArray(Of ISymbol))) 122Private Shared Function IsCrefTypeParameterContext(token As SyntaxToken) As Boolean 128Private Shared Function IsCrefStartContext(token As SyntaxToken) As Boolean 152Private Shared Function IsCrefParameterListContext(token As SyntaxToken) As Boolean 160Private Shared Function IsFirstCrefParameterContext(ByRef token As SyntaxToken) As Boolean 164Private Overloads Shared Function GetSymbols(token As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken) As IEnumerable(Of ISymbol) 176Private Shared Iterator Function GetQualifiedSymbols(qualifiedName As QualifiedNameSyntax, token As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken) As IEnumerable(Of ISymbol)
Completion\CompletionProviders\HandlesClauseCompletionProvider.vb (1)
100token As SyntaxToken,
Completion\CompletionProviders\ImplementsClauseCompletionProvider.vb (1)
269Private Shared Function WalkUpQualifiedNames(token As SyntaxToken) As Boolean
Completion\CompletionProviders\ImportCompletionProvider\ExtensionMethodImportCompletionProvider.vb (1)
44Protected Overrides Function IsFinalSemicolonOfUsingOrExtern(directive As SyntaxNode, token As SyntaxToken) As Boolean
Completion\CompletionProviders\ImportCompletionProvider\TypeImportCompletionProvider.vb (1)
39Protected Overrides Function IsFinalSemicolonOfUsingOrExtern(directive As SyntaxNode, token As SyntaxToken) As Boolean
Completion\CompletionProviders\NamedParameterCompletionProvider.vb (1)
197Private Shared Sub GetInvocableNode(token As SyntaxToken, ByRef invocableNode As SyntaxNode, ByRef argumentList As ArgumentListSyntax)
Completion\CompletionProviders\OverrideCompletionProvider.vb (8)
39Protected Overrides Function GetSyntax(commonSyntaxToken As SyntaxToken) As SyntaxNode 40Dim token = CType(commonSyntaxToken, SyntaxToken) 55Protected Overrides Function GetToken(completionItem As CompletionItem, syntaxTree As SyntaxTree, cancellationToken As CancellationToken) As SyntaxToken 60Public Overrides Function FindStartingToken(syntaxTree As SyntaxTree, position As Integer, cancellationToken As CancellationToken) As SyntaxToken 71Public Overrides Function TryDetermineModifiers(startToken As SyntaxToken, 76Dim token = CType(startToken, SyntaxToken) 146Public Overrides Function TryDetermineReturnType(startToken As SyntaxToken, 149ByRef returnType As ITypeSymbol, ByRef nextToken As SyntaxToken) As Boolean
Completion\CompletionProviders\SymbolCompletionProvider.vb (1)
88Protected Overrides Function IsTriggerOnDot(token As SyntaxToken, characterPositoin As Integer) As Boolean
Completion\CompletionProviders\XmlDocCommentCompletionProvider.vb (6)
58Public Shared Function GetPreviousTokenIfTouchingText(token As SyntaxToken, position As Integer) As SyntaxToken 64Private Shared Function IsText(token As SyntaxToken) As Boolean 196Private Function GetCloseTagItem(token As SyntaxToken) As IEnumerable(Of CompletionItem) 225Private Sub TryGetAttributes(token As SyntaxToken, 337Private Function GetAttributes(token As SyntaxToken, tagName As String, attributes As SyntaxList(Of XmlNodeSyntax)) As IEnumerable(Of CompletionItem)
Completion\KeywordRecommenders\Declarations\OfKeywordRecommender.vb (1)
116Private Shared Function IsGenericDelegateCreationExpression(token As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean
Completion\KeywordRecommenders\RecommendationHelpers.vb (9)
27Friend Function IsFollowingCompleteAsNewClause(token As SyntaxToken) As Boolean 33Dim lastToken As SyntaxToken 58Private Function IsLastTokenOfObjectCreation(token As SyntaxToken, objectCreation As ObjectCreationExpressionSyntax) As Boolean 71Friend Function IsFollowingCompleteObjectCreationInitializer(token As SyntaxToken) As Boolean 88Friend Function IsFollowingCompleteObjectCreation(token As SyntaxToken) As Boolean 106Friend Function IsFromIdentifierNode(token As SyntaxToken, identifierSyntax As IdentifierNameSyntax) As Boolean 114Friend Function IsFromIdentifierNode(token As SyntaxToken, identifierSyntax As ModifiedIdentifierSyntax) As Boolean 122Friend Function IsFromIdentifierNode(token As SyntaxToken, node As SyntaxNode) As Boolean 141Friend Function IsFromIdentifierNode(Of TParent As SyntaxNode)(token As SyntaxToken, identifierNodeSelector As Func(Of TParent, SyntaxNode)) As Boolean
Completion\KeywordRecommenders\Statements\FinallyKeywordRecommender.vb (1)
51Private Shared Function IsInCatchOfTry(targetToken As SyntaxToken, tryBlock As TryBlockSyntax) As Boolean
Completion\Providers\ContextVariableArgumentProvider.vb (1)
29Protected Overrides Function IsInstanceContext(syntaxTree As SyntaxTree, targetToken As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean
ConvertForEachToFor\VisualBasicConvertForEachToForCodeRefactoringProvider.vb (1)
122collectionVariableName As SyntaxNode, indexVariable As SyntaxToken) As SyntaxList(Of StatementSyntax)
ConvertForToForEach\VisualBasicConvertForToForEachCodeRefactoringProvider.vb (2)
45ByRef iterationVariable As SyntaxToken, 81foreachIdentifier As SyntaxToken, collectionExpression As ExpressionSyntax, iterationVariableType As ITypeSymbol) As SyntaxNode
DocumentationComments\VisualBasicDocumentationCommentSnippetService.vb (6)
182Private Shared Function GetTextTokensFollowingExteriorTrivia(xmlText As XmlTextSyntax) As IList(Of SyntaxToken) 183Dim result = New List(Of SyntaxToken) 229Protected Overrides Function GetTokenToRight(syntaxTree As SyntaxTree, position As Integer, cancellationToken As CancellationToken) As SyntaxToken 238Protected Overrides Function GetTokenToLeft(syntaxTree As SyntaxTree, position As Integer, cancellationToken As CancellationToken) As SyntaxToken 247Protected Overrides Function IsDocCommentNewLine(token As SyntaxToken) As Boolean 254Protected Overrides Function HasSkippedTrailingTrivia(token As SyntaxToken) As Boolean
EditAndContinue\DeclarationBody\FieldOrPropertyDeclarationBody.vb (1)
126Public Overrides Function GetActiveTokens() As IEnumerable(Of SyntaxToken)
EditAndContinue\DeclarationBody\FieldWithMultipleAsNewClauseDeclarationBody.vb (1)
52Public Overrides Function GetActiveTokens() As IEnumerable(Of SyntaxToken)
EditAndContinue\DeclarationBody\PropertyWithInitializerDeclarationBody.vb (2)
41Public Overrides Function GetActiveTokens() As IEnumerable(Of SyntaxToken) 44If(PropertyStatement.AsClause?.DescendantTokens(), Array.Empty(Of SyntaxToken))).Concat(PropertyStatement.Initializer.DescendantTokens())
EditAndContinue\DeclarationBody\PropertyWithNewClauseDeclarationBody.vb (1)
41Public Overrides Function GetActiveTokens() As IEnumerable(Of SyntaxToken)
EditAndContinue\SyntaxComparer.vb (20)
1119leftBody As IEnumerable(Of SyntaxToken), 1120rightBody As IEnumerable(Of SyntaxToken)) As Double 1176Dim leftLocals As List(Of SyntaxToken) = Nothing 1177Dim rightLocals As List(Of SyntaxToken) = Nothing 1191Private Shared Sub GetLocalNames(statements As SyntaxList(Of StatementSyntax), ByRef result As List(Of SyntaxToken)) 1201Private Shared Sub GetLocalNames(localDecl As VariableDeclaratorSyntax, ByRef result As List(Of SyntaxToken)) 1204result = New List(Of SyntaxToken)() 1354Friend Shared Iterator Function GetDescendantTokensIgnoringSeparators(Of TSyntaxNode As SyntaxNode)(list As SyntaxList(Of TSyntaxNode)) As IEnumerable(Of SyntaxToken) 1365Private Shared Iterator Function GetDescendantTokensIgnoringSeparators(Of TSyntaxNode As SyntaxNode)(list As SeparatedSyntaxList(Of TSyntaxNode)) As IEnumerable(Of SyntaxToken) 1393Public Overloads Shared Function ComputeDistance(oldToken As SyntaxToken, newToken As SyntaxToken) As Double 1409Public Overloads Shared Function ComputeDistance(oldTokens As IEnumerable(Of SyntaxToken), newTokens As IEnumerable(Of SyntaxToken)) As Double 1440Public Shared Function GetSequenceEdits(oldTokens As IEnumerable(Of SyntaxToken), newTokens As IEnumerable(Of SyntaxToken)) As IEnumerable(Of SequenceEdit) 1447Public Shared Function GetSequenceEdits(oldTokens As ImmutableArray(Of SyntaxToken), newTokens As ImmutableArray(Of SyntaxToken)) As IEnumerable(Of SequenceEdit) 1452Inherits LongestCommonImmutableArraySubsequence(Of SyntaxToken) 1456Protected Overrides Function Equals(oldElement As SyntaxToken, newElement As SyntaxToken) As Boolean
EditAndContinue\VisualBasicEditAndContinueAnalyzer.vb (8)
331Protected Overrides Function TryGetEnclosingBreakpointSpan(token As SyntaxToken, <Out> ByRef span As TextSpan) As Boolean 468Protected Overrides Function AreEquivalentImpl(oldToken As SyntaxToken, newToken As SyntaxToken) As Boolean 1318Private Overloads Shared Function GetDiagnosticSpan(ifKeyword As SyntaxToken, condition As SyntaxNode, thenKeywordOpt As SyntaxToken) As TextSpan 1339Dim startToken As SyntaxToken 1340Dim endToken As SyntaxToken 1404Dim endToken As SyntaxToken
EmbeddedLanguages\EmbeddedLanguageUtilities.vb (1)
10Friend Sub AddComment(editor As SyntaxEditor, stringLiteral As SyntaxToken, commentContents As String)
EmbeddedLanguages\VisualBasicEmbeddedLanguagesProvider.vb (1)
29Public Overrides Function EscapeText(text As String, token As SyntaxToken) As String
EmbeddedLanguages\VisualBasicJsonDetectionCodeFixProvider.vb (1)
22Protected Overrides Sub AddComment(editor As CodeAnalysis.Editing.SyntaxEditor, stringLiteral As SyntaxToken, commentContents As String)
ExtractMethod\Extensions.vb (9)
158Public Function ContainArgumentlessThrowWithoutEnclosingCatch(ByVal tokens As IEnumerable(Of SyntaxToken), ByVal textSpan As TextSpan) As Boolean 179Public Function ContainPreprocessorCrossOver(ByVal tokens As IEnumerable(Of SyntaxToken), ByVal textSpan As TextSpan) As Boolean 213Public Function GetAllTrivia(ByVal tokens As IEnumerable(Of SyntaxToken)) As IEnumerable(Of SyntaxTrivia) 246Public Function UnderWithBlockContext(token As SyntaxToken) As Boolean 257Public Function UnderObjectMemberInitializerContext(token As SyntaxToken) As Boolean 268Public Function UnderValidContext(token As SyntaxToken) As Boolean 370Public Function ToSeparatedList(Of T As SyntaxNode)(nodes As IEnumerable(Of Tuple(Of T, SyntaxToken))) As SeparatedSyntaxList(Of T) 387Public Function CreateAssignmentExpressionStatementWithValue(identifier As SyntaxToken, rvalue As ExpressionSyntax) As ExecutableStatementSyntax 411Dim identifier As SyntaxToken = variable.Identifier
ExtractMethod\VisualBasicMethodExtractor.PostProcessor.vb (1)
165Private Shared Function ContainsOnlyWhitespaceTrivia(token As SyntaxToken) As Boolean
ExtractMethod\VisualBasicMethodExtractor.TriviaResult.vb (7)
52method As MethodBlockBaseSyntax) As SyntaxToken 76triviaMap As Dictionary(Of SyntaxToken, LeadingTrailingTriviaPair), 116token1 As SyntaxToken, list As IEnumerable(Of SyntaxTrivia), token2 As SyntaxToken) As IEnumerable(Of SyntaxTrivia) 133token1 As SyntaxToken, list As IEnumerable(Of SyntaxTrivia), token2 As SyntaxToken) As IEnumerable(Of SyntaxTrivia) 168Private Shared Function SingleLineStatement(token As SyntaxToken) As Boolean
ExtractMethod\VisualBasicMethodExtractor.vb (7)
74Protected Overrides Function GetInvocationNameToken(methodNames As IEnumerable(Of SyntaxToken)) As SyntaxToken? 90Public Overrides Function GetAdjustNewLinesOperationSlow(ByRef previousToken As SyntaxToken, ByRef currentToken As SyntaxToken, ByRef nextOperation As NextGetAdjustNewLinesOperation) As AdjustNewLinesOperation 114Private Shared Function IsLessThanInAttribute(token As SyntaxToken) As Boolean 128invocationNameToken? As SyntaxToken, 130cancellationToken As CancellationToken) As Task(Of (document As Document, invocationNameToken As SyntaxToken?))
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.ExpressionCodeGenerator.vb (1)
27Protected Overrides Function CreateMethodName() As SyntaxToken
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.MultipleStatementsCodeGenerator.vb (1)
22Protected Overrides Function CreateMethodName() As SyntaxToken
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.SingleStatementCodeGenerator.vb (1)
22Protected Overrides Function CreateMethodName() As SyntaxToken
ExtractMethod\VisualBasicMethodExtractor.VisualBasicCodeGenerator.vb (3)
22Private ReadOnly _methodName As SyntaxToken 294Protected Overrides Function CreateIdentifier(name As String) As SyntaxToken 389Protected Overrides Function CreateAssignmentExpressionStatement(identifier As SyntaxToken, rvalue As ExpressionSyntax) As StatementSyntax
ExtractMethod\VisualBasicSelectionResult.vb (5)
25firstToken As SyntaxToken, 26lastToken As SyntaxToken, 70Protected Overrides Function UnderAnonymousOrLocalMethod(token As SyntaxToken, firstToken As SyntaxToken, lastToken As SyntaxToken) As Boolean
ExtractMethod\VisualBasicSelectionValidator.vb (2)
226Private Shared Function GetCommonRoot(token1 As SyntaxToken, token2 As SyntaxToken) As SyntaxNode
GenerateMember\GenerateVariable\VisualBasicGenerateVariableService.vb (3)
34ByRef identifierToken As SyntaxToken, ByRef propertySymbol As IPropertySymbol, ByRef typeToGenerateIn As INamedTypeSymbol) As Boolean 70ByRef identifierToken As SyntaxToken, 120Protected Overrides Function TryConvertToLocalDeclaration(type As ITypeSymbol, identifierToken As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken, ByRef newRoot As SyntaxNode) As Boolean
GoToDefinition\VisualBasicGoToDefinitionSymbolService.vb (1)
29Protected Overrides Function GetTargetPositionIfControlFlow(semanticModel As SemanticModel, token As SyntaxToken) As Integer?
InheritanceMargin\VisualBasicInheritanceMarginService.vb (1)
74Protected Overrides Function GetDeclarationToken(declarationNode As SyntaxNode) As SyntaxToken
IntroduceVariable\VisualBasicIntroduceVariableService_IntroduceField.vb (3)
61newNameToken As SyntaxToken, 197newNameToken As SyntaxToken, 223Dim modifiers = New List(Of SyntaxToken)
MetadataAsSource\VisualBasicMetadataAsSourceService.vb (2)
85Protected Overrides Function GetAdjustNewLinesOperationBetweenMembersAndUsings(token1 As SyntaxToken, token2 As SyntaxToken) As AdjustNewLinesOperation
QuickInfo\VisualBasicSemanticQuickInfoProvider.vb (9)
30token As SyntaxToken) As Task(Of QuickInfoItem) 43token As SyntaxToken) As Task(Of QuickInfoItem) 55token As SyntaxToken, 131Protected Overrides Function GetBindableNodeForTokenIndicatingLambda(token As SyntaxToken, <Out> ByRef found As SyntaxNode) As Boolean 141Protected Overrides Function GetBindableNodeForTokenIndicatingPossibleIndexerAccess(token As SyntaxToken, ByRef found As SyntaxNode) As Boolean 152Protected Overrides Function GetBindableNodeForTokenIndicatingMemberAccess(token As SyntaxToken, ByRef found As SyntaxToken) As Boolean 167token As SyntaxToken, 205token As SyntaxToken,
RemoveUnusedVariable\VisualBasicRemoveUnusedVariableCodeFixProvider.vb (1)
31Protected Overrides Function IsCatchDeclarationIdentifier(token As SyntaxToken) As Boolean
Rename\VisualBasicRenameIssuesService.vb (1)
19Public Function CheckLanguageSpecificIssues(semantic As SemanticModel, symbol As ISymbol, triggerToken As SyntaxToken, <NotNullWhen(True)> ByRef langError As String) As Boolean Implements IRenameIssuesService.CheckLanguageSpecificIssues
ReplaceDocCommentTextWithTag\VisualBasicReplaceDocCommentTextWithTagCodeRefactoringProvider.vb (2)
21Protected Overrides Function IsXmlTextToken(token As SyntaxToken) As Boolean 26Protected Overrides Function IsInXMLAttribute(token As SyntaxToken) As Boolean
ReplaceMethodWithProperty\VisualBasicReplaceMethodWithPropertyService.vb (4)
132Private Shared Function GetPropertyName(identifier As SyntaxToken, propertyName As String, nameChanged As Boolean) As SyntaxToken 136Public Sub ReplaceGetReference(editor As SyntaxEditor, nameToken As SyntaxToken, propertyName As String, nameChanged As Boolean) Implements IReplaceMethodWithPropertyService.ReplaceGetReference 165Public Sub ReplaceSetReference(editor As SyntaxEditor, nameToken As SyntaxToken, propertyName As String, nameChanged As Boolean) Implements IReplaceMethodWithPropertyService.ReplaceSetReference
ReplacePropertyWithMethods\VisualBasicReplacePropertyWithMethods.vb (1)
232Protected Overrides Function CreateCrefSyntax(originalCref As CrefReferenceSyntax, identifierToken As SyntaxToken, parameterType As SyntaxNode) As CrefReferenceSyntax
SignatureHelp\AbstractIntrinsicOperatorSignatureHelpProvider.vb (3)
15Protected MustOverride Function IsTriggerToken(token As SyntaxToken) As Boolean 16Protected MustOverride Function IsArgumentListToken(node As TSyntaxNode, token As SyntaxToken) As Boolean 84Dim commaTokens As New List(Of SyntaxToken)
SignatureHelp\AddRemoveHandlerSignatureHelpProvider.vb (2)
33Protected Overrides Function IsTriggerToken(token As SyntaxToken) As Boolean 46Protected Overrides Function IsArgumentListToken(node As AddRemoveHandlerStatementSyntax, token As SyntaxToken) As Boolean
SignatureHelp\AttributeSignatureHelpProvider.vb (2)
42Private Function IsTriggerToken(token As SyntaxToken) As Boolean 48Private Shared Function IsArgumentListToken(node As AttributeSyntax, token As SyntaxToken) As Boolean
SignatureHelp\CastExpressionSignatureHelpProvider.vb (2)
35Protected Overrides Function IsTriggerToken(token As SyntaxToken) As Boolean 48Protected Overrides Function IsArgumentListToken(node As CastExpressionSyntax, token As SyntaxToken) As Boolean
SignatureHelp\CollectionInitializerSignatureHelpProvider.vb (2)
37Private Function IsTriggerToken(token As SyntaxToken) As Boolean 44Private Shared Function IsInitializerExpressionToken(expression As CollectionInitializerSyntax, token As SyntaxToken) As Boolean
SignatureHelp\ConditionalExpressionSignatureHelpProvider.vb (2)
22Protected Overrides Function IsTriggerToken(token As SyntaxToken) As Boolean 35Protected Overrides Function IsArgumentListToken(node As T, token As SyntaxToken) As Boolean
SignatureHelp\GenericNameSignatureHelpProvider.vb (2)
52Private Shared Function IsTriggerToken(token As SyntaxToken) As Boolean 58Private Shared Function IsArgumentListToken(node As GenericNameSyntax, token As SyntaxToken) As Boolean
SignatureHelp\GetTypeExpressionSignatureHelpProvider.vb (2)
26Protected Overrides Function IsTriggerToken(token As SyntaxToken) As Boolean 38Protected Overrides Function IsArgumentListToken(node As GetTypeExpressionSyntax, token As SyntaxToken) As Boolean
SignatureHelp\GetXmlNamespaceExpressionSignatureHelpProvider.vb (2)
26Protected Overrides Function IsTriggerToken(token As SyntaxToken) As Boolean 38Protected Overrides Function IsArgumentListToken(node As GetXmlNamespaceExpressionSyntax, token As SyntaxToken) As Boolean
SignatureHelp\InvocationExpressionSignatureHelpProvider.vb (2)
53Private Shared Function IsTriggerToken(token As SyntaxToken) As Boolean 59Private Shared Function IsArgumentListToken(node As InvocationExpressionSyntax, token As SyntaxToken) As Boolean
SignatureHelp\MidAssignmentSignatureHelpProvider.vb (2)
26Protected Overrides Function IsTriggerToken(token As SyntaxToken) As Boolean 41Protected Overrides Function IsArgumentListToken(node As AssignmentStatementSyntax, token As SyntaxToken) As Boolean
SignatureHelp\NameOfExpressionSignatureHelpProvider.vb (2)
34Protected Overrides Function IsArgumentListToken(node As NameOfExpressionSyntax, token As SyntaxToken) As Boolean 40Protected Overrides Function IsTriggerToken(token As SyntaxToken) As Boolean
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.vb (2)
52Private Shared Function IsTriggerToken(token As SyntaxToken) As Boolean 58Private Shared Function IsArgumentListToken(node As ObjectCreationExpressionSyntax, token As SyntaxToken) As Boolean
SignatureHelp\PredefinedCastExpressionSignatureHelpProvider.vb (2)
30Protected Overrides Function IsTriggerToken(token As SyntaxToken) As Boolean 42Protected Overrides Function IsArgumentListToken(node As PredefinedCastExpressionSyntax, token As SyntaxToken) As Boolean
SignatureHelp\RaiseEventStatementSignatureHelpProvider.vb (2)
51Private Shared Function IsTriggerToken(token As SyntaxToken) As Boolean 57Private Shared Function IsArgumentListToken(statement As RaiseEventStatementSyntax, token As SyntaxToken) As Boolean
SignatureHelp\SignatureHelpUtilities.vb (6)
12Private ReadOnly s_getArgumentListOpenToken As Func(Of ArgumentListSyntax, SyntaxToken) = Function(list) list.OpenParenToken 13Private ReadOnly s_getTypeArgumentListOpenToken As Func(Of TypeArgumentListSyntax, SyntaxToken) = Function(list) list.OpenParenToken 14Private ReadOnly s_getCollectionInitializerOpenToken As Func(Of CollectionInitializerSyntax, SyntaxToken) = Function(i) i.OpenBraceToken 16Private ReadOnly s_getArgumentListCloseToken As Func(Of ArgumentListSyntax, SyntaxToken) = 32Private ReadOnly s_getTypeArgumentListCloseToken As Func(Of TypeArgumentListSyntax, SyntaxToken) = Function(list) list.CloseParenToken 33Private ReadOnly s_getCollectionInitializerCloseToken As Func(Of CollectionInitializerSyntax, SyntaxToken) = Function(i) i.CloseBraceToken
SpellCheck\VisualBasicSpellCheckCodeFixProvider.vb (3)
60Protected Overrides Function IsGeneric(nameToken As SyntaxToken) As Boolean 73Protected Overrides Function CreateIdentifier(nameToken As SyntaxToken, newName As String) As SyntaxToken
src\Analyzers\VisualBasic\Analyzers\AddAccessibilityModifiers\VisualBasicAddAccessibilityModifiers.vb (1)
22ByRef name As SyntaxToken,
src\Analyzers\VisualBasic\Analyzers\AddAccessibilityModifiers\VisualBasicAddAccessibilityModifiersDiagnosticAnalyzer.vb (1)
58Dim name As SyntaxToken = Nothing
src\Analyzers\VisualBasic\Analyzers\AddRequiredParentheses\VisualBasicAddRequiredParenthesesDiagnosticAnalyzer.vb (1)
47Protected Overrides Function GetPartsOfBinaryLike(binaryLike As BinaryExpressionSyntax) As (ExpressionSyntax, SyntaxToken, ExpressionSyntax)
src\Analyzers\VisualBasic\Analyzers\RemoveUnnecessaryImports\VisualBasicRemoveUnnecessaryImportsDiagnosticAnalyzer.vb (1)
60Protected Overrides Function TryGetLastToken(node As SyntaxNode) As SyntaxToken?
src\Analyzers\VisualBasic\Analyzers\UseCollectionInitializer\VisualBasicUpdateExpressionSyntaxHelper.vb (2)
14Public Sub GetPartsOfForeachStatement(statement As StatementSyntax, ByRef awaitKeyword As SyntaxToken, ByRef identifier As SyntaxToken, ByRef expression As ExpressionSyntax, ByRef statements As IEnumerable(Of StatementSyntax)) Implements IUpdateExpressionSyntaxHelper(Of ExpressionSyntax, StatementSyntax).GetPartsOfForeachStatement
src\Analyzers\VisualBasic\CodeFixes\AddAnonymousTypeMemberName\VisualBasicAddAnonymousTypeMemberNameCodeFixProvider.vb (1)
38Protected Overrides Function WithName(declarator As FieldInitializerSyntax, nameToken As SyntaxToken) As FieldInitializerSyntax
src\Analyzers\VisualBasic\CodeFixes\DocumentationComments\VisualBasicRemoveDocCommentNodeCodeFixProvider.vb (2)
75Protected Overrides Function IsXmlWhitespaceToken(token As SyntaxToken) As Boolean 79Protected Overrides Function IsXmlNewLineToken(token As SyntaxToken) As Boolean
src\Analyzers\VisualBasic\CodeFixes\GenerateConstructor\GenerateConstructorCodeFixProvider.vb (1)
58Protected Overrides Function IsCandidate(node As SyntaxNode, token As SyntaxToken, diagnostic As Diagnostic) As Boolean
src\Analyzers\VisualBasic\CodeFixes\GenerateConstructor\VisualBasicGenerateConstructorService.vb (5)
29Protected Overrides Function TryInitializeImplicitObjectCreation(document As SemanticDocument, node As SyntaxNode, cancellationToken As CancellationToken, ByRef token As SyntaxToken, ByRef arguments As ImmutableArray(Of Argument), ByRef typeToGenerateIn As INamedTypeSymbol) As Boolean 61ByRef token As SyntaxToken, 96ByRef token As SyntaxToken, 131ByRef token As SyntaxToken, 169Protected Overrides Function GetCurrentConstructor(semanticModel As SemanticModel, token As SyntaxToken, cancellationToken As CancellationToken) As IMethodSymbol
src\Analyzers\VisualBasic\CodeFixes\GenerateDefaultConstructors\VisualBasicGenerateDefaultConstructorsCodeFixProvider.vb (1)
28Protected Overrides Function TryGetTypeName(typeDeclaration As SyntaxNode) As SyntaxToken?
src\Analyzers\VisualBasic\CodeFixes\GenerateEnumMember\GenerateEnumMemberCodeFixProvider.vb (1)
40Protected Overrides Function IsCandidate(node As SyntaxNode, token As SyntaxToken, diagnostic As Diagnostic) As Boolean
src\Analyzers\VisualBasic\CodeFixes\GenerateEnumMember\VisualBasicGenerateEnumMemberService.vb (1)
28ByRef identifierToken As SyntaxToken, ByRef simpleNameOrMemberAccessExpression As ExpressionSyntax) As Boolean
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\GenerateConversionCodeFixProvider.vb (1)
40Protected Overrides Function IsCandidate(node As SyntaxNode, token As SyntaxToken, diagnostic As Diagnostic) As Boolean
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\GenerateParameterizedMemberCodeFixProvider.vb (1)
59Protected Overrides Function IsCandidate(node As SyntaxNode, token As SyntaxToken, diagnostic As Diagnostic) As Boolean
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\VisualBasicGenerateConversionService.vb (2)
55Protected Overrides Function TryInitializeExplicitConversionState(document As SemanticDocument, expression As SyntaxNode, classInterfaceModuleStructTypes As ISet(Of TypeKind), cancellationToken As CancellationToken, ByRef identifierToken As SyntaxToken, ByRef methodSymbol As IMethodSymbol, ByRef typeToGenerateIn As INamedTypeSymbol) As Boolean 69Protected Overrides Function TryInitializeImplicitConversionState(document As SemanticDocument, expression As SyntaxNode, classInterfaceModuleStructTypes As ISet(Of TypeKind), cancellationToken As CancellationToken, ByRef identifierToken As SyntaxToken, ByRef methodSymbol As IMethodSymbol, ByRef typeToGenerateIn As INamedTypeSymbol) As Boolean
src\Analyzers\VisualBasic\CodeFixes\GenerateParameterizedMember\VisualBasicGenerateMethodService.vb (2)
44ByRef identifierToken As SyntaxToken, 78ByRef identifierToken As SyntaxToken,
src\Analyzers\VisualBasic\CodeFixes\GenerateVariable\VisualBasicGenerateVariableCodeFixProvider.vb (1)
52Protected Overrides Function IsCandidate(node As SyntaxNode, token As SyntaxToken, diagnostic As Diagnostic) As Boolean
src\Analyzers\VisualBasic\CodeFixes\ImplementAbstractClass\VisualBasicImplementAbstractClassCodeFixProvider.vb (1)
26Protected Overrides Function GetClassIdentifier(classNode As ClassBlockSyntax) As SyntaxToken
src\Analyzers\VisualBasic\CodeFixes\Iterator\VisualBasicConvertToIteratorCodeFixProvider.vb (2)
113Dim iteratorToken As SyntaxToken = Token(SyntaxKind.IteratorKeyword).WithAdditionalAnnotations(Formatter.Annotation) 132Dim iteratorToken As SyntaxToken = Token(SyntaxKind.IteratorKeyword).WithAdditionalAnnotations(Formatter.Annotation)
src\Analyzers\VisualBasic\CodeFixes\MakeMethodAsynchronous\VisualBasicMakeMethodAsynchronousCodeFixProvider.vb (1)
27Private Shared ReadOnly s_asyncToken As SyntaxToken = SyntaxFactory.Token(SyntaxKind.AsyncKeyword)
src\Analyzers\VisualBasic\CodeFixes\RemoveUnusedParametersAndValues\VisualBasicRemoveUnusedValuesCodeFixProvider.vb (2)
40Protected Overrides Function TryUpdateNameForFlaggedNode(node As SyntaxNode, newName As SyntaxToken) As SyntaxNode 55Protected Overrides Function GetForEachStatementIdentifier(node As ForEachBlockSyntax) As SyntaxToken
src\Analyzers\VisualBasic\CodeFixes\UseCompoundAssignment\VisualBasicUseCompoundAssignmentCodeFixProvider.vb (2)
23Protected Overrides Function Token(kind As SyntaxKind) As SyntaxToken 28assignmentOpKind As SyntaxKind, left As ExpressionSyntax, syntaxToken As SyntaxToken, right As ExpressionSyntax) As AssignmentStatementSyntax
src\Analyzers\VisualBasic\CodeFixes\UseConditionalExpression\MultiLineConditionalExpressionFormattingRule.vb (3)
31Private Shared Function IsCommaOfNewConditional(token As SyntaxToken) As Boolean 41ByRef previousToken As SyntaxToken, ByRef currentToken As SyntaxToken, ByRef nextOperation As NextGetAdjustNewLinesOperation) As AdjustNewLinesOperation
Structure\Providers\AccessorDeclarationStructureProvider.vb (1)
15Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\CollectionInitializerStructureProvider.vb (1)
16Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\CompilationUnitStructureProvider.vb (1)
16Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\ConstructorDeclarationStructureProvider.vb (1)
15Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\DelegateDeclarationStructureProvider.vb (1)
14Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\DocumentationCommentStructureProvider.vb (1)
17Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\DoLoopBlockStructureProvider.vb (1)
15Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\EnumDeclarationStructureProvider.vb (1)
15Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\EnumMemberDeclarationStructureProvider.vb (1)
14Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\EventDeclarationStructureProvider.vb (1)
15Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\ExternalMethodDeclarationStructureProvider.vb (1)
14Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\FieldDeclarationStructureProvider.vb (1)
14Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\ForBlockStructureProvider.vb (1)
15Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\ForEachBlockStructureProvider.vb (1)
15Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\InterpolatedStringExpressionStructureProvider.vb (1)
14Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\MethodDeclarationStructureProvider.vb (1)
15Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\MultiLineIfBlockStructureProvider.vb (1)
15Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\MultilineLambdaStructureProvider.vb (1)
15Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\NamespaceDeclarationStructureProvider.vb (1)
15Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\ObjectCreationInitializerStructureProvider.vb (1)
16Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\OperatorDeclarationStructureProvider.vb (1)
15Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\PropertyDeclarationStructureProvider.vb (1)
15Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\RegionDirectiveStructureProvider.vb (1)
26Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\SelectBlockStructureProvider.vb (1)
15Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\StringLiteralExpressionStructureProvider.vb (1)
14Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\SyncLockBlockStructureProvider.vb (1)
15Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\TryBlockStructureProvider.vb (1)
15Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\TypeDeclarationStructureProvider.vb (1)
15Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\UsingBlockStructureProvider.vb (1)
15Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\WhileBlockStructureProvider.vb (1)
15Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\WithBlockStructureProvider.vb (1)
15Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\Providers\XmlExpressionStructureProvider.vb (1)
15Protected Overrides Sub CollectBlockSpans(previousToken As SyntaxToken,
Structure\VisualBasicStructureHelpers.vb (2)
126Private Function GetEndToken(node As SyntaxNode) As SyntaxToken 163Private Function GetHintTextEndToken(node As SyntaxNode) As SyntaxToken
UseNamedArguments\VisualBasicUseNamedArgumentsCodeRefactoringProvider.vb (1)
41Protected Overrides Function WithArguments(argumentList As ArgumentListSyntax, namedArguments As IEnumerable(Of ArgumentSyntax), separators As IEnumerable(Of SyntaxToken)) As ArgumentListSyntax
Wrapping\SeparatedSyntaxList\VisualBasicArgumentWrapper.vb (2)
28Protected Overrides Function FirstToken(listSyntax As ArgumentListSyntax) As SyntaxToken 32Protected Overrides Function LastToken(listSyntax As ArgumentListSyntax) As SyntaxToken
Wrapping\SeparatedSyntaxList\VisualBasicCollectionCreationExpressionWrapper.vb (2)
43Protected Overrides Function FirstToken(listSyntax As CollectionInitializerSyntax) As SyntaxToken 47Protected Overrides Function LastToken(listSyntax As CollectionInitializerSyntax) As SyntaxToken
Wrapping\SeparatedSyntaxList\VisualBasicParameterWrapper.vb (2)
29Protected Overrides Function FirstToken(listSyntax As ParameterListSyntax) As SyntaxToken 33Protected Overrides Function LastToken(listSyntax As ParameterListSyntax) As SyntaxToken
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (2)
EditAndContinue\SyntaxComparerTests.vb (2)
144Array.Empty(Of SyntaxToken)) 149Array.Empty(Of SyntaxToken),
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (8)
DeclaringSyntaxNodeTests.vb (2)
40Dim beginTerminator As SyntaxToken = Nothing 91Dim beginTerminator As SyntaxToken = Nothing
FlowAnalysis\FlowTestBase.vb (5)
147Private Function GetNextToken(token As SyntaxToken) As SyntaxToken 153Private Sub AdjustToken(ByRef token As SyntaxToken) 173Dim startToken As SyntaxToken = tree.GetCompilationUnitRoot().FindToken(region.Start, True) 187Dim endToken As SyntaxToken = Nothing
Semantics\SyntaxTreeRootTests.vb (1)
95Dim token As SyntaxToken = Nothing
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (2)
DocumentationComments\DocCommentTests.vb (1)
12089Dim token As SyntaxToken = tree.GetRoot().FindToken(position, True)
SymbolsTests\Source\BindingsTests.vb (1)
31Private Function FindTypeSyntax(token As SyntaxToken) As TypeSyntax
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (59)
Generated\Syntax.Test.xml.Generated.vb (9)
17607Private Shared Function GenerateRedXmlNameToken() As SyntaxToken 17612Private Shared Function GenerateRedXmlTextLiteralToken() As SyntaxToken 17617Private Shared Function GenerateRedXmlEntityLiteralToken() As SyntaxToken 17622Private Shared Function GenerateRedDocumentationCommentLineBreakToken() As SyntaxToken 17627Private Shared Function GenerateRedInterpolatedStringTextToken() As SyntaxToken 17632Private Shared Function GenerateRedDecimalLiteralToken() As SyntaxToken 17637Private Shared Function GenerateRedDateLiteralToken() As SyntaxToken 17642Private Shared Function GenerateRedStringLiteralToken() As SyntaxToken 17647Private Shared Function GenerateRedCharacterLiteralToken() As SyntaxToken
Parser\ParseIteratorTests.vb (1)
419Return methodSyntax.BlockStatement.Modifiers.Contains(Function(t As SyntaxToken) t.Kind = SyntaxKind.IteratorKeyword)
Parser\ParseStatements.vb (1)
7916Public Overrides Sub VisitToken(token As SyntaxToken)
Scanner\ScannerTests.vb (7)
17Private Function ScanOnce(str As String, Optional startStatement As Boolean = False) As SyntaxToken 21Private Function ScanOnce(str As String, languageVersion As VisualBasic.LanguageVersion) As SyntaxToken 25Private Function AsString(tokens As IEnumerable(Of SyntaxToken)) As String 34Private Function ScanAllCheckDw(str As String) As IEnumerable(Of SyntaxToken) 56Private Function ScanAllNoDwCheck(str As String) As IEnumerable(Of SyntaxToken) 1269Private Sub CheckCharTkValue(tk As SyntaxToken, expected As Char) 1317Private Sub CheckStrTkValue(tk As SyntaxToken, expected As String)
Syntax\GeneratedTests.vb (2)
24Private Shared Function GenerateRedIdentifierToken() As SyntaxToken 28Private Shared Function GenerateRedIntegerLiteralToken() As SyntaxToken
Syntax\ManualTests.vb (2)
59Dim objUnderTest As SyntaxToken = SyntaxFactory.MissingToken(CType(k, SyntaxKind)) 65Dim objUnderTest As SyntaxToken = SyntaxFactory.MissingToken(CType(k, SyntaxKind))
Syntax\SyntaxAnnotationTests.vb (11)
31Dim oldToken As SyntaxToken = Nothing 63Dim fromToken As SyntaxToken = Nothing 72Dim toToken As SyntaxToken = Nothing 570Private Sub TestAnnotation(annotation As SyntaxAnnotation, root As SyntaxNode, oldToken As SyntaxToken) 646Public Overrides Sub VisitToken(token As SyntaxToken) 680Public Overrides Function VisitToken(token As SyntaxToken) As SyntaxToken 721Public Overrides Function VisitToken(token As SyntaxToken) As SyntaxToken 764Public Overrides Function VisitToken(token As SyntaxToken) As SyntaxToken
Syntax\SyntaxFactsTest.vb (2)
24Assert.False(CType(Nothing, SyntaxToken).IsKeyword()) 1003Dim keywordToken As SyntaxToken = SyntaxFactory.Token(SyntaxKind.InKeyword, text:=Nothing)
Syntax\SyntaxRewriterTests.vb (10)
599Dim newRoot = root.ReplaceToken(privateToken, New SyntaxToken() {publicToken, partialToken}) 617Dim newRoot = root.InsertTokensBefore(publicToken, New SyntaxToken() {staticToken}) 624Dim newRoot2 = root.InsertTokensAfter(publicToken, New SyntaxToken() {staticToken}) 815Private ReadOnly _rewriteToken As Func(Of SyntaxToken, SyntaxToken) 820Optional rewriteToken As Func(Of SyntaxToken, SyntaxToken) = Nothing, 836Public Overrides Function VisitToken(token As SyntaxToken) As SyntaxToken 837Dim visited As SyntaxToken = MyBase.VisitToken(token)
Syntax\SyntaxTokenFactoryTests.vb (1)
106Dim token As SyntaxToken
TestSyntaxNodes.vb (13)
352Private Sub VerifyAllSpans(tree As SyntaxToken) 964Private Sub CheckErrorList(node As SyntaxToken, expectedErrorCodes As Integer(), expectedSpans As TextSpan()) 1124Public Overrides Function VisitToken(token As SyntaxToken) As SyntaxToken 1509Dim cu3 = cu.ReplaceToken(privateToken, New SyntaxToken() {}) 1530Assert.Throws(Of InvalidOperationException)(Function() cu.ReplaceToken(identifierC, New SyntaxToken() {})) 1568Assert.Throws(Of InvalidOperationException)(Function() cu.InsertTokensAfter(identifierC, New SyntaxToken() {})) 1985Dim openParenToken = CType(tree.GetRoot().FindToken(location + "List".Length), SyntaxToken) 1989Dim listToken = CType(openParenToken.GetPreviousToken(), SyntaxToken) 2214Dim tokens As List(Of SyntaxToken) = tree.GetRoot().DescendantTokens().ToList() 2215Dim list As List(Of SyntaxToken) = New List(Of SyntaxToken)() 2216Dim token As SyntaxToken = tree.GetRoot().GetFirstToken()
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (5)
CompilationTestUtils.vb (2)
509Dim token As SyntaxToken = tree.GetRoot().FindToken(bindPoint) 658Public Function FindTokenFromText(tree As SyntaxTree, textToFind As String) As SyntaxToken
ParserTestUtilities.vb (1)
473Public Function GetSyntaxErrorsNoTree(t As SyntaxToken) As IEnumerable(Of Diagnostic)
SemanticModelTestBase.vb (2)
33Dim token As SyntaxToken = tree.GetRoot().FindToken(bindPoint) 74Dim token As SyntaxToken = tree.GetRoot().FindToken(bindPoint)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (631)
CaseCorrection\VisualBasicCaseCorrectionService.Rewriter.vb (18)
55Public Overrides Function VisitToken(token As SyntaxToken) As SyntaxToken 71Private Function VisitIdentifier(token As SyntaxToken, newToken As SyntaxToken) As SyntaxToken 185token As SyntaxToken, 186newToken As SyntaxToken, 189) As SyntaxToken 215Private Shared Function GetCorrectedName(token As SyntaxToken, symbol As ISymbol) As String 225Private Shared Function GetIdentifierWithCorrectedName(correctedName As String, token As SyntaxToken) As SyntaxToken 234token As SyntaxToken) As Boolean 252Private Function VisitKeyword(token As SyntaxToken) As SyntaxToken 265Private Shared Function VisitNumericLiteral(token As SyntaxToken) As SyntaxToken 286Private Shared Function VisitCharacterLiteral(token As SyntaxToken) As SyntaxToken
CaseCorrection\VisualBasicCaseCorrectionService.vb (8)
30replacements As ConcurrentDictionary(Of SyntaxToken, SyntaxToken), 40replacements As ConcurrentDictionary(Of SyntaxToken, SyntaxToken), 42Dim candidates = root.DescendantTokens(span).Where(Function(tk As SyntaxToken) tk.Width > 0 OrElse tk.IsKind(SyntaxKind.EndOfFileToken)) 57Private Shared Sub Rewrite(token As SyntaxToken, rewriter As Rewriter, replacements As ConcurrentDictionary(Of SyntaxToken, SyntaxToken))
Classification\ClassificationHelpers.vb (8)
21Public Function GetClassification(token As SyntaxToken) As String 58Private Function IsControlKeyword(token As SyntaxToken) As Boolean 173Private Function ClassifyPunctuation(token As SyntaxToken) As String 189Public Function GetSyntacticClassificationForIdentifier(identifier As SyntaxToken) As String 242Public Function IsStaticallyDeclared(identifier As SyntaxToken) As Boolean 267Private Function IsStringToken(token As SyntaxToken) As Boolean 276Private Function TryClassifyModifiedIdentifer(node As SyntaxNode, identifier As SyntaxToken, ByRef classification As String) As Boolean 307Private Function ClassifyTypeDeclarationIdentifier(identifier As SyntaxToken) As String
Classification\SyntaxClassification\NameSyntaxClassifier.vb (1)
264Private Shared Function GetNameToken(node As NameSyntax) As SyntaxToken
Classification\SyntaxClassification\VisualBasicSyntaxClassificationService.vb (1)
49Public Overrides Function GetSyntacticClassificationForIdentifier(identifier As SyntaxToken) As String
Classification\Worker.DocumentationCommentClassifier.vb (2)
103Private Sub AddXmlClassification(token As SyntaxToken, classificationType As String) 129Private Sub ClassifyXmlTextToken(token As SyntaxToken)
Classification\Worker.vb (4)
29tokens As IEnumerable(Of SyntaxToken), textSpan As TextSpan, list As SegmentedList(Of ClassifiedSpan), cancellationToken As CancellationToken) 47Private Sub AddClassification(token As SyntaxToken, classificationType As String) 84Friend Sub ClassifyToken(token As SyntaxToken, Optional type As String = Nothing) 104Private Sub ClassifyTrivia(token As SyntaxToken)
Classification\Worker.XmlClassifier.vb (2)
17Private Sub AddTokenClassification(token As SyntaxToken, classificationType As String) 22Private Sub ClassifyToken(token As SyntaxToken)
CodeCleanup\Providers\AbstractTokensCodeCleanupProvider.vb (4)
78Protected Shared Function CreateToken(token As SyntaxToken, kind As SyntaxKind) As SyntaxToken 87Protected Shared Function CreateIdentifierToken(token As SyntaxToken, newValueText As String) As SyntaxToken
CodeCleanup\Providers\AddMissingTokensCodeCleanupProvider.vb (22)
221Private Shared Function TryFixupTrivia(Of T As SyntaxNode)(node As T, previousToken As SyntaxToken, lastToken As SyntaxToken, ByRef newNode As T) As Boolean 419originalNode As T, node As SyntaxNode, tokenGetter As Func(Of T, SyntaxToken), ParamArray kinds As SyntaxKind()) As T 445Private Function ProcessToken(originalToken As SyntaxToken, token As SyntaxToken, parent As SyntaxNode) As SyntaxToken 467Private Shared Function ReplaceOrSetToken(Of T As SyntaxNode)(originalParent As T, tokenToFix As SyntaxToken, replacementToken As SyntaxToken) As T 475Private Shared Function SetOmittedToken(originalParent As SyntaxNode, newToken As SyntaxToken) As SyntaxNode 521Private Shared Function IsOmitted(token As SyntaxToken) As Boolean 525Private Shared Function ProcessOmittedToken(originalToken As SyntaxToken, token As SyntaxToken, parent As SyntaxNode) As SyntaxToken 545Private Shared Function InvalidOmittedToken(previousToken As SyntaxToken, nextToken As SyntaxToken) As Boolean 570Private Shared Function ProcessMissingToken(originalToken As SyntaxToken, token As SyntaxToken) As SyntaxToken 583Private Shared Function CreateMissingToken(token As SyntaxToken) As SyntaxToken 587Private Shared Function CreateOmittedToken(token As SyntaxToken, kind As SyntaxKind) As SyntaxToken
CodeCleanup\Providers\FixIncorrectTokensCodeCleanupProvider.vb (2)
177Private Shared Function RewriteEndIfStatementOrDirectiveSyntax(curNode As SyntaxNode, curEndKeyword As SyntaxToken, curIfKeyword As SyntaxToken) As SyntaxNode
CodeCleanup\Providers\NormalizeModifiersOrOperatorsCodeCleanupProvider.vb (10)
268Public Overrides Function VisitToken(token As SyntaxToken) As SyntaxToken 339[operator] As SyntaxToken, 340checker As Func(Of SyntaxToken, Boolean), 341triviaListGetter As Func(Of SyntaxToken, SyntaxTriviaList), 342tokenKindsGetter As Func(Of SyntaxToken, List(Of SyntaxKind)), 343operatorCreator As Func(Of SyntaxToken, Integer, SyntaxToken)) As SyntaxToken 405Dim result = New List(Of SyntaxToken)(modifiers.Count)
CodeCleanup\Providers\ReduceTokensCodeCleanupProvider.vb (5)
46Dim literal As SyntaxToken = newNode.Token 150Private Shared Function GetFloatLiteralValueString(literal As SyntaxToken, <Out> ByRef value As Double) As String 237Private Shared Function GetValueStringCore(literal As SyntaxToken, isSingle As Boolean, formatSpecifier As String, <Out> ByRef value As Double) As String 293Private Shared Function CreateLiteralToken(token As SyntaxToken, newValueString As String, newValue As Object) As SyntaxToken
CodeCleanup\Providers\RemoveUnnecessaryLineContinuationCodeCleanupProvider.vb (32)
50Private ReadOnly _leading As New Dictionary(Of SyntaxToken, SyntaxTriviaList) 51Private ReadOnly _trailing As New Dictionary(Of SyntaxToken, SyntaxTriviaList) 52Private ReadOnly _tokens As New Dictionary(Of SyntaxToken, SyntaxToken) 79Dim remappedToken As SyntaxToken = Nothing 106Dim token1 As SyntaxToken = Nothing 118Private Sub ProcessExplicitLineContinuation(token1 As SyntaxToken, token2 As SyntaxToken) 158Private Sub ProcessAroundColon(token1 As SyntaxToken, token2 As SyntaxToken) 233Private Shared Function RemoveTrailingColonTrivia(token1 As SyntaxToken, trailing As IEnumerable(Of SyntaxTrivia)) As IEnumerable(Of SyntaxTrivia) 245Private Function OnSimpleLine(token1 As SyntaxToken, token2 As SyntaxToken) As Boolean 250Private Function LineDelta(token1 As SyntaxToken, token2 As SyntaxToken) As Integer 255Private Shared Function IsLabelToken(token As SyntaxToken) As Boolean 259Private Shared Function PartOfSinglelineConstruct(token As SyntaxToken) As Boolean 285Private Sub RemoveColonAfterLabel(token1 As SyntaxToken, token2 As SyntaxToken) 319Private Sub ReplaceLineContinuationToEndOfLine(token1 As SyntaxToken, token2 As SyntaxToken) 341Private Function GetLeadingTrivia(token As SyntaxToken) As SyntaxTriviaList 345Private Function GetTrailingTrivia(token As SyntaxToken) As SyntaxTriviaList 349Private Function GetTriviaList(token As SyntaxToken, 350map As Dictionary(Of SyntaxToken, SyntaxTriviaList), 360Private Sub ReplaceTrailingTrivia(token As SyntaxToken, trivia As SyntaxTriviaList) 364Private Sub ReplaceLeadingTrivia(token As SyntaxToken, trivia As SyntaxTriviaList) 368Private Sub ReplaceTrivia(token As SyntaxToken, 369map As Dictionary(Of SyntaxToken, SyntaxTriviaList), 374Private Function GetToken(token As SyntaxToken) As SyntaxToken 375Dim value As SyntaxToken = Nothing
CodeCleanup\VisualBasicCodeCleanerService.vb (1)
60Private Shared Sub ProcessToken(token As SyntaxToken, result As ArrayBuilder(Of TextSpan))
CodeGeneration\VisualBasicSyntaxGenerator.vb (9)
40Friend Overrides Function CreateInterpolatedStringStartToken(isVerbatim As Boolean) As SyntaxToken 44Friend Overrides Function CreateInterpolatedStringEndToken() As SyntaxToken 48Friend Overrides Function SeparatedList(Of TElement As SyntaxNode)(nodes As IEnumerable(Of TElement), separators As IEnumerable(Of SyntaxToken)) As SeparatedSyntaxList(Of TElement) 162Friend Overrides Function NumericLiteralToken(text As String, value As ULong) As SyntaxToken 190Friend Overrides Function GenericName(identifier As SyntaxToken, typeArguments As IEnumerable(Of SyntaxNode)) As SyntaxNode 342Friend Overrides Function ObjectCreationExpression(typeName As SyntaxNode, openParen As SyntaxToken, arguments As SeparatedSyntaxList(Of SyntaxNode), closeParen As SyntaxToken) As SyntaxNode 2560Dim variance As SyntaxToken = Nothing 3674Friend Overrides Function IdentifierName(identifier As SyntaxToken) As SyntaxNode
FindSymbols\VisualBasicDeclaredSymbolInfoFactoryService.vb (1)
372Protected Overrides Function GetIdentifier(node As IdentifierNameSyntax) As SyntaxToken
Formatting\DefaultOperationProvider.vb (8)
54ByRef previousToken As SyntaxToken, 55ByRef currentToken As SyntaxToken, 122currentToken As SyntaxToken) As AdjustNewLinesOperation 177Private Shared Function ContainEndOfLine(previousToken As SyntaxToken, nextToken As SyntaxToken) As Boolean 181Private Shared Function IsFirstXmlTag(currentToken As SyntaxToken) As Boolean 209Public Overrides Function GetAdjustSpacesOperationSlow(ByRef previousToken As SyntaxToken, ByRef currentToken As SyntaxToken, ByRef nextOperation As NextGetAdjustSpacesOperation) As AdjustSpacesOperation
Formatting\Engine\AggregatedFormattingResult.vb (2)
19Protected Overrides Function Rewriter(changeMap As Dictionary(Of ValueTuple(Of SyntaxToken, SyntaxToken), TriviaData), cancellationToken As CancellationToken) As SyntaxNode
Formatting\Engine\FormattingResult.vb (2)
25Protected Overrides Function Rewriter(changeMap As Dictionary(Of ValueTuple(Of SyntaxToken, SyntaxToken), TriviaData), cancellationToken As CancellationToken) As SyntaxNode
Formatting\Engine\Trivia\TriviaDataFactory.Analyzer.vb (4)
8Public Shared Function Leading(token As SyntaxToken) As AnalysisResult 15Public Shared Function Trailing(token As SyntaxToken) As AnalysisResult 22Public Shared Function Between(token1 As SyntaxToken, token2 As SyntaxToken) As AnalysisResult
Formatting\Engine\Trivia\TriviaDataFactory.ComplexTrivia.vb (4)
20Public Sub New(options As LineFormattingOptions, treeInfo As TreeData, token1 As SyntaxToken, token2 As SyntaxToken) 60Dim commonToken1 As SyntaxToken = Me.Token1 61Dim commonToken2 As SyntaxToken = Me.Token2
Formatting\Engine\Trivia\TriviaDataFactory.FormattedComplexTrivia.vb (2)
19token1 As SyntaxToken, 20token2 As SyntaxToken,
Formatting\Engine\Trivia\TriviaDataFactory.ModifiedComplexTrivia.vb (2)
72Dim commonToken1 As SyntaxToken = Me._original.Token1 73Dim commonToken2 As SyntaxToken = Me._original.Token2
Formatting\Engine\Trivia\TriviaDataFactory.TriviaRewriter.vb (17)
17Private ReadOnly _lastToken As SyntaxToken 20Private ReadOnly _trailingTriviaMap As Dictionary(Of SyntaxToken, SyntaxTriviaList) 21Private ReadOnly _leadingTriviaMap As Dictionary(Of SyntaxToken, SyntaxTriviaList) 23Public Sub New(node As SyntaxNode, spanToFormat As TextSpanMutableIntervalTree, map As Dictionary(Of ValueTuple(Of SyntaxToken, SyntaxToken), TriviaData), cancellationToken As CancellationToken) 32_trailingTriviaMap = New Dictionary(Of SyntaxToken, SyntaxTriviaList)() 33_leadingTriviaMap = New Dictionary(Of SyntaxToken, SyntaxTriviaList)() 42Private Sub PreprocessTriviaListMap(map As Dictionary(Of ValueTuple(Of SyntaxToken, SyntaxToken), TriviaData)) 58Private Function GetTrailingAndLeadingTrivia(pair As KeyValuePair(Of ValueTuple(Of SyntaxToken, SyntaxToken), TriviaData)) As (SyntaxTriviaList, SyntaxTriviaList) 84Private Function GetTextSpan(pair As ValueTuple(Of SyntaxToken, SyntaxToken)) As TextSpan 129Public Overrides Function VisitToken(token As SyntaxToken) As SyntaxToken 165Private Shared Function CreateNewToken(leadingTrivia As SyntaxTriviaList, token As SyntaxToken, trailingTrivia As SyntaxTriviaList) As SyntaxToken
Formatting\Engine\Trivia\TriviaDataFactory.vb (10)
27Public Overrides Function CreateLeadingTrivia(token As SyntaxToken) As TriviaData 44Public Overrides Function CreateTrailingTrivia(token As SyntaxToken) As TriviaData 61Public Overrides Function Create(token1 As SyntaxToken, token2 As SyntaxToken) As TriviaData 88Private Function GetLineContinuationTriviaInfo(token1 As SyntaxToken, token2 As SyntaxToken, result As Analyzer.AnalysisResult) As TriviaData 146Private Function GetWhitespaceOnlyTriviaInfo(token1 As SyntaxToken, token2 As SyntaxToken, result As Analyzer.AnalysisResult) As TriviaData 173Private Function CalculateSpaces(token1 As SyntaxToken, token2 As SyntaxToken) As Integer
Formatting\Engine\Trivia\VisualBasicTriviaFormatter.vb (2)
23token1 As SyntaxToken, 24token2 As SyntaxToken,
Formatting\Engine\VisualBasicFormatEngine.vb (2)
18startToken As SyntaxToken, 19endToken As SyntaxToken)
Formatting\Engine\VisualBasicStructuredTriviaFormatEngine.vb (2)
29token1 As SyntaxToken, 30token2 As SyntaxToken)
Formatting\FormattingHelpers.vb (18)
10Public Function IsLessThanInAttribute(token As SyntaxToken) As Boolean 21Public Function IsGreaterThanInAttribute(token As SyntaxToken) As Boolean 32Public Function IsQuoteInXmlString(token As SyntaxToken) As Boolean 48Public Function IsContentInXmlString(token As SyntaxToken) As Boolean 62Public Function IsXmlToken(token As SyntaxToken) As Boolean 236Public Function IsGreaterThanInXmlTag(tag As SyntaxNode, token As SyntaxToken) As Boolean 250Public Function IsQuestionInNullableType(currentToken As SyntaxToken) As Boolean 259Public Function IsColonAfterAttributeTarget(previousToken As SyntaxToken, currentToken As SyntaxToken) As Boolean 267Public Function IsExclamationInDictionaryAccess(token As SyntaxToken) As Boolean 291Public Function IsParenInArgumentList(token As SyntaxToken) As Boolean 300Public Function IsParenInBinaryCondition(token As SyntaxToken) As Boolean 309Public Function IsParenInTernaryCondition(token As SyntaxToken) As Boolean 318Public Function IsXmlTokenInXmlDeclaration(token As SyntaxToken) As Boolean 327Public Function IsMemberAccessDotWithoutExpression(token As SyntaxToken) As Boolean 345Public Function IsDictionaryAccessExclamationWithoutExpression(token As SyntaxToken) As Boolean 358Public Function IsNamedFieldInitializerDot(token As SyntaxToken) As Boolean 367Friend Function IsOverloadableOperator(token As SyntaxToken) As Boolean
Formatting\Rules\AdjustSpaceFormattingRule.vb (3)
16Public Overrides Function GetAdjustSpacesOperationSlow(ByRef previousToken As SyntaxToken, ByRef currentToken As SyntaxToken, ByRef nextFunc As NextGetAdjustSpacesOperation) As AdjustSpacesOperation 362Private Shared Function PrecedingTriviaContainsLineBreak(previousToken As SyntaxToken) As Boolean
Formatting\Rules\AlignTokensFormattingRule.vb (1)
21Dim tokens = New List(Of SyntaxToken)()
Formatting\Rules\BaseFormattingRule.vb (27)
15Protected Shared Sub AddIndentBlockOperation(operations As List(Of IndentBlockOperation), startToken As SyntaxToken, endToken As SyntaxToken, Optional [option] As IndentBlockOption = IndentBlockOption.RelativePosition) 25baseToken As SyntaxToken, 26startToken As SyntaxToken, 27endToken As SyntaxToken, 34Protected Shared Sub SetAlignmentBlockOperation(operations As List(Of IndentBlockOperation), baseToken As SyntaxToken, startToken As SyntaxToken, endToken As SyntaxToken, Optional [option] As IndentBlockOption = IndentBlockOption.RelativePosition) 38Protected Shared Sub SetAlignmentBlockOperation(operations As List(Of IndentBlockOperation), baseToken As SyntaxToken, startToken As SyntaxToken, endToken As SyntaxToken, span As TextSpan, Optional [option] As IndentBlockOption = IndentBlockOption.RelativePosition) 42Protected Shared Sub AddAbsolutePositionIndentBlockOperation(operations As List(Of IndentBlockOperation), startToken As SyntaxToken, endToken As SyntaxToken, indentation As Integer, Optional [option] As IndentBlockOption = IndentBlockOption.AbsolutePosition) 46Protected Shared Sub AddAbsolutePositionIndentBlockOperation(operations As List(Of IndentBlockOperation), startToken As SyntaxToken, endToken As SyntaxToken, indentation As Integer, span As TextSpan, Optional [option] As IndentBlockOption = IndentBlockOption.AbsolutePosition) 50Private Shared Function GetAlignmentSpan(startToken As SyntaxToken, endToken As SyntaxToken) As TextSpan 55Private Shared Function GetIndentBlockSpan(startToken As SyntaxToken, endToken As SyntaxToken) As TextSpan 72Protected Shared Sub AddSuppressWrappingIfOnSingleLineOperation(operations As List(Of SuppressOperation), startToken As SyntaxToken, endToken As SyntaxToken) 77Protected Shared Sub AddSuppressAllOperationIfOnMultipleLine(operations As List(Of SuppressOperation), startToken As SyntaxToken, endToken As SyntaxToken) 83Protected Shared Sub AddAnchorIndentationOperation(operations As List(Of AnchorIndentationOperation), startToken As SyntaxToken, endToken As SyntaxToken) 91Protected Shared Sub AddAlignIndentationOfTokensToBaseTokenOperation(operations As List(Of AlignTokensOperation), containingNode As SyntaxNode, baseToken As SyntaxToken, tokens As IEnumerable(Of SyntaxToken))
Formatting\Rules\ElasticTriviaFormattingRule.vb (12)
88Public Overrides Function GetAdjustSpacesOperationSlow(ByRef previousToken As SyntaxToken, ByRef currentToken As SyntaxToken, ByRef nextOperation As NextGetAdjustSpacesOperation) As AdjustSpacesOperation 125ByRef previousToken As SyntaxToken, 126ByRef currentToken As SyntaxToken, 230Private Shared Function AfterLastImportStatement(token As SyntaxToken, nextToken As SyntaxToken) As Boolean 249Private Shared Function AfterLastInheritsOrImplements(token As SyntaxToken, nextToken As SyntaxToken) As Boolean 266Private Shared Function LineBreaksAfter(previousToken As SyntaxToken, currentToken As SyntaxToken) As Integer? 335Private Shared Function GetActualLines(token1 As SyntaxToken, token2 As SyntaxToken, lines As Integer, Optional leadingBlankLines As Integer = 0) As Integer
Formatting\Rules\NodeBasedFormattingRule.vb (13)
199Private Shared Function GetOuterBlockWithDifferentStartTokenUsingXmlElement(firstTokenOfInnerBlock As SyntaxToken) As SyntaxNode 226baseToken As SyntaxToken, 227startToken As SyntaxToken, 228endToken As SyntaxToken) 239baseToken As SyntaxToken, 240alignmentStartToken As SyntaxToken, 241alignmentEndToken As SyntaxToken, 242indentationStartToken As SyntaxToken, 243indentationEndToken As SyntaxToken) 296Private Shared Function IsFirstXmlElementTokenOnLine(xmlToken As SyntaxToken) As Boolean 310Private Shared Function GetFirstAndLastMembers(node As SyntaxNode) As ValueTuple(Of SyntaxToken, SyntaxToken) 485Private Shared Function GetEndTokenForForBlock(node As ForOrForEachBlockSyntax) As SyntaxToken
Formatting\Rules\StructuredTriviaFormattingRule.vb (6)
16Public Overrides Function GetAdjustNewLinesOperationSlow(ByRef previousToken As SyntaxToken, ByRef currentToken As SyntaxToken, ByRef nextOperation As NextGetAdjustNewLinesOperation) As AdjustNewLinesOperation 24Public Overrides Function GetAdjustSpacesOperationSlow(ByRef previousToken As SyntaxToken, ByRef currentToken As SyntaxToken, ByRef nextOperation As NextGetAdjustSpacesOperation) As AdjustSpacesOperation 34Private Shared Function UnderStructuredTrivia(previousToken As SyntaxToken, currentToken As SyntaxToken) As Boolean
Formatting\VisualBasicSyntaxFormatting.vb (2)
46Protected Overrides Function Format(root As SyntaxNode, options As SyntaxFormattingOptions, formattingRules As ImmutableArray(Of AbstractFormattingRule), startToken As SyntaxToken, endToken As SyntaxToken, cancellationToken As CancellationToken) As AbstractFormattingResult
ObsoleteSymbol\VisualBasicObsoleteSymbolService.vb (1)
25Protected Overrides Sub ProcessDimKeyword(ByRef result As ArrayBuilder(Of TextSpan), semanticModel As SemanticModel, token As SyntaxToken, cancellationToken As CancellationToken)
ReassignedVariable\VisualBasicReassignedVariableService.vb (2)
24Protected Overrides Function GetIdentifierOfVariable(variable As ModifiedIdentifierSyntax) As SyntaxToken 28Protected Overrides Function GetIdentifierOfSingleVariableDesignation(variable As ModifiedIdentifierSyntax) As SyntaxToken
Recommendations\VisualBasicRecommendationServiceRunner.vb (2)
430Private Shared Function IsInheritsStatementContext(token As SyntaxToken) As Boolean 439Private Shared Function IsImplementsStatementContext(token As SyntaxToken) As Boolean
Rename\LabelConflictVisitor.vb (2)
14Public Sub New(tokenBeingRenamed As SyntaxToken) 36Public ReadOnly Property ConflictingTokens As IEnumerable(Of SyntaxToken)
Rename\LocalConflictVisitor.vb (10)
17Public Sub New(tokenBeingRenamed As SyntaxToken, newSolution As Solution, cancellationToken As CancellationToken) 30Dim tokens As New List(Of SyntaxToken) 59Dim tokens As New List(Of SyntaxToken) 81Dim tokens As New List(Of SyntaxToken) 103Dim tokens As New List(Of SyntaxToken) 116Dim tokens As New List(Of SyntaxToken) 137Dim tokens As New List(Of SyntaxToken) 175Dim tokens As New List(Of SyntaxToken) 190Dim tokens As New List(Of SyntaxToken) 215Public ReadOnly Property ConflictingTokens As IEnumerable(Of SyntaxToken)
Rename\VisualBasicRenameRewriterLanguageService.vb (25)
57Private ReadOnly _annotatedIdentifierTokens As New HashSet(Of SyntaxToken) 276Private Function UpdateAliasAnnotation(newToken As SyntaxToken) As SyntaxToken 284Private Async Function RenameAndAnnotateAsync(token As SyntaxToken, newToken As SyntaxToken, isRenameLocation As Boolean, isOldText As Boolean) As Task(Of SyntaxToken) 390Private Function IsInRenameLocation(token As SyntaxToken) As Boolean 414Public Overrides Function VisitToken(oldToken As SyntaxToken) As SyntaxToken 458Dim identifierToken As SyntaxToken = Nothing 522Private Function RenameToken(oldToken As SyntaxToken, newToken As SyntaxToken, prefix As String, suffix As String) As SyntaxToken 590Private Function RenameInStringLiteral(oldToken As SyntaxToken, newToken As SyntaxToken, subSpansToReplace As ImmutableSortedSet(Of TextSpan), createNewStringLiteral As Func(Of SyntaxTriviaList, String, String, SyntaxTriviaList, SyntaxToken)) As SyntaxToken 616Private Function RenameInTrivia(token As SyntaxToken, leadingOrTrailingTriviaList As IEnumerable(Of SyntaxTrivia)) As SyntaxToken 626Private Function RenameWithinToken(oldToken As SyntaxToken, newToken As SyntaxToken) As SyntaxToken 675token As SyntaxToken, 837Public Overrides Function GetExpansionTargetForLocation(token As SyntaxToken) As SyntaxNode 841Private Shared Function GetExpansionTarget(token As SyntaxToken) As SyntaxNode
Simplification\Reducers\AbstractVisualBasicReducer.AbstractReductionRewriter.vb (5)
113token As SyntaxToken, 114newToken As SyntaxToken, 115simplifyFunc As Func(Of SyntaxToken, SemanticModel, VisualBasicSimplifierOptions, CancellationToken, SyntaxToken) 116) As SyntaxToken
Simplification\Reducers\VisualBasicEscapingReducer.Rewriter.vb (2)
17Public Overrides Function VisitToken(token As SyntaxToken) As SyntaxToken
Simplification\Reducers\VisualBasicEscapingReducer.vb (6)
28Private Shared Function TryUnescapeToken(identifier As SyntaxToken, semanticModel As SemanticModel, options As VisualBasicSimplifierOptions, cancellationToken As CancellationToken) As SyntaxToken 121Dim lastTokenOfQuery As SyntaxToken = Nothing 122Dim firstTokenAfterQueryExpression As SyntaxToken = Nothing 211Private Shared Function CreateNewIdentifierTokenFromToken(originalToken As SyntaxToken, escape As Boolean) As SyntaxToken
Simplification\Simplifiers\NameSimplifier.vb (1)
353identifierToken As SyntaxToken,
Simplification\VisualBasicSimplificationService.NodesAndTokensToReduceComputer.vb (2)
83Public Overrides Function VisitToken(token As SyntaxToken) As SyntaxToken
Simplification\VisualBasicSimplificationService.vb (2)
70Public Overrides Function Expand(token As SyntaxToken, semanticModel As SemanticModel, expandInsideNode As Func(Of SyntaxNode, Boolean), cancellationToken As CancellationToken) As SyntaxToken
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\EmbeddedLanguages\VirtualChars\VisualBasicVirtualCharService.vb (2)
30Protected Overrides Function IsMultiLineRawStringToken(token As SyntaxToken) As Boolean 34Protected Overrides Function TryConvertToVirtualCharsWorker(token As SyntaxToken) As VirtualCharSequence
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\ParenthesizedExpressionSyntaxExtensions.vb (3)
13Private Function EndsQuery(token As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean 28Private Function EndsVariableDeclarator(token As SyntaxToken) As Boolean 34Private Function EndsLambda(token As SyntaxToken) As Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SemanticModelExtensions.vb (3)
16name As SyntaxToken, 30Public Function LookupName(semanticModel As SemanticModel, name As SyntaxToken, 72Public Function GetSymbolInfo(semanticModel As SemanticModel, token As SyntaxToken) As SymbolInfo
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SingleLineRewriter.vb (2)
20Public Overrides Function VisitToken(token As SyntaxToken) As SyntaxToken
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\StatementSyntaxExtensions.vb (2)
304Public Function GetNameToken(member As StatementSyntax) As SyntaxToken 354Public Function GetMemberKeywordToken(member As DeclarationStatementSyntax) As SyntaxToken
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxNodeExtensions.vb (9)
379token As SyntaxToken, 754Public Function GetBraces(node As SyntaxNode) As (openBrace As SyntaxToken, closeBrace As SyntaxToken) 759Function(n As SyntaxNode) CType(Nothing, (SyntaxToken, SyntaxToken))) 763Public Function GetParentheses(node As SyntaxNode) As ValueTuple(Of SyntaxToken, SyntaxToken) 782Function(n As SyntaxNode) CType(Nothing, (SyntaxToken, SyntaxToken)))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTokenExtensions.vb (26)
13Public Function IsKind(token As SyntaxToken, kind1 As SyntaxKind, kind2 As SyntaxKind) As Boolean 19Public Function IsKind(token As SyntaxToken, ParamArray kinds As SyntaxKind()) As Boolean 24Public Function IsKindOrHasMatchingText(token As SyntaxToken, kind As SyntaxKind) As Boolean 30Public Function HasMatchingText(token As SyntaxToken, kind As SyntaxKind) As Boolean 35Public Function IsCharacterLiteral(token As SyntaxToken) As Boolean 40Public Function IsNumericLiteral(token As SyntaxToken) As Boolean 49Public Function IsNewOnRightSideOfDotOrBang(token As SyntaxToken) As Boolean 57Public Function IsSkipped(token As SyntaxToken) As Boolean 62Public Function FirstAncestorOrSelf(token As SyntaxToken, predicate As Func(Of SyntaxNode, Boolean)) As SyntaxNode 67Public Function HasAncestor(Of T As SyntaxNode)(token As SyntaxToken) As Boolean 78Public Function IsChildToken(Of TParent As SyntaxNode)(token As SyntaxToken, childGetter As Func(Of TParent, SyntaxToken)) As Boolean 97Public Function IsChildSeparatorToken(Of TParent As SyntaxNode, TChild As SyntaxNode)(token As SyntaxToken, childGetter As Func(Of TParent, SeparatedSyntaxList(Of TChild))) As Boolean 115Public Function IsDescendantOf(token As SyntaxToken, node As SyntaxNode) As Boolean 121Friend Function GetInnermostDeclarationContext(node As SyntaxToken) As SyntaxNode 179Public Function GetContainingMember(token As SyntaxToken) As DeclarationStatementSyntax 188Public Function GetContainingMemberBlockBegin(token As SyntaxToken) As StatementSyntax 196Public Function IsFirstTokenOnLine(token As SyntaxToken) As Boolean 209Public Function SpansPreprocessorDirective(tokens As IEnumerable(Of SyntaxToken)) As Boolean 214Public Function GetPreviousTokenIfTouchingWord(token As SyntaxToken, position As Integer) As SyntaxToken 221Public Function IsWord(token As SyntaxToken) As Boolean 226Public Function IntersectsWith(token As SyntaxToken, position As Integer) As Boolean 231Public Function GetNextNonZeroWidthTokenOrEndOfFile(token As SyntaxToken) As SyntaxToken 237Public Function IsValidAttributeTarget(token As SyntaxToken) As Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTreeExtensions.vb (5)
16Public Function IsLastTokenOfStatementWithEndOfLine(token As SyntaxToken) As Boolean 48token As SyntaxToken, 224Private Function AtEndOfIncompleteStringOrCharLiteral(token As SyntaxToken, position As Integer, lastChar As String) As Boolean 271Private Function IsGlobalStatementContext(token As SyntaxToken, position As Integer) As Boolean 301Dim token As SyntaxToken = syntaxTree.FindTokenOnLeftOfPosition(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Indentation\VisualBasicSmartTokenFormatter.vb (1)
34Public Function FormatToken(token As SyntaxToken, cancellationToken As CancellationToken) As IList(Of TextChange) Implements ISmartTokenFormatter.FormatToken
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SelectedMembers\VisualBasicSelectedMembers.vb (1)
27Protected Overrides Function GetDeclaratorsAndIdentifiers(member As StatementSyntax) As ImmutableArray(Of (declarator As SyntaxNode, identifier As SyntaxToken))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SemanticFacts\VisualBasicSemanticFacts.vb (3)
64Public Function GetDeclaredSymbol(semanticModel As SemanticModel, token As SyntaxToken, cancellationToken As CancellationToken) As ISymbol Implements ISemanticFacts.GetDeclaredSymbol 260Public Function GetBestOrAllSymbols(semanticModel As SemanticModel, node As SyntaxNode, token As SyntaxToken, cancellationToken As CancellationToken) As ImmutableArray(Of ISymbol) Implements ISemanticFacts.GetBestOrAllSymbols 307Private Shared Function CreatePreprocessingSymbol(model As SemanticModel, token As SyntaxToken) As IPreprocessingSymbol
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicDocumentationCommentService.vb (1)
28Protected Overrides Function GetIdentifier(xmlName As XmlNameAttributeSyntax) As SyntaxToken
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Services\SyntaxFacts\VisualBasicSyntaxFacts.vb (59)
98Public Function ParseToken(text As String) As SyntaxToken Implements ISyntaxFacts.ParseToken 113Public Function IsVerbatimIdentifier(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsVerbatimIdentifier 117Public Function IsOperator(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsOperator 122Public Function IsContextualKeyword(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsContextualKeyword 126Public Function IsReservedKeyword(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsReservedKeyword 130Public Function IsPreprocessorKeyword(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsPreprocessorKeyword 254Public Function IsThisConstructorInitializer(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsThisConstructorInitializer 263Public Function IsBaseConstructorInitializer(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsBaseConstructorInitializer 272Public Function IsQueryKeyword(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsQueryKeyword 303Public Function IsPredefinedType(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsPredefinedType 308Public Function IsPredefinedType(token As SyntaxToken, type As PredefinedType) As Boolean Implements ISyntaxFacts.IsPredefinedType 323Public Function TryGetPredefinedType(token As SyntaxToken, ByRef type As PredefinedType) As Boolean Implements ISyntaxFacts.TryGetPredefinedType 328Private Shared Function GetPredefinedType(token As SyntaxToken) As PredefinedType 367Public Function IsPredefinedOperator(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsPredefinedOperator 372Public Function IsPredefinedOperator(token As SyntaxToken, op As PredefinedOperator) As Boolean Implements ISyntaxFacts.IsPredefinedOperator 377Public Function TryGetPredefinedOperator(token As SyntaxToken, ByRef op As PredefinedOperator) As Boolean Implements ISyntaxFacts.TryGetPredefinedOperator 382Private Shared Function GetPredefinedOperator(token As SyntaxToken) As PredefinedOperator 491Public Function IsLiteral(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsLiteral 512Public Function IsStringLiteralOrInterpolatedStringLiteral(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsStringLiteralOrInterpolatedStringLiteral 516Public Function IsBindableToken(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsBindableToken 1082Public Function TryGetBindableParent(token As SyntaxToken) As SyntaxNode Implements ISyntaxFacts.TryGetBindableParent 1244Public Function IsNumericLiteral(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsNumericLiteral 1250Public Function IsVerbatimStringLiteral(token As SyntaxToken) As Boolean Implements ISyntaxFacts.IsVerbatimStringLiteral 1405Public Sub GetPartsOfAssignmentStatement(statement As SyntaxNode, ByRef left As SyntaxNode, ByRef operatorToken As SyntaxToken, ByRef right As SyntaxNode) Implements ISyntaxFacts.GetPartsOfAssignmentStatement 1410Public Sub GetPartsOfAssignmentExpressionOrStatement(statement As SyntaxNode, ByRef left As SyntaxNode, ByRef operatorToken As SyntaxToken, ByRef right As SyntaxNode) Implements ISyntaxFacts.GetPartsOfAssignmentExpressionOrStatement 1417Public Function GetIdentifierOfSimpleName(node As SyntaxNode) As SyntaxToken Implements ISyntaxFacts.GetIdentifierOfSimpleName 1421Public Function GetIdentifierOfVariableDeclarator(node As SyntaxNode) As SyntaxToken Implements ISyntaxFacts.GetIdentifierOfVariableDeclarator 1425Public Function GetIdentifierOfTypeDeclaration(node As SyntaxNode) As SyntaxToken Implements ISyntaxFacts.GetIdentifierOfTypeDeclaration 1447Public Function AreEquivalent(token1 As SyntaxToken, token2 As SyntaxToken) As Boolean Implements ISyntaxFacts.AreEquivalent 1463Public Sub GetPartsOfTupleExpression(Of TArgumentSyntax As SyntaxNode)(node As SyntaxNode, ByRef openParen As SyntaxToken, ByRef arguments As SeparatedSyntaxList(Of TArgumentSyntax), ByRef closeParen As SyntaxToken) Implements ISyntaxFacts.GetPartsOfTupleExpression 1490Public Function ContainsInterleavedDirective(span As TextSpan, token As SyntaxToken, cancellationToken As CancellationToken) As Boolean Implements ISyntaxFacts.ContainsInterleavedDirective 1549Public Function GetDeclarationIdentifierIfOverride(token As SyntaxToken) As SyntaxToken? Implements ISyntaxFacts.GetDeclarationIdentifierIfOverride 1612ByRef globalKeyword As SyntaxToken, 1613ByRef [alias] As SyntaxToken, 1714Public Sub GetPartsOfIsPatternExpression(node As SyntaxNode, ByRef left As SyntaxNode, ByRef isToken As SyntaxToken, ByRef right As SyntaxNode) Implements ISyntaxFacts.GetPartsOfIsPatternExpression 1722Public Sub GetPartsOfParenthesizedPattern(node As SyntaxNode, ByRef openParen As SyntaxToken, ByRef pattern As SyntaxNode, ByRef closeParen As SyntaxToken) Implements ISyntaxFacts.GetPartsOfParenthesizedPattern 1726Public Sub GetPartsOfBinaryPattern(node As SyntaxNode, ByRef left As SyntaxNode, ByRef operatorToken As SyntaxToken, ByRef right As SyntaxNode) Implements ISyntaxFacts.GetPartsOfBinaryPattern 1730Public Sub GetPartsOfUnaryPattern(node As SyntaxNode, ByRef operatorToken As SyntaxToken, ByRef pattern As SyntaxNode) Implements ISyntaxFacts.GetPartsOfUnaryPattern 1734Public Sub GetPartsOfRelationalPattern(node As SyntaxNode, ByRef operatorToken As SyntaxToken, ByRef expression As SyntaxNode) Implements ISyntaxFacts.GetPartsOfRelationalPattern 1820Public Sub GetPartsOfArgumentList(node As SyntaxNode, ByRef openParenToken As SyntaxToken, ByRef arguments As SeparatedSyntaxList(Of SyntaxNode), ByRef closeParenToken As SyntaxToken) Implements ISyntaxFacts.GetPartsOfArgumentList 1839Public Sub GetPartsOfBinaryExpression(node As SyntaxNode, ByRef left As SyntaxNode, ByRef operatorToken As SyntaxToken, ByRef right As SyntaxNode) Implements ISyntaxFacts.GetPartsOfBinaryExpression 1853Public Sub GetPartsOfConditionalAccessExpression(node As SyntaxNode, ByRef expression As SyntaxNode, ByRef operatorToken As SyntaxToken, ByRef whenNotNull As SyntaxNode) Implements ISyntaxFacts.GetPartsOfConditionalAccessExpression 1871Public Sub GetPartsOfInterpolationExpression(node As SyntaxNode, ByRef stringStartToken As SyntaxToken, ByRef contents As SyntaxList(Of SyntaxNode), ByRef stringEndToken As SyntaxToken) Implements ISyntaxFacts.GetPartsOfInterpolationExpression 1884Public Sub GetPartsOfGenericName(node As SyntaxNode, ByRef identifier As SyntaxToken, ByRef typeArguments As SeparatedSyntaxList(Of SyntaxNode)) Implements ISyntaxFacts.GetPartsOfGenericName 1890Public Sub GetPartsOfMemberAccessExpression(node As SyntaxNode, ByRef expression As SyntaxNode, ByRef operatorToken As SyntaxToken, ByRef name As SyntaxNode) Implements ISyntaxFacts.GetPartsOfMemberAccessExpression 1910Public Sub GetPartsOfObjectCreationExpression(node As SyntaxNode, ByRef keyword As SyntaxToken, ByRef type As SyntaxNode, ByRef argumentList As SyntaxNode, ByRef initializer As SyntaxNode) Implements ISyntaxFacts.GetPartsOfObjectCreationExpression 1918Public Sub GetPartsOfImplicitObjectCreationExpression(node As SyntaxNode, ByRef keyword As SyntaxToken, ByRef argumentList As SyntaxNode, ByRef initializer As SyntaxNode) Implements ISyntaxFacts.GetPartsOfImplicitObjectCreationExpression 1922Public Sub GetPartsOfParameter(node As SyntaxNode, ByRef identifier As SyntaxToken, ByRef [default] As SyntaxNode) Implements ISyntaxFacts.GetPartsOfParameter 1928Public Sub GetPartsOfParenthesizedExpression(node As SyntaxNode, ByRef openParen As SyntaxToken, ByRef expression As SyntaxNode, ByRef closeParen As SyntaxToken) Implements ISyntaxFacts.GetPartsOfParenthesizedExpression 1935Public Sub GetPartsOfPrefixUnaryExpression(node As SyntaxNode, ByRef operatorToken As SyntaxToken, ByRef operand As SyntaxNode) Implements ISyntaxFacts.GetPartsOfPrefixUnaryExpression 1941Public Sub GetPartsOfQualifiedName(node As SyntaxNode, ByRef left As SyntaxNode, ByRef dotToken As SyntaxToken, ByRef right As SyntaxNode) Implements ISyntaxFacts.GetPartsOfQualifiedName 1990Public Function GetTokenOfLiteralExpression(node As SyntaxNode) As SyntaxToken Implements ISyntaxFacts.GetTokenOfLiteralExpression
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\ImportsClauseComparer.vb (2)
14Private ReadOnly _tokenComparer As IComparer(Of SyntaxToken) 21Public Sub New(tokenComparer As IComparer(Of SyntaxToken))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\ImportsStatementComparer.vb (1)
16Public Sub New(tokenComparer As IComparer(Of SyntaxToken))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\NameSyntaxComparer.vb (3)
10Private ReadOnly _tokenComparer As IComparer(Of SyntaxToken) 13Friend Sub New(tokenComparer As IComparer(Of SyntaxToken)) 21Public Shared Function Create(tokenComparer As IComparer(Of SyntaxToken)) As IComparer(Of NameSyntax)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\TokenComparer.vb (6)
9Implements IComparer(Of SyntaxToken) 22Public Function Compare(token1 As SyntaxToken, 23token2 As SyntaxToken) As Integer Implements IComparer(Of SyntaxToken).Compare 45Private Shared Function CompareWorker(x As SyntaxToken, y As SyntaxToken) As Integer
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Utilities\TypeSyntaxComparer.vb (3)
10Private ReadOnly _tokenComparer As IComparer(Of SyntaxToken) 13Friend Sub New(tokenComparer As IComparer(Of SyntaxToken)) 21Public Shared Function Create(tokenComparer As IComparer(Of SyntaxToken)) As IComparer(Of TypeSyntax)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\AttributeGenerator.vb (3)
15Public Function GenerateAttributeBlocks(attributes As ImmutableArray(Of AttributeData), options As CodeGenerationContextInfo, Optional target As SyntaxToken? = Nothing) As SyntaxList(Of AttributeListSyntax) 25Private Function GenerateAttributeBlock(attribute As AttributeData, options As CodeGenerationContextInfo, target As SyntaxToken?) As AttributeListSyntax 30Private Function GenerateAttribute(attribute As AttributeData, options As CodeGenerationContextInfo, target As SyntaxToken?) As AttributeSyntax
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ConstructorGenerator.vb (2)
83Dim tokens As ArrayBuilder(Of SyntaxToken) = Nothing 84Using x = ArrayBuilder(Of SyntaxToken).GetInstance(tokens)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\ConversionGenerator.vb (1)
40Dim modifiers = New List(Of SyntaxToken) From {
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\EventGenerator.vb (2)
166Dim tokens As ArrayBuilder(Of SyntaxToken) = Nothing 167Using x = ArrayBuilder(Of SyntaxToken).GetInstance(tokens)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\FieldGenerator.vb (2)
106Dim tokens As ArrayBuilder(Of SyntaxToken) = Nothing 107Using x = ArrayBuilder(Of SyntaxToken).GetInstance(tokens)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\MethodGenerator.vb (2)
144Dim result As ArrayBuilder(Of SyntaxToken) = Nothing 145Using x = ArrayBuilder(Of SyntaxToken).GetInstance(result)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\NamedTypeGenerator.vb (1)
165Dim tokens = New List(Of SyntaxToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\PropertyGenerator.vb (4)
165Dim modifiers As ArrayBuilder(Of SyntaxToken) = Nothing 166Using x = ArrayBuilder(Of SyntaxToken).GetInstance(modifiers) 178Dim tokens As ArrayBuilder(Of SyntaxToken) = Nothing 179Using x = ArrayBuilder(Of SyntaxToken).GetInstance(tokens)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationHelpers.vb (1)
17tokens As ArrayBuilder(Of SyntaxToken),
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicCodeGenerationService.vb (5)
328target As SyntaxToken?, 423ComputePositionAndTriviaForRemoveAttributeFromAttributeList(attributeToRemove, Function(t As SyntaxToken) t.IsKind(SyntaxKind.CommaToken), positionOfRemovedNode, trivia) 633Public Overrides Function UpdateDeclarationModifiers(Of TDeclarationNode As SyntaxNode)(declaration As TDeclarationNode, newModifiers As IEnumerable(Of SyntaxToken), options As VisualBasicCodeGenerationContextInfo, cancellationToken As CancellationToken) As TDeclarationNode 650Dim newModifierTokens As ArrayBuilder(Of SyntaxToken) = Nothing 651Using x = ArrayBuilder(Of SyntaxToken).GetInstance(newModifierTokens)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\CodeGeneration\VisualBasicDeclarationComparer.vb (7)
288Private Shared Function ContainsToken(list As IEnumerable(Of SyntaxToken), kind As SyntaxKind) As Boolean 289Return list.Contains(Function(token As SyntaxToken) 302Private Shared Function GetAccessibilityPrecedence(declaration As SyntaxNode, modifiers As IEnumerable(Of SyntaxToken)) As Integer 390Private Shared Function EqualIdentifierName(x As SyntaxToken, y As SyntaxToken, ByRef comparisonResult As Integer) As Boolean 395Private Shared Function EqualOperatorPrecedence(x As SyntaxToken, y As SyntaxToken, ByRef comparisonResult As Integer) As Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\IsStatementTerminatingTokenVisitor.vb (3)
18Private ReadOnly _targetToken As SyntaxToken 20Public Sub New(targetToken As SyntaxToken) 134Private Function TargetTokenMatches(token As SyntaxToken) As Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTokenExtensions.vb (7)
12Friend Function HasColonBeforePosition(token As SyntaxToken, position As Integer) As Boolean 55Friend Function HasNonContinuableEndOfLineBeforePosition(token As SyntaxToken, position As Integer, Optional checkForSecondEol As Boolean = False) As Boolean 96Friend Function FollowsBadEndDirective(targetToken As SyntaxToken) As Boolean 114Friend Function FollowsEndOfStatement(token As SyntaxToken, position As Integer) As Boolean 120Friend Function MustBeginNewStatement(token As SyntaxToken, position As Integer) As Boolean 126Friend Function IsMandatoryNamedParameterPosition(token As SyntaxToken) As Boolean 148Friend Function IsModifier(token As SyntaxToken) As Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\SyntaxTreeExtensions.vb (29)
14Friend Function GetTargetToken(syntaxTree As SyntaxTree, position As Integer, cancellationToken As CancellationToken) As SyntaxToken 47Public Function IsPreProcessorKeywordContext(syntaxTree As SyntaxTree, position As Integer, preProcessorTokenOnLeftOfPosition As SyntaxToken, cancellationToken As CancellationToken) As Boolean 63Public Function IsNamespaceContext(syntaxTree As SyntaxTree, position As Integer, token As SyntaxToken, cancellationToken As CancellationToken, Optional semanticModelOpt As SemanticModel = Nothing) As Boolean 115Friend Function IsTypeDeclarationContext(syntaxTree As SyntaxTree, position As Integer, token As SyntaxToken, cancellationToken As CancellationToken) As Boolean 122syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, allowAfterModifiersOrDim As Boolean, cancellationToken As CancellationToken, ParamArray allowedParentBlocks As SyntaxKind()) As Boolean 163Private Function IsDimOrModifierOrAttributeList(token As SyntaxToken) As Boolean 188Friend Function IsTypeMemberDeclarationKeywordContext(syntaxTree As SyntaxTree, position As Integer, token As SyntaxToken, cancellationToken As CancellationToken) As Boolean 197Friend Function IsInterfaceMemberDeclarationKeywordContext(syntaxTree As SyntaxTree, position As Integer, token As SyntaxToken, cancellationToken As CancellationToken) As Boolean 205Friend Function IsTypeDeclarationKeywordContext(syntaxTree As SyntaxTree, position As Integer, token As SyntaxToken, cancellationToken As CancellationToken) As Boolean 212Friend Function IsFieldNameDeclarationContext(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, cancellationToken As CancellationToken) As Boolean 268Friend Function IsLabelContext(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, cancellationToken As CancellationToken) As Boolean 315Public Function IsDelegateCreationContext(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean 346syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, cancellationToken As CancellationToken, Optional semanticModelOpt As SemanticModel = Nothing) As Boolean 459Public Function IsAttributeNameContext(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, cancellationToken As CancellationToken) As Boolean 479Public Function IsTypeContext(syntaxTree As SyntaxTree, position As Integer, token As SyntaxToken, cancellationToken As CancellationToken, Optional semanticModelOpt As SemanticModel = Nothing) As Boolean 546ByRef token As SyntaxToken, cancellationToken As CancellationToken) 582Friend Function IsSingleLineStatementContext(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, cancellationToken As CancellationToken) As Boolean 625Friend Function IsMultiLineStatementStartContext(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, cancellationToken As CancellationToken) As Boolean 662Friend Function IsStartOfSelectCaseBlock(syntaxTree As SyntaxTree, position As Integer, token As SyntaxToken, cancellationToken As CancellationToken) As Boolean 670Friend Function IsAfterStatementOfKind(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, cancellationToken As CancellationToken, ParamArray kinds As SyntaxKind()) As Boolean 684Friend Function IsInStatementBlockOfKind(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, cancellationToken As CancellationToken, ParamArray kinds As SyntaxKind()) As Boolean 716Public Function IsQueryIntoClauseContext(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, cancellationToken As CancellationToken) As Boolean 750Public Function IsRaiseEventContext(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, cancellationToken As CancellationToken) As Boolean 762Public Function IsObjectCreationTypeContext(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, cancellationToken As CancellationToken) As Boolean 775Friend Function IsEnumTypeMemberAccessContext(syntaxTree As SyntaxTree, position As Integer, targetToken As SyntaxToken, semanticModel As SemanticModel, cancellationToken As CancellationToken) As Boolean 813targetToken As SyntaxToken, 853Friend Function GetExpressionTerminatingToken(expression As SyntaxNode) As SyntaxToken 955Private Function GetQueryClauseTerminatingToken(queryClause As QueryClauseSyntax) As SyntaxToken 1073tokenOnLeftOfPosition As SyntaxToken,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\ContextQuery\VisualBasicSyntaxContext.vb (9)
55leftToken As SyntaxToken, 56targetToken As SyntaxToken, 140Private Shared Function ComputeIsTaskLikeTypeContext(targetToken As SyntaxToken) As Boolean 153Private Shared Shadows Function ComputeIsWithinAsyncMethod(targetToken As SyntaxToken) As Boolean 202targetToken As SyntaxToken, 262Private Shared Function ComputeIsWithinPreprocessorContext(position As Integer, targetToken As SyntaxToken) As Boolean 273Private Shared Function ComputeIsPreprocessorStartContext(position As Integer, targetToken As SyntaxToken) As Boolean 284Private Shared Function ComputeIsEnumBaseListContext(targetToken As SyntaxToken) As Boolean 291Private Shared Function ComputeIsRightAfterUsingOrImportDirective(targetToken As SyntaxToken) As Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Extensions\StringExtensions.vb (1)
61Public Function ToIdentifierToken(text As String, Optional afterDot As Boolean = False, Optional symbol As ISymbol = Nothing, Optional withinAsyncMethod As Boolean = False) As SyntaxToken
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Indentation\SpecialFormattingOperation.vb (7)
26Public Overrides Function GetAdjustNewLinesOperationSlow(ByRef previousToken As SyntaxToken, ByRef currentToken As SyntaxToken, ByRef nextOperation As NextGetAdjustNewLinesOperation) As AdjustNewLinesOperation 45Public Overrides Function GetAdjustSpacesOperationSlow(ByRef previousToken As SyntaxToken, ByRef currentToken As SyntaxToken, ByRef nextOperation As NextGetAdjustSpacesOperation) As AdjustSpacesOperation 147Dim endToken As SyntaxToken 201Private Overloads Shared Sub AddAlignTokensOperations(Of T As SyntaxNode)(operations As List(Of AlignTokensOperation), node As SyntaxNode, baseTokenGetter As Func(Of T, SyntaxToken)) 215Private Overloads Shared Sub AddAlignTokensOperations(operations As List(Of AlignTokensOperation), baseToken As SyntaxToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Indentation\VisualBasicIndentationService.Indenter.vb (13)
35Protected Overrides Function ShouldUseTokenIndenter(indenter As Indenter, ByRef token As SyntaxToken) As Boolean 53tokenOpt As SyntaxToken?, 101Private Shared Function GetTokenOnLeft(trivia As SyntaxTrivia) As SyntaxToken 110Private Shared Function GetIndentationBasedOnToken(indenter As Indenter, token As SyntaxToken, Optional trivia As SyntaxTrivia = Nothing) As IndentationResult 150Private Shared Function GetIndentationOfCurrentPosition(indenter As Indenter, token As SyntaxToken, position As Integer) As IndentationResult 154Private Shared Function GetIndentationOfCurrentPosition(indenter As Indenter, token As SyntaxToken, position As Integer, extraSpaces As Integer) As IndentationResult 170Private Shared Function IsLineContinuable(lastVisibleTokenOnPreviousLine As SyntaxToken, trivia As SyntaxTrivia) As Boolean 180Dim visibleTokenOnCurrentLine As SyntaxToken = lastVisibleTokenOnPreviousLine.GetNextToken() 203Private Shared Function IsCloseBraceOfInitializerSyntax(visibleTokenOnCurrentLine As SyntaxToken) As Boolean 232Private Shared Function GetIndentationFromOperationService(indenter As Indenter, token As SyntaxToken, position As Integer) As IndentationResult? 261Private Shared Function GetIndentationFromTokenLineAfterLineContinuation(indenter As Indenter, token As SyntaxToken, trivia As SyntaxTrivia) As IndentationResult 311Private Shared Function IsCommaInParameters(token As SyntaxToken) As Boolean 318Private Shared Function GetIndentationFromTwoLines(indenter As Indenter, firstLine As TextLine, secondLine As TextLine, token As SyntaxToken, position As Integer) As IndentationResult
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Indentation\VisualBasicIndentationService.vb (2)
44ByRef token As SyntaxToken, 122Private Shared Function IsInvalidToken(token As SyntaxToken) As Boolean
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicAddImportsService.vb (4)
117Implements IComparer(Of SyntaxToken) 118Public Function Compare(x As SyntaxToken, y As SyntaxToken) As Integer Implements IComparer(Of SyntaxToken).Compare
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicMoveDeclarationNearReferenceService.vb (1)
41Protected Overrides Function GetIdentifierOfVariableDeclarator(variableDeclarator As VariableDeclaratorSyntax) As SyntaxToken
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSemanticFactsService.vb (7)
44Protected Overrides Function ToIdentifierToken(identifier As String) As SyntaxToken 107semanticModel As SemanticModel, location As SyntaxNode, containerOpt As SyntaxNode, baseName As String, cancellationToken As CancellationToken) As SyntaxToken Implements ISemanticFactsService.GenerateUniqueName 112semanticModel As SemanticModel, location As SyntaxNode, containerOpt As SyntaxNode, baseName As String, usedNames As IEnumerable(Of String), cancellationToken As CancellationToken) As SyntaxToken Implements ISemanticFactsService.GenerateUniqueName 117semanticModel As SemanticModel, location As SyntaxNode, containerOpt As SyntaxNode, baseName As String, cancellationToken As CancellationToken) As SyntaxToken Implements ISemanticFactsService.GenerateUniqueLocalName 122semanticModel As SemanticModel, location As SyntaxNode, containerOpt As SyntaxNode, baseName As String, usedName As IEnumerable(Of String), cancellationToken As CancellationToken) As SyntaxToken Implements ISemanticFactsService.GenerateUniqueLocalName 126Private Function ISemanticFactsService_GenerateUniqueName(semanticModel As SemanticModel, location As SyntaxNode, containerOpt As SyntaxNode, baseName As String, filter As Func(Of ISymbol, Boolean), usedNames As IEnumerable(Of String), cancellationToken As CancellationToken) As SyntaxToken Implements ISemanticFactsService.GenerateUniqueName 130Private Function ISemanticFactsService_GenerateUniqueName(baseName As String, usedNames As IEnumerable(Of String)) As SyntaxToken Implements ISemanticFactsService.GenerateUniqueName
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicSyntaxGeneratorInternal.vb (9)
57Public Overloads Overrides Function LocalDeclarationStatement(type As SyntaxNode, identifier As SyntaxToken, Optional initializer As SyntaxNode = Nothing, Optional isConst As Boolean = False) As SyntaxNode 67Public Overrides Function EqualsValueClause(operatorToken As SyntaxToken, value As SyntaxNode) As SyntaxNode 80Public Overrides Function Identifier(text As String) As SyntaxToken 116Public Overrides Function InterpolatedStringExpression(startToken As SyntaxToken, content As IEnumerable(Of SyntaxNode), endToken As SyntaxToken) As SyntaxNode 121Public Overrides Function InterpolatedStringText(textToken As SyntaxToken) As SyntaxNode 125Public Overrides Function InterpolatedStringTextToken(content As String, value As String) As SyntaxToken 465Public Overrides Function IsPatternExpression(expression As SyntaxNode, isToken As SyntaxToken, pattern As SyntaxNode) As SyntaxNode 513Public Overrides Function UnaryPattern(operatorToken As SyntaxToken, pattern As SyntaxNode) As SyntaxNode
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\LanguageServices\VisualBasicTypeInferenceService.TypeInferrer.vb (18)
184Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 201previousToken As SyntaxToken) As IEnumerable(Of TypeInferenceInfo) 227Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 432Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 448Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 495Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 522Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 589Private Function InferTypeInCatchFilterClause(catchFilterClause As CatchFilterClauseSyntax, Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 653Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 674Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 692Private Function InferTypeInForStepClause(forStepClause As ForStepClauseSyntax, Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 717Private Function InferTypeForReturnStatement(returnStatement As ReturnStatementSyntax, Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 757Private Function InferTypeInYieldStatement(yieldStatement As YieldStatementSyntax, Optional previoustoken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 811Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 829Private Function InferTypeInThrowStatement(Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo) 879Optional previousToken As SyntaxToken? = Nothing) As IEnumerable(Of TypeInferenceInfo) 1021Private Shared Function GetArgumentListIndex(argumentList As ArgumentListSyntax, previousToken As SyntaxToken) As Integer 1033Optional previousToken As SyntaxToken = Nothing) As IEnumerable(Of TypeInferenceInfo)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Utilities\ModifierCollectionFacts.vb (28)
15Private ReadOnly _accessibilityKeyword As SyntaxToken 16Private ReadOnly _asyncKeyword As SyntaxToken 18Private ReadOnly _inheritenceKeyword As SyntaxToken 19Private ReadOnly _iteratorKeyword As SyntaxToken 20Private ReadOnly _overridableSharedOrPartialKeyword As SyntaxToken 21Private ReadOnly _overridesOrShadowsKeyword As SyntaxToken 22Private ReadOnly _narrowingOrWideningKeyword As SyntaxToken 23Private ReadOnly _mutabilityOrWithEventsKeyword As SyntaxToken 24Private ReadOnly _defaultKeyword As SyntaxToken 25Private ReadOnly _overloadsKeyword As SyntaxToken 26Private ReadOnly _customKeyword As SyntaxToken 27Private ReadOnly _dimKeyword As SyntaxToken 28Private ReadOnly _sharedKeyword As SyntaxToken 32Public Sub New(syntaxTree As SyntaxTree, position As Integer, token As SyntaxToken, cancellationToken As CancellationToken) 218Public ReadOnly Property AccessibilityKeyword As SyntaxToken 224Public ReadOnly Property AsyncKeyword As SyntaxToken 230Public ReadOnly Property IteratorKeyword As SyntaxToken 242Public ReadOnly Property OverridableSharedOrPartialKeyword As SyntaxToken 248Public ReadOnly Property OverridesOrShadowsKeyword As SyntaxToken 254Public ReadOnly Property InheritenceKeyword As SyntaxToken 260Public ReadOnly Property DefaultKeyword As SyntaxToken 266Public ReadOnly Property NarrowingOrWideningKeyword As SyntaxToken 272Public ReadOnly Property OverloadsKeyword As SyntaxToken 278Public ReadOnly Property MutabilityOrWithEventsKeyword As SyntaxToken 284Public ReadOnly Property CustomKeyword As SyntaxToken 290Public ReadOnly Property DimKeyword As SyntaxToken 296Public ReadOnly Property SharedKeyword As SyntaxToken 302Private Shared Function ComputeAllowableDeclarationTypes(syntaxTree As SyntaxTree, position As Integer, token As SyntaxToken, cancellationToken As CancellationToken) As PossibleDeclarationTypes
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Utilities\VisualBasicSimplificationHelpers.vb (2)
10Public Function TryEscapeIdentifierToken(identifierToken As SyntaxToken) As SyntaxToken
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (1)
EmbeddedLanguages\VirtualChars\VisualBasicVirtualCharServiceTests.vb (1)
15Private Shared Function GetStringToken(text As String) As SyntaxToken
Microsoft.CodeAnalysis.Workspaces (790)
CaseCorrection\AbstractCaseCorrectionService.cs (4)
20protected abstract void AddReplacements(SemanticModel? semanticModel, SyntaxNode root, ImmutableArray<TextSpan> spans, ConcurrentDictionary<SyntaxToken, SyntaxToken> replacements, CancellationToken cancellationToken); 49var replacements = new ConcurrentDictionary<SyntaxToken, SyntaxToken>();
Classification\AbstractClassificationService.cs (2)
29private Func<SyntaxToken, ImmutableArray<ISyntaxClassifier>>? _getTokenClassifiers; 186(Func<SyntaxNode, ImmutableArray<ISyntaxClassifier>>, Func<SyntaxToken, ImmutableArray<ISyntaxClassifier>>) GetExtensionClassifiers(
Classification\SyntaxClassification\AbstractSyntaxClassificationService.cs (3)
24public abstract string? GetSyntacticClassificationForIdentifier(SyntaxToken identifier); 31Func<SyntaxToken, ImmutableArray<ISyntaxClassifier>> getTokenClassifiers, 52Func<SyntaxToken, ImmutableArray<ISyntaxClassifier>> getTokenClassifiers,
Classification\SyntaxClassification\AbstractSyntaxClassificationService.Worker.cs (4)
26private readonly Func<SyntaxToken, ImmutableArray<ISyntaxClassifier>> _getTokenClassifiers; 39Func<SyntaxToken, ImmutableArray<ISyntaxClassifier>> getTokenClassifiers, 61Func<SyntaxToken, ImmutableArray<ISyntaxClassifier>> getTokenClassifiers, 150private void ClassifyToken(SyntaxToken syntax)
Classification\SyntaxClassification\AbstractSyntaxClassifier.cs (1)
26public virtual void AddClassifications(SyntaxToken syntax, TextSpan textSpan, SemanticModel semanticModel, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken)
Classification\SyntaxClassification\ISyntaxClassificationService.cs (3)
39Func<SyntaxToken, ImmutableArray<ISyntaxClassifier>> getTokenClassifiers, 48Func<SyntaxToken, ImmutableArray<ISyntaxClassifier>> getTokenClassifiers, 53string? GetSyntacticClassificationForIdentifier(SyntaxToken identifier);
Classification\SyntaxClassification\ISyntaxClassifier.cs (1)
34void AddClassifications(SyntaxToken token, TextSpan textSpan, SemanticModel semanticModel, ClassificationOptions options, SegmentedList<ClassifiedSpan> result, CancellationToken cancellationToken);
Classification\SyntaxClassification\SyntaxClassificationExtensions.cs (2)
33Func<SyntaxToken, ImmutableArray<ISyntaxClassifier>> getTokenClassifiers, 52Func<SyntaxToken, ImmutableArray<ISyntaxClassifier>> getTokenClassifiers,
CodeCleanup\AbstractCodeCleanerService.cs (26)
150IEnumerable<SyntaxToken> previousTokens, 151IEnumerable<SyntaxToken> nextTokens, 157var previousToken = previousTokens.FirstOrDefault(); 158var nextToken = nextTokens.FirstOrDefault(); 237private static int GetPreviousTokenStartPosition(SpanMarkerType spanMarkerType, SyntaxToken previousToken) 253private static int GetNextTokenEndPosition(SpanMarkerType spanMarkerType, SyntaxToken nextToken) 276var tokenAnnotationMap = new Dictionary<SyntaxToken, List<SyntaxAnnotation>>(); 283out var previousToken, out var startToken, out var endToken, out var nextToken); 331_ = GetSpanAlignedToTokens(root, span, out var startToken, out var endToken); 333var previousToken = startToken.GetPreviousToken(includeZeroWidth: true, includeSkipped: true, includeDirectives: true, includeDocumentationComments: true); 334var nextToken = endToken.GetNextToken(includeZeroWidth: true, includeSkipped: true, includeDirectives: true, includeDocumentationComments: true); 360out SyntaxToken previousToken, 361out SyntaxToken startToken, 362out SyntaxToken endToken, 363out SyntaxToken nextToken) 383out SyntaxToken startToken, out SyntaxToken endToken) 404private static SyntaxToken FindTokenOnRightOfPosition(SyntaxNode root, int position) 406var token = root.FindTokenOnRightOfPosition(position, includeSkipped: true, includeDirectives: true, includeDocumentationComments: true); 418private static SyntaxToken FindTokenOnLeftOfPosition(SyntaxNode root, int position) 421var token = root.FindTokenOnLeftOfPosition(position, includeSkipped: true, includeDirectives: true, includeDocumentationComments: true); 593private static SyntaxNode InjectAnnotations(SyntaxNode node, Dictionary<SyntaxToken, List<SyntaxAnnotation>> map)
Editing\SyntaxGenerator.cs (22)
53internal abstract SyntaxToken CreateInterpolatedStringStartToken(bool isVerbatim); 54internal abstract SyntaxToken CreateInterpolatedStringEndToken(); 1071internal SyntaxToken RemoveLeadingAndTrailingComments(SyntaxToken token) 1439internal abstract SeparatedSyntaxList<TElement> SeparatedList<TElement>(IEnumerable<TElement> nodes, IEnumerable<SyntaxToken> separators) where TElement : SyntaxNode; 1452foreach (var token in original) 1499protected static SyntaxNode ReplaceWithTrivia(SyntaxNode root, SyntaxToken original, SyntaxToken replacement) 1501var combinedTriviaReplacement = 1616internal SyntaxNode LocalDeclarationStatement(SyntaxNode? type, SyntaxToken identifier, SyntaxNode? initializer = null, bool isConst = false) 1622internal SyntaxNode EqualsValueClause(SyntaxToken operatorToken, SyntaxNode value) 1640internal SyntaxNode LocalDeclarationStatement(SyntaxToken name, SyntaxNode initializer) 1760internal abstract SyntaxToken NumericLiteralToken(string text, ulong value); 1762internal SyntaxToken InterpolatedStringTextToken(string content, string value) 1764internal SyntaxNode InterpolatedStringText(SyntaxToken textToken) 1768internal SyntaxNode InterpolatedStringExpression(SyntaxToken startToken, IEnumerable<SyntaxNode> content, SyntaxToken endToken) 1834internal abstract SyntaxNode IdentifierName(SyntaxToken identifier); 1835internal SyntaxToken Identifier(string identifier) => SyntaxGeneratorInternal.Identifier(identifier); 1843internal abstract SyntaxNode GenericName(SyntaxToken identifier, IEnumerable<SyntaxNode> typeArguments); 2200SyntaxNode namedType, SyntaxToken openParen, SeparatedSyntaxList<SyntaxNode> arguments, SyntaxToken closeParen);
ExtensionManager\IExtensionManagerExtensions.cs (1)
114public static Func<SyntaxToken, ImmutableArray<TExtension>> CreateTokenExtensionGetter<TExtension>(
FindSymbols\FindLiterals\FindLiteralsSearchEngine.cs (7)
143using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var matches); 146foreach (var token in matches) 152ArrayBuilder<SyntaxToken> matches, CancellationToken cancellationToken) 169ISyntaxFactsService syntaxFacts, SyntaxToken token, 170ArrayBuilder<SyntaxToken> matches) 189private void CheckToken(SyntaxToken token, ArrayBuilder<SyntaxToken> matches)
FindSymbols\FindReferences\Finders\AbstractMemberScopedReferenceFinder.cs (3)
22FindReferencesDocumentState state, SyntaxToken token, string name); 109using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var tokens); 117foreach (var token in syntax.DescendantTokens())
FindSymbols\FindReferences\Finders\AbstractReferenceFinder.cs (7)
40ISymbol symbol, FindReferencesDocumentState state, SyntaxToken token, CancellationToken cancellationToken) 161protected static bool IdentifiersMatch(ISyntaxFactsService syntaxFacts, string name, SyntaxToken token) 176public static ImmutableArray<SyntaxToken> FindMatchingIdentifierTokens(FindReferencesDocumentState state, string identifier, CancellationToken cancellationToken) 182ImmutableArray<SyntaxToken> tokens, 190foreach (var token in tokens) 203protected static FinderLocation CreateFinderLocation(FindReferencesDocumentState state, SyntaxToken token, CandidateReason reason, CancellationToken cancellationToken) 206public static ReferenceLocation CreateReferenceLocation(FindReferencesDocumentState state, SyntaxToken token, CandidateReason reason, CancellationToken cancellationToken)
FindSymbols\FindReferences\Finders\AbstractReferenceFinder_GlobalSuppressions.cs (3)
96FindReferencesDocumentState state, SyntaxToken token, ReadOnlySpan<char> expectedDocCommentId, 153SyntaxToken token, 203SyntaxToken token,
FindSymbols\FindReferences\Finders\AbstractTypeParameterSymbolReferenceFinder.cs (3)
47static bool IsObjectCreationToken(SyntaxToken token, FindReferencesDocumentState state) 55ImmutableArray<SyntaxToken> objectCreationTokens, 59foreach (var token in objectCreationTokens)
FindSymbols\FindReferences\Finders\ConstructorInitializerSymbolReferenceFinder.cs (1)
76SyntaxToken token,
FindSymbols\FindReferences\Finders\ConstructorSymbolReferenceFinder.cs (1)
88private static bool IsPotentialReference(PredefinedType predefinedType, ISyntaxFactsService syntaxFacts, SyntaxToken token)
FindSymbols\FindReferences\Finders\ExplicitConversionSymbolReferenceFinder.cs (1)
80ISyntaxFactsService syntaxFacts, SyntaxToken token)
FindSymbols\FindReferences\Finders\LabelSymbolReferenceFinder.cs (1)
9protected override bool TokensMatch(FindReferencesDocumentState state, SyntaxToken token, string name)
FindSymbols\FindReferences\Finders\LocalSymbolReferenceFinder.cs (1)
9protected override bool TokensMatch(FindReferencesDocumentState state, SyntaxToken token, string name)
FindSymbols\FindReferences\Finders\NamedTypeSymbolReferenceFinder.cs (1)
100SyntaxToken token)
FindSymbols\FindReferences\Finders\OperatorSymbolReferenceFinder.cs (1)
74SyntaxToken token)
FindSymbols\FindReferences\Finders\ParameterSymbolReferenceFinder.cs (1)
138foreach (var token in container.DescendantTokens())
FindSymbols\FindReferences\Finders\PreprocessingSymbolReferenceFinder.cs (1)
49foreach (var token in tokens)
FindSymbols\FindReferences\Finders\RangeVariableSymbolReferenceFinder.cs (1)
9protected override bool TokensMatch(FindReferencesDocumentState state, SyntaxToken token, string name)
FindSymbols\FindReferences\FindReferenceCache.cs (19)
67private readonly ConcurrentDictionary<string, ImmutableArray<SyntaxToken>> _identifierCache; 70private ImmutableArray<SyntaxToken> _constructorInitializerCache; 71private ImmutableArray<SyntaxToken> _newKeywordsCache; 96ISemanticFactsService semanticFacts, SyntaxToken token, CancellationToken cancellationToken) 110public ImmutableArray<SyntaxToken> FindMatchingIdentifierTokens( 149private bool IsMatch(string identifier, SyntaxToken token) 152private ImmutableArray<SyntaxToken> FindMatchingIdentifierTokensFromTree( 155using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var result); 171var token = current.AsToken(); 190private ImmutableArray<SyntaxToken> FindMatchingTokensFromText<TArgs>( 191string text, Func<string, SyntaxToken, TArgs, bool> isMatch, TArgs args, CancellationToken cancellationToken) 193using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var result); 200var token = this.Root.FindToken(index, findInsideTrivia: true); 213public ImmutableArray<SyntaxToken> GetConstructorInitializerTokens(CancellationToken cancellationToken) 222ImmutableArray<SyntaxToken> GetConstructorInitializerTokensWorker() 225using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var initializers); 228foreach (var token in constructor.DescendantTokens(descendIntoTrivia: false)) 239public ImmutableArray<SyntaxToken> GetNewKeywordTokens(CancellationToken cancellationToken) 246ImmutableArray<SyntaxToken> GetNewKeywordTokensWorker()
FindSymbols\FindReferences\FindReferencesSearchEngine_FindReferencesInDocuments.cs (1)
182foreach (var token in tokens)
FindSymbols\Shared\AbstractSyntaxIndex.cs (1)
167private static bool ContainsIfDirective(SyntaxToken token, int ifDirectiveKind)
FindSymbols\SymbolFinder.cs (2)
83var token = await GetTokenAtPositionAsync(semanticModel, position, services, cancellationToken).ConfigureAwait(false); 94private static Task<SyntaxToken> GetTokenAtPositionAsync(
FindSymbols\SyntaxTree\SyntaxTreeIndex_Create.cs (8)
116var token = (SyntaxToken)current; 228var identifier = syntaxFacts.GetIdentifierOfIdentifierName(name); 274var numericToken = syntaxFacts.GetTokenOfLiteralExpression(versionArg); 278var dataToken = syntaxFacts.GetTokenOfLiteralExpression(dataArg); 291var identifier = syntaxFacts.GetIdentifierOfIdentifierName(attributeName); 313syntaxFacts.GetPartsOfUsingAliasDirective(node, out var globalToken, out var alias, out var usingTarget);
LanguageServices\DeclaredSymbolFactoryService\AbstractDeclaredSymbolInfoFactoryService.cs (1)
62protected abstract SyntaxToken GetIdentifier(TIdentifierNameSyntax node);
ObsoleteSymbol\AbstractObsoleteSymbolService.cs (10)
19/// The <see cref="SyntaxToken.RawKind"/> of the <see langword="Dim"/> keyword in Visual Basic, or 25protected virtual void ProcessDimKeyword(ref ArrayBuilder<TextSpan>? result, SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 74var tokenFromNode = ProcessNode(semanticModel, current); 81var token = child.AsToken(); 109SyntaxToken ProcessNode(SemanticModel semanticModel, SyntaxNode node) 113syntaxFacts.GetPartsOfUsingAliasDirective(node, out _, out var aliasToken, out var name); 126syntaxFacts.GetPartsOfObjectCreationExpression(node, out var creationKeyword, out _, out _, out _); 142syntaxFacts.GetPartsOfImplicitObjectCreationExpression(node, out var creationKeyword, out _, out _); 159void ProcessToken(SemanticModel semanticModel, SyntaxToken token) 171void ProcessIdentifier(SemanticModel semanticModel, SyntaxToken token)
ReassignedVariable\AbstractReassignedVariableService.cs (3)
36protected abstract SyntaxToken GetIdentifierOfVariable(TVariableSyntax variable); 37protected abstract SyntaxToken GetIdentifierOfSingleVariableDesignation(TSingleVariableDesignationSyntax variable); 321var idToken = syntaxFacts.GetIdentifierOfSimpleName(id);
Rename\ConflictEngine\ConflictingIdentifierTracker.cs (11)
9internal sealed class ConflictingIdentifierTracker(SyntaxToken tokenBeingRenamed, IEqualityComparer<string> identifierComparer) 16private readonly Dictionary<string, List<SyntaxToken>> _currentIdentifiersInScope = new Dictionary<string, List<SyntaxToken>>(identifierComparer); 17private readonly HashSet<SyntaxToken> _conflictingTokensToReport = []; 19public IEnumerable<SyntaxToken> ConflictingTokens => _conflictingTokensToReport; 21public void AddIdentifier(SyntaxToken token) 56public void AddIdentifiers(IEnumerable<SyntaxToken> tokens) 58foreach (var token in tokens) 64public void RemoveIdentifier(SyntaxToken token) 82public void RemoveIdentifiers(IEnumerable<SyntaxToken> tokens) 84foreach (var token in tokens)
Rename\ConflictEngine\ConflictResolver.cs (2)
138private static SyntaxNode? GetExpansionTargetForLocationPerLanguage(SyntaxToken tokenOrNode, Document document) 145private static bool LocalVariableConflictPerLanguage(SyntaxToken tokenOrNode, Document document, ImmutableArray<ISymbol> newReferencedSymbols)
Rename\ConflictEngine\ConflictResolver.Session.cs (2)
394hasConflict = LocalVariableConflictPerLanguage((SyntaxToken)tokenOrNode, newDocument, newReferencedSymbols); 422var baseToken = baseRoot.FindToken(conflictAnnotation.OriginalSpan.Start, true);
Rename\ConflictEngine\RenamedSpansTracker.cs (4)
180var modifiedTokensInComplexifiedStatements = new HashSet<SyntaxToken>(); 187.Select(x => Tuple.Create(renameAnnotations.GetAnnotations<RenameTokenSimplificationAnnotation>(x).First(), (SyntaxToken)x)); 201.Where(x => !modifiedTokensInComplexifiedStatements.Contains((SyntaxToken)x)) 202.Select(x => Tuple.Create(renameAnnotations.GetAnnotations<RenameTokenSimplificationAnnotation>(x).First(), (SyntaxToken)x));
Rename\IRenameRewriterLanguageService.cs (4)
100SyntaxToken token, 120SyntaxNode? GetExpansionTargetForLocation(SyntaxToken token); 129public abstract SyntaxNode? GetExpansionTargetForLocation(SyntaxToken token); 131public abstract bool LocalVariableConflict(SyntaxToken token, IEnumerable<ISymbol> newReferencedSymbols);
Rename\RenameUtilities.cs (4)
26internal static SyntaxToken UpdateAliasAnnotation(SyntaxToken token, ISymbol aliasSymbol, string replacementText) 47var bindableToken = semanticModel.SyntaxTree.GetRoot(cancellationToken).FindToken(position, findInsideTrivia: true); 148SyntaxToken token,
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
217var token = location.FindToken(cancellationToken);
Shared\Extensions\SemanticModelExtensions.cs (1)
72SyntaxToken token,
Shared\Utilities\SemanticMap.cs (1)
17private readonly Dictionary<SyntaxToken, SymbolInfo> _tokenToInfoMap = [];
Shared\Utilities\SemanticMap.Walker.cs (1)
29var childToken = child.AsToken();
Simplification\Simplifier.cs (6)
112public static async Task<SyntaxToken> ExpandAsync(SyntaxToken token, Document document, Func<SyntaxNode, bool>? expandInsideNode = null, CancellationToken cancellationToken = default) 126public static SyntaxToken Expand(SyntaxToken token, SemanticModel semanticModel, Workspace workspace, Func<SyntaxNode, bool>? expandInsideNode = null, CancellationToken cancellationToken = default) 137internal static SyntaxToken Expand(SyntaxToken token, SemanticModel semanticModel, SolutionServices services, Func<SyntaxNode, bool>? expandInsideNode = null, CancellationToken cancellationToken = default)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\AbstractVirtualCharService.cs (5)
21protected abstract VirtualCharSequence TryConvertToVirtualCharsWorker(SyntaxToken token); 22protected abstract bool IsMultiLineRawStringToken(SyntaxToken token); 48public VirtualCharSequence TryConvertToVirtualChars(SyntaxToken token) 65private void CheckInvariants(SyntaxToken token, VirtualCharSequence result) 134SyntaxToken token, string startDelimiter, string endDelimiter, bool escapeBraces)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\EmbeddedLanguages\VirtualChars\IVirtualCharService.cs (5)
30/// char of the tokens <see cref="SyntaxToken.ValueText"/>. In other words, for each char 53/// cref="SyntaxToken.Text"/> 58/// cref="SyntaxToken.Text"/> of the token between the quotes maps to each character in the 59/// token's <see cref="SyntaxToken.ValueText"/>. 62VirtualCharSequence TryConvertToVirtualChars(SyntaxToken token);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\LocationExtensions.cs (1)
19public static SyntaxToken FindToken(this Location location, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SemanticModelExtensions.cs (1)
32public static SymbolInfo GetSymbolInfo(this SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SourceTextExtensions_SharedWithCodeStyle.cs (2)
83public static bool AreOnSameLine(this SourceText text, SyntaxToken token1, SyntaxToken token2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxNodeExtensions.cs (32)
363IEnumerable<SyntaxToken> tokens, 364Func<SyntaxToken, SyntaxToken, CancellationToken, Task<SyntaxToken>> computeReplacementAsync, 391IEnumerable<SyntaxToken>? tokens, 392Func<SyntaxToken, SyntaxToken, CancellationToken, Task<SyntaxToken>>? computeReplacementTokenAsync, 404var tokenReplacements = new Dictionary<SyntaxToken, SyntaxToken>(); 447var original = (SyntaxToken?)retryAnnotations.GetAnnotations(currentToken).SingleOrDefault() ?? currentToken; 485if (rewritten != original || !tokenReplacements.TryGetValue(original, out var replaced)) 540private static readonly Func<SyntaxTriviaList, int, SyntaxToken> s_findSkippedTokenForward = FindSkippedTokenForward; 545private static SyntaxToken FindSkippedTokenForward(SyntaxTriviaList triviaList, int position) 553foreach (var token in skippedTokensTrivia.Tokens) 570private static readonly Func<SyntaxTriviaList, int, SyntaxToken> s_findSkippedTokenBackward = FindSkippedTokenBackward; 575private static SyntaxToken FindSkippedTokenBackward(SyntaxTriviaList triviaList, int position) 583foreach (var token in skippedTokensTrivia.Tokens) 597private static SyntaxToken GetInitialToken( 613public static SyntaxToken FindTokenOnRightOfPosition( 622var token = GetInitialToken(root, position, includeSkipped, includeDirectives, includeDocumentationComments); 626var skippedToken = findSkippedToken(token.LeadingTrivia, position); 633var skippedToken = findSkippedToken(token.TrailingTrivia, position); 652public static SyntaxToken FindTokenOnLeftOfPosition( 661var token = GetInitialToken(root, position, includeSkipped, includeDirectives, includeDocumentationComments); 667var skippedToken = findSkippedToken(token.LeadingTrivia, position); 676var skippedToken = findSkippedToken(token.TrailingTrivia, position); 767public static SyntaxToken WithoutLeadingTrivia(this SyntaxToken token) 775public static SyntaxToken WithoutTrailingTrivia(this SyntaxToken token) 867foreach (var token in root.DescendantTokens(descendIntoChildren: static node => node.ContainsDirectives))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTokenExtensions.cs (32)
15public static SyntaxNode? GetAncestor(this SyntaxToken token, Func<SyntaxNode, bool>? predicate) 18public static T? GetAncestor<T>(this SyntaxToken token, Func<T, bool>? predicate = null) where T : SyntaxNode 21public static T GetRequiredAncestor<T>(this SyntaxToken token, Func<T, bool>? predicate = null) where T : SyntaxNode 24public static IEnumerable<T> GetAncestors<T>(this SyntaxToken token) 32public static IEnumerable<SyntaxNode> GetAncestors(this SyntaxToken token, Func<SyntaxNode, bool> predicate) 39public static SyntaxNode? GetCommonRoot(this SyntaxToken token1, SyntaxToken token2) 53public static bool CheckParent<T>(this SyntaxToken token, Func<T, bool> valueChecker) where T : SyntaxNode 63public static int Width(this SyntaxToken token) 66public static int FullWidth(this SyntaxToken token) 69public static SyntaxToken FindTokenFromEnd(this SyntaxNode root, int position, bool includeZeroWidth = true, bool findInsideTrivia = false) 71var token = root.FindToken(position, findInsideTrivia); 72var previousToken = token.GetPreviousToken( 85public static SyntaxToken GetNextTokenOrEndOfFile( 86this SyntaxToken token, 92var nextToken = token.GetNextToken(includeZeroWidth, includeSkipped, includeDirectives, includeDocumentationComments); 99public static SyntaxToken WithoutTrivia( 100this SyntaxToken token) 110public static SyntaxToken With(this SyntaxToken token, SyntaxTriviaList leading, SyntaxTriviaList trailing) 113public static SyntaxToken WithPrependedLeadingTrivia( 114this SyntaxToken token, 125public static SyntaxToken WithPrependedLeadingTrivia( 126this SyntaxToken token, 137public static SyntaxToken WithPrependedLeadingTrivia( 138this SyntaxToken token, 147public static SyntaxToken WithAppendedTrailingTrivia( 148this SyntaxToken token, 154public static SyntaxToken WithAppendedTrailingTrivia( 155this SyntaxToken token, 161public static SyntaxTrivia[] GetTrivia(this IEnumerable<SyntaxToken> tokens) 164public static SyntaxNode GetRequiredParent(this SyntaxToken token)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (13)
43public static Task<SyntaxToken> GetTouchingWordAsync( 53public static Task<SyntaxToken> GetTouchingTokenAsync( 62public static async Task<SyntaxToken> GetTouchingTokenAsync( 65Predicate<SyntaxToken> predicate, 77var token = root.FindToken(position, findInsideTrivia); 123var firstToken = root.GetFirstToken(includeZeroWidth: true, includeSkipped: true); 128public static SyntaxToken FindTokenOrEndToken( 134var result = root.FindToken(position, findInsideTrivia: true); 151var token = trivia.GetStructure()!.GetLastToken(includeZeroWidth: true); 179var endOfFileToken = compilationUnit.EndOfFileToken; 186var token = endOfFileToken.GetPreviousToken(includeSkipped: true); 200public static SyntaxToken FindTokenOnRightOfPosition( 215public static SyntaxToken FindTokenOnLeftOfPosition(
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\AbstractSyntaxFormatting.cs (2)
30protected abstract AbstractFormattingResult Format(SyntaxNode node, SyntaxFormattingOptions options, ImmutableArray<AbstractFormattingRule> rules, SyntaxToken startToken, SyntaxToken endToken, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (18)
44SyntaxTree tree, SyntaxToken token, int position, CancellationToken cancellationToken) 70public int? FromAlignTokensOperations(SyntaxTree tree, SyntaxToken token) 74var nextToken = token.GetNextToken(includeZeroWidth: true); 79var alignmentBaseToken = GetAlignmentBaseTokenFor(nextToken); 90SyntaxTree tree, SyntaxToken token, int position, CancellationToken cancellationToken) 96SyntaxTree tree, SyntaxToken token, int position, int extraSpaces, CancellationToken cancellationToken) 111Func<SyntaxToken, int> tokenColumnGetter, 114var token = startingOperation.StartToken; 140Func<SyntaxToken, int> tokenColumnGetter, 154var baseToken = operation.BaseToken; 213private List<IndentBlockOperation> GetParentIndentBlockOperations(SyntaxToken token) 229private static IEnumerable<SyntaxNode> GetParentNodes(SyntaxToken token) 247private SyntaxToken GetAlignmentBaseTokenFor(SyntaxToken token) 278private IndentBlockOperation? GetIndentationDataFor(SyntaxNode root, SyntaxToken token, int position) 313var lastVisibleToken = default(SyntaxToken); 343var nextToken = operation.EndToken.GetNextToken(includeZeroWidth: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.AnchorData.cs (4)
16private sealed class AnchorData(AnchorIndentationOperation operation, SyntaxToken anchorToken, int originalColumn) 20public SyntaxToken StartToken => operation.StartToken; 22public SyntaxToken EndToken => operation.EndToken; 24public SyntaxToken AnchorToken { get; } = anchorToken;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.cs (21)
43private readonly SegmentedDictionary<SyntaxToken, AnchorData> _anchorBaseTokenMap = []; 75SyntaxToken startToken, 76SyntaxToken endToken, 193Func<FormattingContext, IndentBlockOperation, SyntaxToken> effectiveBaseTokenGetter = operation.Option.IsOn(IndentBlockOption.RelativeToFirstTokenOnBaseTokenLine) 197Func<FormattingContext, IndentBlockOperation, SyntaxToken, int> relativeIndentationDeltaGetter = static (self, operation, effectiveBaseToken) => 204Func<FormattingContext, SyntaxToken, int> relativeIndentationBaseIndentationGetter = 399var anchorToken = TokenStream.FirstTokenOfBaseTokenLine(operation.AnchorToken); 417public int GetBaseIndentation(SyntaxToken token) 435public bool TryGetEndTokenForRelativeIndentationSpan(SyntaxToken token, int maxChainDepth, out SyntaxToken endToken, CancellationToken cancellationToken) 468private AnchorData? GetAnchorData(SyntaxToken token) 483public int GetAnchorDeltaFromOriginalColumn(SyntaxToken token) 495public SyntaxToken GetAnchorToken(SyntaxToken token) 506public int GetDeltaFromPreviousChangesMap(SyntaxToken token, Dictionary<SyntaxToken, int> previousChangesMap) 518public SyntaxToken GetEndTokenForAnchorSpan(TokenData tokenData) 641var token1 = TokenStream.GetToken(pairIndex); 642var token2 = TokenStream.GetToken(pairIndex + 1); 656var token1 = TokenStream.GetToken(pairIndex); 657var token2 = TokenStream.GetToken(pairIndex + 1);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Context\FormattingContext.InitialContextFinder.cs (9)
44public (List<IndentBlockOperation> indentOperations, ImmutableArray<SuppressOperation> suppressOperations) Do(SyntaxToken startToken, SyntaxToken endToken) 67private List<IndentBlockOperation> GetInitialIndentBlockOperations(SyntaxToken startToken, SyntaxToken endToken) 125private ImmutableArray<SuppressOperation> GetInitialSuppressOperations(SyntaxToken startToken, SyntaxToken endToken) 137SyntaxToken startToken, SyntaxToken endToken, SuppressOption mask, ArrayBuilder<SuppressOperation> result) 143private void AddInitialSuppressOperations(SyntaxToken token, SuppressOption mask, ArrayBuilder<SuppressOperation> result)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractAggregatedFormattingResult.cs (4)
46protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> changeMap, CancellationToken cancellationToken); 104var map = new Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.cs (11)
41private readonly SyntaxToken _startToken; 42private readonly SyntaxToken _endToken; 64SyntaxToken startToken, 65SyntaxToken endToken) 91SyntaxToken startToken, 92SyntaxToken endToken) 354var previousChangesMap = new Dictionary<SyntaxToken, int>(); 381var previousChangesMap = new Dictionary<SyntaxToken, int>(); 417private static SyntaxToken FindCorrectBaseTokenOfRelativeIndentBlockOperation(IndentBlockOperation operation, TokenStream tokenStream) 447var token1 = operation.Token1; 448var token2 = operation.Token2;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormatEngine.OperationApplier.cs (21)
220SyntaxToken token, 221IEnumerable<SyntaxToken> operationTokens, 244SyntaxToken token, 245IEnumerable<SyntaxToken> tokens, 246Dictionary<SyntaxToken, int> previousChangesMap, 260AlignTokensOperation operation, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken) 294SyntaxToken token, 296Dictionary<SyntaxToken, int> previousChangesMap, 324Dictionary<SyntaxToken, int> previousChangesMap, 354private IList<TokenData> GetTokenWithIndices(IEnumerable<SyntaxToken> tokens) 357foreach (var token in tokens) 380IList<TokenData> tokenWithIndices, Dictionary<SyntaxToken, int> newChangesMap, CancellationToken cancellationToken) 412Dictionary<SyntaxToken, int> previousChangesMap, 445SyntaxToken currentToken, 448Dictionary<SyntaxToken, int> previousChangesMap, 472SyntaxToken baseToken, 473SyntaxToken startToken, 474SyntaxToken endToken, 475Dictionary<SyntaxToken, int> previousChangesMap, 492Dictionary<SyntaxToken, int> previousChangesMap, 544int pairIndex, Dictionary<SyntaxToken, int> previousChangesMap, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractFormattingResult.cs (8)
44protected abstract SyntaxNode Rewriter(Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData> map, CancellationToken cancellationToken); 76private void AddTextChanges(List<TextChange> list, SyntaxToken token1, SyntaxToken token2, TriviaData data) 95using var pooledObject = SharedPools.Default<Dictionary<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>>().GetPooledObject(); 110internal IEnumerable<ValueTuple<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>> GetChanges(CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractTriviaDataFactory.AbstractComplexTrivia.cs (4)
20public AbstractComplexTrivia(LineFormattingOptions options, TreeData treeInfo, SyntaxToken token1, SyntaxToken token2) 44public SyntaxToken Token1 { get; } 46public SyntaxToken Token2 { get; }
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\AbstractTriviaDataFactory.cs (4)
140public abstract TriviaData CreateLeadingTrivia(SyntaxToken token); 141public abstract TriviaData CreateTrailingTrivia(SyntaxToken token); 142public abstract TriviaData Create(SyntaxToken token1, SyntaxToken token2);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\ChainedFormattingRules.cs (4)
71public AdjustNewLinesOperation? GetAdjustNewLinesOperation(SyntaxToken previousToken, SyntaxToken currentToken) 77public AdjustSpacesOperation? GetAdjustSpacesOperation(SyntaxToken previousToken, SyntaxToken currentToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenData.cs (2)
26public SyntaxToken Token { get; } 28public TokenData(TokenStream tokenStream, int indexInStream, SyntaxToken token)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenPairWithOperations.cs (2)
39public SyntaxToken Token1 47public SyntaxToken Token2
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.cs (30)
30private readonly SegmentedList<SyntaxToken> _tokens; 62_tokens = new SegmentedList<SyntaxToken>(sizeOfList); 83var previousToken = _tokens[0]; 86var currentToken = _tokens[i]; 136public SyntaxToken GetToken(int index) 142public TokenData GetTokenData(SyntaxToken token) 156var previousToken = tokenData.Token.GetPreviousToken(includeZeroWidth: true); 174var nextToken = tokenData.Token.GetNextToken(includeZeroWidth: true); 183internal SyntaxToken FirstTokenOfBaseTokenLine(SyntaxToken token) 196public bool TwoTokensOriginallyOnSameLine(SyntaxToken token1, SyntaxToken token2) 199public bool TwoTokensOnSameLine(SyntaxToken token1, SyntaxToken token2) 202private bool TwoTokensOnSameLineWorker(SyntaxToken token1, SyntaxToken token2, Func<TokenData, TokenData, TriviaData> triviaDataGetter) 264public int GetCurrentColumn(SyntaxToken token) 274public int GetOriginalColumn(SyntaxToken token) 318public void GetTokenLength(SyntaxToken token, out int length, out bool onMultipleLines) 346public IEnumerable<ValueTuple<ValueTuple<SyntaxToken, SyntaxToken>, TriviaData>> GetTriviaDataWithTokenPair(CancellationToken cancellationToken) 351var token = this.FirstTokenInStream.Token; 354yield return ValueTuple.Create(ValueTuple.Create(default(SyntaxToken), token), trivia); 369var token = this.LastTokenInStream.Token; 372yield return ValueTuple.Create(ValueTuple.Create(token, default(SyntaxToken)), trivia); 476public bool IsFirstTokenOnLine(SyntaxToken token) 501private int GetTokenIndexInStream(SyntaxToken token) 556private sealed class TokenOrderComparer : IComparer<SyntaxToken> 562public int Compare(SyntaxToken x, SyntaxToken y)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TokenStream.Iterator.cs (7)
13public readonly struct Iterator(SegmentedList<SyntaxToken> tokensIncludingZeroWidth) 20private readonly SegmentedList<SyntaxToken> _tokensIncludingZeroWidth; 23private (int index, SyntaxToken currentToken, SyntaxToken nextToken) _current; 26public Enumerator(SegmentedList<SyntaxToken> tokensIncludingZeroWidth) 54public readonly (int index, SyntaxToken currentToken, SyntaxToken nextToken) Current => _current;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.cs (8)
36private readonly SyntaxToken _firstToken; 37private readonly SyntaxToken _lastToken; 48public abstract string GetTextBetween(SyntaxToken token1, SyntaxToken token2); 49public abstract int GetOriginalColumn(int tabSize, SyntaxToken token); 53public bool IsFirstToken(SyntaxToken token) 56public bool IsLastToken(SyntaxToken token) 69public IEnumerable<SyntaxToken> GetApplicableTokens(TextSpan textSpan)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.Debug.cs (2)
16public override string GetTextBetween(SyntaxToken token1, SyntaxToken token2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.Node.cs (7)
21public override int GetOriginalColumn(int tabSize, SyntaxToken token) 26var startToken = GetTokenWithLineBreaks(token); 34private static SyntaxToken GetTokenWithLineBreaks(SyntaxToken token) 36var currentToken = token.GetPreviousToken(includeZeroWidth: true); 51public override string GetTextBetween(SyntaxToken token1, SyntaxToken token2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.NodeAndText.cs (3)
24public override int GetOriginalColumn(int tabSize, SyntaxToken token) 33public override string GetTextBetween(SyntaxToken token1, SyntaxToken token2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.StructuredTrivia.cs (3)
33public override string GetTextBetween(SyntaxToken token1, SyntaxToken token2) 36public override int GetOriginalColumn(int tabSize, SyntaxToken token)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\FormattingExtensions.cs (7)
119SyntaxToken baseToken, 290internal static TextSpan GetSpan(SyntaxToken firstToken, SyntaxToken lastToken) 292var previousToken = firstToken.GetPreviousToken(); 293var nextToken = lastToken.GetNextToken(); 308internal static TextSpan GetElasticSpan(SyntaxToken token) 342this IndentBlockOperation operation, IHeaderFacts headerFacts, SyntaxNode root, SyntaxToken indentationAnchor)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\AbstractFormattingRule.cs (4)
47public virtual AdjustNewLinesOperation? GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation) 53public virtual AdjustSpacesOperation? GetAdjustSpacesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustSpacesOperation nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\BaseIndentationFormattingRule.cs (8)
17private readonly SyntaxToken _token1; 18private readonly SyntaxToken _token2; 133private static void SetInnermostNodeForSpan(SyntaxNode root, ref TextSpan span, out SyntaxToken token1, out SyntaxToken token2, out SyntaxNode? commonNode) 149private static void GetTokens(SyntaxNode root, TextSpan span, out SyntaxToken token1, out SyntaxToken token2) 168private static TextSpan GetSpanFromTokens(TextSpan span, SyntaxToken token1, SyntaxToken token2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\CompatAbstractFormattingRule.cs (12)
49public sealed override AdjustNewLinesOperation? GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation) 51var previousTokenCopy = previousToken; 52var currentTokenCopy = currentToken; 59public sealed override AdjustSpacesOperation? GetAdjustSpacesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustSpacesOperation nextOperation) 61var previousTokenCopy = previousToken; 62var currentTokenCopy = currentToken; 96public virtual AdjustNewLinesOperation? GetAdjustNewLinesOperationSlow(ref SyntaxToken previousToken, ref SyntaxToken currentToken, ref NextGetAdjustNewLinesOperation nextOperation) 102public virtual AdjustSpacesOperation? GetAdjustSpacesOperationSlow(ref SyntaxToken previousToken, ref SyntaxToken currentToken, ref NextGetAdjustSpacesOperation nextOperation)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\NextGetAdjustNewLinesOperation.cs (2)
18public AdjustNewLinesOperation? Invoke(in SyntaxToken previousToken, in SyntaxToken currentToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\NextGetAdjustSpacesOperation.cs (2)
18public AdjustSpacesOperation? Invoke(in SyntaxToken previousToken, in SyntaxToken currentToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\Operations\AlignTokensOperation.cs (4)
16internal AlignTokensOperation(SyntaxToken baseToken, IEnumerable<SyntaxToken> tokens, AlignTokensOption option) 26public SyntaxToken BaseToken { get; } 27public IEnumerable<SyntaxToken> Tokens { get; }
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\Operations\AnchorIndentationOperation.cs (5)
16internal AnchorIndentationOperation(SyntaxToken anchorToken, SyntaxToken endToken, TextSpan textSpan) 29public SyntaxToken AnchorToken { get; } 32public SyntaxToken StartToken => AnchorToken; 33public SyntaxToken EndToken { get; }
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\Operations\FormattingOperations.cs (24)
30public static AnchorIndentationOperation CreateAnchorIndentationOperation(SyntaxToken anchorToken, SyntaxToken endToken) 36public static AnchorIndentationOperation CreateAnchorIndentationOperation(SyntaxToken anchorToken, SyntaxToken endToken, TextSpan textSpan) 42public static SuppressOperation CreateSuppressOperation(SyntaxToken startToken, SyntaxToken endToken, SuppressOption option) 48private static SuppressOperation CreateSuppressOperation(SyntaxToken startToken, SyntaxToken endToken, TextSpan textSpan, SuppressOption option) 54public static IndentBlockOperation CreateIndentBlockOperation(SyntaxToken startToken, SyntaxToken endToken, int indentationDelta, IndentBlockOption option) 63public static IndentBlockOperation CreateIndentBlockOperation(SyntaxToken startToken, SyntaxToken endToken, TextSpan textSpan, int indentationDelta, IndentBlockOption option) 69public static IndentBlockOperation CreateRelativeIndentBlockOperation(SyntaxToken baseToken, SyntaxToken startToken, SyntaxToken endToken, int indentationDelta, IndentBlockOption option) 79public static IndentBlockOperation CreateRelativeIndentBlockOperation(SyntaxToken baseToken, SyntaxToken startToken, SyntaxToken endToken, TextSpan textSpan, int indentationDelta, IndentBlockOption option) 85public static AlignTokensOperation CreateAlignTokensOperation(SyntaxToken baseToken, IEnumerable<SyntaxToken> tokens, AlignTokensOption option) 183internal static AdjustNewLinesOperation? GetAdjustNewLinesOperation(IEnumerable<AbstractFormattingRule> formattingRules, SyntaxToken previousToken, SyntaxToken currentToken, SyntaxFormattingOptions options) 192internal static AdjustSpacesOperation? GetAdjustSpacesOperation(IEnumerable<AbstractFormattingRule> formattingRules, SyntaxToken previousToken, SyntaxToken currentToken, SyntaxFormattingOptions options)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\Operations\IndentBlockOperation.cs (8)
15internal IndentBlockOperation(SyntaxToken startToken, SyntaxToken endToken, TextSpan textSpan, int indentationDelta, IndentBlockOption option) 34internal IndentBlockOperation(SyntaxToken baseToken, SyntaxToken startToken, SyntaxToken endToken, TextSpan textSpan, int indentationDelta, IndentBlockOption option) 56public SyntaxToken BaseToken { get; } 61public SyntaxToken StartToken { get; } 62public SyntaxToken EndToken { get; }
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Rules\Operations\SuppressOperation.cs (4)
17public readonly SyntaxToken StartToken; 18public readonly SyntaxToken EndToken; 20internal SuppressOperation(SyntaxToken startToken, SyntaxToken endToken, TextSpan textSpan, SuppressOption option)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\TriviaEngine\AbstractTriviaFormatter.cs (10)
57protected readonly SyntaxToken Token1; 58protected readonly SyntaxToken Token2; 66SyntaxToken token1, 67SyntaxToken token2, 400GetTokensAtEdgeOfStructureTrivia(trivia1, trivia2, out var token1, out var token2); 464private void GetTokensAtEdgeOfStructureTrivia(SyntaxTrivia trivia1, SyntaxTrivia trivia2, out SyntaxToken token1, out SyntaxToken token2) 473var lastToken = trivia1.GetStructure()!.GetLastToken(includeZeroWidth: true); 487var firstToken = trivia2.GetStructure()!.GetFirstToken(includeZeroWidth: true);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Helpers\RemoveUnnecessaryImports\RemoveUnnecessaryImportsHelpers.cs (2)
15public static SyntaxToken StripNewLines(ISyntaxFacts syntaxFacts, SyntaxToken token)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.cs (2)
27protected abstract bool ShouldUseTokenIndenter(Indenter indenter, out SyntaxToken token); 32Indenter indenter, SyntaxToken? token, SyntaxTrivia? trivia);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\AbstractIndentation.Indenter.cs (6)
124private readonly SyntaxToken? TryGetPrecedingVisibleToken() 126var token = Root.FindToken(LineToBeIndented.Start); 169if (_service.ShouldUseTokenIndenter(this, out var token)) 206public IndentationResult GetIndentationOfToken(SyntaxToken token) 209public IndentationResult GetIndentationOfToken(SyntaxToken token, int addedSpaces) 229var token = Root.FindTokenFromEnd(LineToBeIndented.Start);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Indentation\ISmartTokenFormatter.cs (1)
14IList<TextChange> FormatToken(SyntaxToken token, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\FileBannerFacts\AbstractFileBannerFacts.cs (1)
170public ImmutableArray<SyntaxTrivia> GetFileBanner(SyntaxToken firstToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\FileBannerFacts\IFileBannerFacts.cs (1)
13ImmutableArray<SyntaxTrivia> GetFileBanner(SyntaxToken firstToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\HeaderFacts\AbstractHeaderFacts.cs (2)
73var tokenToRightOrIn = root.FindToken(position); 95var afterAttributesToken = root.FindTokenOnRightOfPosition(endOfAttributeLists);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SelectedMembers\AbstractSelectedMembers.cs (3)
32protected abstract ImmutableArray<(SyntaxNode declarator, SyntaxToken identifier)> GetDeclaratorsAndIdentifiers(TMemberDeclarationSyntax member); 65var token = textSpan.IsEmpty 167var token = root.FindToken(position);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SemanticFacts\ISemanticFacts.cs (2)
67ISymbol? GetDeclaredSymbol(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken); 100ImmutableArray<ISymbol> GetBestOrAllSymbols(SemanticModel semanticModel, SyntaxNode? node, SyntaxToken token, CancellationToken cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\AbstractDocumentationCommentService.cs (2)
155protected abstract SyntaxToken GetIdentifier(TXmlNameAttributeSyntax xmlName); 164foreach (var token in textTokens)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFacts.cs (57)
105SyntaxToken ParseToken(string text); 108bool IsVerbatimIdentifier(SyntaxToken token); 109bool IsOperator(SyntaxToken token); 110bool IsPredefinedOperator(SyntaxToken token); 111bool IsPredefinedOperator(SyntaxToken token, PredefinedOperator op); 113bool IsPredefinedType(SyntaxToken token); 114bool IsPredefinedType(SyntaxToken token, PredefinedType type); 132bool IsReservedKeyword(SyntaxToken token); 151bool IsContextualKeyword(SyntaxToken token); 157bool IsPreprocessorKeyword(SyntaxToken token); 160bool IsLiteral(SyntaxToken token); 161bool IsStringLiteralOrInterpolatedStringLiteral(SyntaxToken token); 163bool IsNumericLiteral(SyntaxToken token); 164bool IsVerbatimStringLiteral(SyntaxToken token); 186bool TryGetPredefinedType(SyntaxToken token, out PredefinedType type); 187bool TryGetPredefinedOperator(SyntaxToken token, out PredefinedOperator op); 199out SyntaxToken openParen, out SeparatedSyntaxList<TArgumentSyntax> arguments, out SyntaxToken closeParen) where TArgumentSyntax : SyntaxNode; 208void GetPartsOfAssignmentStatement(SyntaxNode statement, out SyntaxNode left, out SyntaxToken operatorToken, out SyntaxNode right); 209void GetPartsOfAssignmentExpressionOrStatement(SyntaxNode statement, out SyntaxNode left, out SyntaxToken operatorToken, out SyntaxNode right); 294SyntaxToken GetIdentifierOfSimpleName(SyntaxNode node); 295SyntaxToken GetIdentifierOfTypeDeclaration(SyntaxNode node); 296SyntaxToken GetIdentifierOfVariableDeclarator(SyntaxNode node); 358bool IsThisConstructorInitializer(SyntaxToken token); 359bool IsBaseConstructorInitializer(SyntaxToken token); 360bool IsQueryKeyword(SyntaxToken token); 377bool IsBindableToken(SyntaxToken token); 391bool AreEquivalent(SyntaxToken token1, SyntaxToken token2); 432SyntaxNode? TryGetBindableParent(SyntaxToken token); 461void GetPartsOfParenthesizedPattern(SyntaxNode node, out SyntaxToken openParen, out SyntaxNode pattern, out SyntaxToken closeParen); 462void GetPartsOfBinaryPattern(SyntaxNode node, out SyntaxNode left, out SyntaxToken operatorToken, out SyntaxNode right); 465void GetPartsOfRelationalPattern(SyntaxNode node, out SyntaxToken operatorToken, out SyntaxNode expression); 466void GetPartsOfUnaryPattern(SyntaxNode node, out SyntaxToken operatorToken, out SyntaxNode pattern); 468bool ContainsInterleavedDirective(TextSpan span, SyntaxToken token, CancellationToken cancellationToken); 480SyntaxToken? GetDeclarationIdentifierIfOverride(SyntaxToken token); 511void GetPartsOfArgumentList(SyntaxNode node, out SyntaxToken openParenToken, out SeparatedSyntaxList<SyntaxNode> arguments, out SyntaxToken closeParenToken); 515void GetPartsOfBinaryExpression(SyntaxNode node, out SyntaxNode left, out SyntaxToken operatorToken, out SyntaxNode right); 518void GetPartsOfConditionalAccessExpression(SyntaxNode node, out SyntaxNode expression, out SyntaxToken operatorToken, out SyntaxNode whenNotNull); 520void GetPartsOfGenericName(SyntaxNode node, out SyntaxToken identifier, out SeparatedSyntaxList<SyntaxNode> typeArguments); 521void GetPartsOfInterpolationExpression(SyntaxNode node, out SyntaxToken stringStartToken, out SyntaxList<SyntaxNode> contents, out SyntaxToken stringEndToken); 523void GetPartsOfIsPatternExpression(SyntaxNode node, out SyntaxNode left, out SyntaxToken isToken, out SyntaxNode right); 524void GetPartsOfMemberAccessExpression(SyntaxNode node, out SyntaxNode expression, out SyntaxToken operatorToken, out SyntaxNode name); 526void GetPartsOfObjectCreationExpression(SyntaxNode node, out SyntaxToken keyword, out SyntaxNode type, out SyntaxNode? argumentList, out SyntaxNode? initializer); 527void GetPartsOfImplicitObjectCreationExpression(SyntaxNode node, out SyntaxToken keyword, out SyntaxNode argumentList, out SyntaxNode? initializer); 528void GetPartsOfParameter(SyntaxNode node, out SyntaxToken identifier, out SyntaxNode? @default); 529void GetPartsOfParenthesizedExpression(SyntaxNode node, out SyntaxToken openParen, out SyntaxNode expression, out SyntaxToken closeParen); 530void GetPartsOfPrefixUnaryExpression(SyntaxNode node, out SyntaxToken operatorToken, out SyntaxNode operand); 531void GetPartsOfQualifiedName(SyntaxNode node, out SyntaxNode left, out SyntaxToken dotToken, out SyntaxNode right); 532void GetPartsOfUsingAliasDirective(SyntaxNode node, out SyntaxToken globalKeyword, out SyntaxToken alias, out SyntaxNode name); 557SyntaxToken GetTokenOfLiteralExpression(SyntaxNode node);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\ISyntaxFactsExtensions.cs (32)
94private static bool IsOnSingleLine(ISyntaxFacts syntaxFacts, SyntaxToken token, bool leading, bool trailing) 184foreach (var token in node.DescendantTokens()) 210public static bool SpansPreprocessorDirective(this ISyntaxFacts syntaxFacts, IEnumerable<SyntaxToken> tokens) 217var previousToken = default(SyntaxToken); 223foreach (var token in orderedTokens) 272public static bool IsReservedOrContextualKeyword(this ISyntaxFacts syntaxFacts, SyntaxToken token) 275public static bool IsWord(this ISyntaxFacts syntaxFacts, SyntaxToken token) 323SyntaxToken openParenToken; 325SyntaxToken closeParenToken; 357var previousToken = node.GetFirstToken().GetPreviousToken(); 368var nextToken = node.GetLastToken().GetNextToken(); 380private static bool IsWordOrNumber(this ISyntaxFacts syntaxFacts, SyntaxToken token) 401public static SyntaxToken GetOperatorTokenOfBinaryExpression(this ISyntaxFacts syntaxFacts, SyntaxNode node) 403syntaxFacts.GetPartsOfBinaryExpression(node, out _, out var token, out _); 429public static SyntaxToken GetOperatorTokenOfMemberAccessExpression(this ISyntaxFacts syntaxFacts, SyntaxNode node) 431syntaxFacts.GetPartsOfMemberAccessExpression(node, out _, out var operatorToken, out _); 456var afterAttributesToken = root.FindTokenOnRightOfPosition(endOfAttributeLists); 519public static SyntaxToken GetIdentifierOfGenericName(this ISyntaxFacts syntaxFacts, SyntaxNode node) 521syntaxFacts.GetPartsOfGenericName(node, out var identifier, out _); 525public static SyntaxToken GetIdentifierOfIdentifierName(this ISyntaxFacts syntaxFacts, SyntaxNode node) 528public static SyntaxToken GetIdentifierOfParameter(this ISyntaxFacts syntaxFacts, SyntaxNode node) 530syntaxFacts.GetPartsOfParameter(node, out var identifier, out _); 588public static SyntaxToken GetOperatorTokenOfPrefixUnaryExpression(this ISyntaxFacts syntaxFacts, SyntaxNode node) 590syntaxFacts.GetPartsOfPrefixUnaryExpression(node, out var operatorToken, out _); 702public static bool IsAwaitKeyword(this ISyntaxFacts syntaxFacts, SyntaxToken token) 705public static bool IsGlobalNamespaceKeyword(this ISyntaxFacts syntaxFacts, SyntaxToken token) 712public static bool IsCharacterLiteral(this ISyntaxFacts syntaxFacts, SyntaxToken token) 715public static bool IsStringLiteral(this ISyntaxFacts syntaxFacts, SyntaxToken token) 722public static bool IsIdentifier(this ISyntaxFacts syntaxFacts, SyntaxToken token) 725public static bool IsHashToken(this ISyntaxFacts syntaxFacts, SyntaxToken token) 728public static bool IsInterpolatedStringTextToken(this ISyntaxFacts syntaxFacts, SyntaxToken token)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\AnnotationTable.cs (11)
78public SyntaxToken WithAdditionalAnnotations(SyntaxToken token, params TAnnotation[] annotations) 90public SyntaxToken WithoutAnnotations(SyntaxToken token, params TAnnotation[] annotations) 114public IEnumerable<TAnnotation> GetAnnotations(SyntaxToken token) 126public IEnumerable<TSpecificAnnotation> GetAnnotations<TSpecificAnnotation>(SyntaxToken token) where TSpecificAnnotation : TAnnotation 138public bool HasAnnotations(SyntaxToken token) 150public bool HasAnnotations<TSpecificAnnotation>(SyntaxToken token) where TSpecificAnnotation : TAnnotation 162public bool HasAnnotation(SyntaxToken token, TAnnotation annotation) 177public IEnumerable<SyntaxToken> GetAnnotatedTokens(SyntaxNode node) 189public IEnumerable<SyntaxToken> GetAnnotatedTokens<TSpecificAnnotation>(SyntaxNode node) where TSpecificAnnotation : TAnnotation
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CommonFormattingHelpers.cs (31)
46public static IEnumerable<(SyntaxToken, SyntaxToken)> ConvertToTokenPairs(this SyntaxNode root, IReadOnlyList<TextSpan> spans) 82public static ValueTuple<SyntaxToken, SyntaxToken> ConvertToTokenPair(this SyntaxNode root, TextSpan textSpan) 87var startToken = root.FindToken(textSpan.Start); 104var endToken = (root.FullSpan.End <= textSpan.End) ? 128public static bool IsInvalidTokenRange(this SyntaxNode root, SyntaxToken startToken, SyntaxToken endToken) 146public static int GetTokenColumn(this SyntaxTree tree, SyntaxToken token, int tabSize) 157public static string GetText(this SourceText text, SyntaxToken token1, SyntaxToken token2) 160public static string GetTextBetween(SyntaxToken token1, SyntaxToken token2) 168public static void AppendTextBetween(SyntaxToken token1, SyntaxToken token2, StringBuilder builder) 193for (var token = token1.GetNextToken(includeZeroWidth: true); token.FullSpan.End <= token2.FullSpan.Start; token = token.GetNextToken(includeZeroWidth: true)) 201private static void AppendTextBetweenTwoAdjacentTokens(SyntaxToken token1, SyntaxToken token2, StringBuilder builder) 207private static void AppendLeadingTriviaText(SyntaxToken token, StringBuilder builder) 224private static void AppendPartialLeadingTriviaText(SyntaxToken token, StringBuilder builder, int token1FullSpanEnd) 242private static void AppendTrailingTriviaText(SyntaxToken token, StringBuilder builder) 260public static TextSpan GetSpanIncludingTrailingAndLeadingTriviaOfAdjacentTokens(SyntaxToken startToken, SyntaxToken endToken) 270private static int GetEndPositionOfSpan(SyntaxToken token) 272var nextToken = token.GetNextToken(); 295public static int GetStartPositionOfSpan(SyntaxToken token) 297var previousToken = token.GetPreviousToken(); 347public static bool HasAnyWhitespaceElasticTrivia(SyntaxToken previousToken, SyntaxToken currentToken) 362var startToken = root.FindToken(span.Start).GetPreviousToken(); 363var endToken = root.FindTokenFromEnd(span.End).GetNextToken();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\InterceptsLocationUtilities.cs (1)
18/// cref="SyntaxToken.FullSpan"/>).</param>
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (14)
98public TDeclarationNode AddAttributes<TDeclarationNode>(TDeclarationNode destination, IEnumerable<AttributeData> attributes, SyntaxToken? target, CodeGenerationContextInfo info, CancellationToken cancellationToken) where TDeclarationNode : SyntaxNode 107public TDeclarationNode UpdateDeclarationModifiers<TDeclarationNode>(TDeclarationNode declaration, IEnumerable<SyntaxToken> newModifiers, CodeGenerationContextInfo info, CancellationToken cancellationToken) where TDeclarationNode : SyntaxNode 133public abstract TDeclarationNode AddAttributes<TDeclarationNode>(TDeclarationNode destination, IEnumerable<AttributeData> attributes, SyntaxToken? target, TCodeGenerationContextInfo info, CancellationToken cancellationToken) where TDeclarationNode : SyntaxNode; 138public abstract TDeclarationNode UpdateDeclarationModifiers<TDeclarationNode>(TDeclarationNode declaration, IEnumerable<SyntaxToken> newModifiers, TCodeGenerationContextInfo info, CancellationToken cancellationToken) where TDeclarationNode : SyntaxNode; 522Func<SyntaxToken, bool> isComma, 528var previousToken = root.FindToken(attributeToRemove.FullSpan.Start - 1); 530var nextToken = root.FindToken(attributeToRemove.FullSpan.End + 1); 540var tokenToInsertTrivia = node.FindToken(position); 541var tokenWithInsertedTrivia = tokenToInsertTrivia.WithLeadingTrivia(trivia.Concat(tokenToInsertTrivia.LeadingTrivia)); 549ArrayBuilder<SyntaxToken> newModifierTokens, SyntaxTokenList modifiersList, 550Func<SyntaxToken, bool> isAccessibilityModifier) 552using var _ = ArrayBuilder<SyntaxToken>.GetInstance(out var updatedModifiersList); 554foreach (var modifier in modifiersList) 556SyntaxToken newModifier;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService_FindDeclaration.cs (6)
30protected static SyntaxToken GetEndToken(SyntaxNode node) 32var lastToken = node.GetLastToken(includeZeroWidth: true, includeSkipped: true); 36var nextToken = lastToken.GetNextToken(includeZeroWidth: true, includeSkipped: true); 48var start = node.GetFirstToken(); 49var end = GetEndToken(node); 152var token = location.FindToken(cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\ICodeGenerationService.cs (2)
94TDeclarationNode AddAttributes<TDeclarationNode>(TDeclarationNode destination, IEnumerable<AttributeData> attributes, SyntaxToken? target, CodeGenerationContextInfo info, CancellationToken cancellationToken) where TDeclarationNode : SyntaxNode; 109TDeclarationNode UpdateDeclarationModifiers<TDeclarationNode>(TDeclarationNode declaration, IEnumerable<SyntaxToken> newModifiers, CodeGenerationContextInfo info, CancellationToken cancellationToken) where TDeclarationNode : SyntaxNode;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\AbstractRefactoringHelpersService.cs (14)
155private static (SyntaxToken tokenToLeft, SyntaxToken tokenToRight) GetTokensToLeftAndRight( 161var tokenOnLocation = root.FindToken(location); 166var commaToken = tokenOnLocation; 178var nextToken = commaToken.GetNextToken(); 179var previousToken = commaToken.GetPreviousToken(); 191var tokenToRight = tokenOnLocation.Span.Contains(location) 197var tokenToLeft = default(SyntaxToken); 200var previousToken = tokenOnLocation.Span.End == location 233SourceText sourceText, SyntaxToken tokenOnLocation, int location) 267SyntaxToken tokenToLeft, 306SyntaxToken tokenToRightOrIn, 528var token = root.FindTokenOnRightOfPosition(position, true);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\CodeRefactoringHelpers.cs (2)
25/// Returns false if only and precisely one <see cref="SyntaxToken"/> is selected. In that case the <paramref 77var selectionStartToken = node.FindToken(selection.Start);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\AddParameterEditor.cs (1)
55var previousToken = firstParameter.GetFirstToken().GetPreviousToken();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ContextQuery\SyntaxContext.cs (4)
22public SyntaxToken LeftToken { get; } 28public SyntaxToken TargetToken { get; } 62SyntaxToken leftToken, 63SyntaxToken targetToken,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\DocumentExtensions.cs (1)
138var token = root.FindToken(span.Start);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\SyntaxGeneratorExtensions_Negate.cs (9)
148syntaxFacts.GetPartsOfBinaryExpression(expressionNode, out var leftOperand, out var operatorToken, out var rightOperand); 181var newToken = syntaxFacts.GetOperatorTokenOfBinaryExpression(newBinaryExpressionSyntax); 245syntaxFacts.GetPartsOfBinaryPattern(pattern, out var left, out var operatorToken, out var right); 257syntaxFacts.GetPartsOfBinaryPattern(newPattern, out _, out var newToken, out _); 258var newTokenWithTrivia = newToken.WithTriviaFrom(operatorToken); 267syntaxFacts.GetPartsOfIsPatternExpression(isExpression, out var left, out var isToken, out var pattern); 316syntaxFacts.GetPartsOfRelationalPattern(expressionNode, out var operatorToken, out var expression); 524var operatorToken = syntaxFacts.GetOperatorTokenOfPrefixUnaryExpression(expression); 556syntaxFacts.GetPartsOfUnaryPattern(pattern, out var opToken, out var subPattern);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\IIndentationService.cs (2)
30public static string GetPreferredIndentation(this SyntaxToken token, ParsedDocument document, IndentationOptions options, CancellationToken cancellationToken) 48var newToken = token.WithAdditionalAnnotations(annotation);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\AddImports\AddImportHelpers.cs (2)
35var firstToken = root.GetFirstToken(); 39var newFirstToken = firstToken.WithLeadingTrivia(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.cs (2)
34protected abstract SyntaxToken GetIdentifierOfVariableDeclarator(TVariableDeclaratorSyntax variableDeclarator); 241out var _, out var operatorToken, out var right);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\MoveDeclarationNearReference\AbstractMoveDeclarationNearReferenceService.State.cs (1)
171var previousToken = FirstStatementAffectedInInnermostBlock.GetFirstToken().GetPreviousToken();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\AbstractSemanticFactsService.cs (9)
25protected abstract SyntaxToken ToIdentifierToken(string identifier); 39public SyntaxToken GenerateUniqueName( 47public SyntaxToken GenerateUniqueName( 55public SyntaxToken GenerateUniqueLocalName( 63public SyntaxToken GenerateUniqueLocalName( 71public SyntaxToken GenerateUniqueName( 94public SyntaxToken GenerateUniqueName(string baseName, IEnumerable<string> usedNames) 197public ISymbol GetDeclaredSymbol(SemanticModel semanticModel, SyntaxToken token, CancellationToken cancellationToken) 242public ImmutableArray<ISymbol> GetBestOrAllSymbols(SemanticModel semanticModel, SyntaxNode node, SyntaxToken token, CancellationToken cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SemanticsFactsService\ISemanticFactsService.cs (6)
26SyntaxToken GenerateUniqueName( 30SyntaxToken GenerateUniqueName( 34SyntaxToken GenerateUniqueName(SemanticModel semanticModel, SyntaxNode location, SyntaxNode? container, string baseName, 37SyntaxToken GenerateUniqueLocalName( 41SyntaxToken GenerateUniqueLocalName( 45SyntaxToken GenerateUniqueName(string baseName, IEnumerable<string> usedNames);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\LanguageServices\SyntaxGeneratorInternalExtensions\SyntaxGeneratorInternal.cs (11)
37SyntaxNode? type, SyntaxToken identifier, SyntaxNode? initializer = null, bool isConst = false); 42public SyntaxNode LocalDeclarationStatement(SyntaxToken name, SyntaxNode initializer) 47public abstract SyntaxNode EqualsValueClause(SyntaxToken operatorToken, SyntaxNode value); 49public abstract SyntaxToken Identifier(string identifier); 71/// <see cref="LocalDeclarationStatement(SyntaxNode, SyntaxToken, SyntaxNode, bool)"/>. 76public abstract SyntaxToken InterpolatedStringTextToken(string content, string value); 77public abstract SyntaxNode InterpolatedStringText(SyntaxToken textToken); 79public abstract SyntaxNode InterpolatedStringExpression(SyntaxToken startToken, IEnumerable<SyntaxNode> content, SyntaxToken endToken); 108public abstract SyntaxNode IsPatternExpression(SyntaxNode expression, SyntaxToken isToken, SyntaxNode pattern); 121public abstract SyntaxNode UnaryPattern(SyntaxToken operatorToken, SyntaxNode pattern);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\AbstractSimplificationService.cs (6)
51public abstract SyntaxToken Expand(SyntaxToken token, SemanticModel semanticModel, Func<SyntaxNode, bool>? expandInsideNode, CancellationToken cancellationToken); 138var reducedTokensMap = new ConcurrentDictionary<SyntaxToken, SyntaxToken>(); 179ConcurrentDictionary<SyntaxToken, SyntaxToken> reducedTokensMap,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\ISimplificationService.cs (2)
24SyntaxToken Expand( 25SyntaxToken token,
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplificationHelpers.cs (3)
41public static SyntaxToken CopyAnnotations(SyntaxToken from, SyntaxToken to)
Microsoft.CodeAnalysis.Workspaces.UnitTests (14)
BatchFixAllProviderTests.cs (2)
126var token = root.FindToken(sourceSpan.Start); 127var newToken = SyntaxFactory.Literal(token.LeadingTrivia, replacement.ToString(), replacement, token.TrailingTrivia);
CodeCleanup\CodeCleanupTests.cs (2)
350var previousToken = member.GetFirstToken().GetPreviousToken().GetPreviousToken(); 351var nextToken = member.GetLastToken().GetNextToken().GetNextToken();
CodeCleanup\Extensions.cs (2)
20var previousToken = node.GetFirstToken(includeZeroWidth: true, includeSkipped: true, includeDirectives: true, includeDocumentationComments: true).GetPreviousToken(includeZeroWidth: true, includeSkipped: true, includeDirectives: true, includeDocumentationComments: true); 21var endToken = node.GetLastToken(includeZeroWidth: true, includeSkipped: true, includeDirectives: true, includeDocumentationComments: true).GetNextToken(includeZeroWidth: true, includeSkipped: true, includeDirectives: true, includeDocumentationComments: true);
SyntaxNodeTests.cs (2)
60var id = classDecl.Identifier; 66var id = varDecl.Identifier;
UtilityTest\FormattingRangeHelperTests.cs (6)
20var token1 = root.GetFirstToken(); 21var token2 = root.GetLastToken(); 30var token1 = root.GetFirstToken(); 31var token2 = root.GetLastToken(); 39var token = SyntaxFactory.ParseSyntaxTree("else\nFoo();").GetRoot().GetFirstToken(); 47var token = SyntaxFactory.ParseToken("else");
Microsoft.DotNet.GenFacades (1)
TypeParser.cs (1)
171foreach (SyntaxToken modifier in modifiers)
Microsoft.Extensions.Logging.Generators (1)
LoggerMessageGenerator.Parser.cs (1)
284foreach (SyntaxToken mod in method.Modifiers)
Microsoft.Interop.JavaScript.JSImportGenerator (3)
JSExportGenerator.cs (1)
295.WithModifiers(TokenList(new SyntaxToken[]{
JSImportGenerator.cs (2)
98SyntaxToken[] strippedTokens = new SyntaxToken[tokenList.Count];
Microsoft.Interop.LibraryImportGenerator (2)
LibraryImportGenerator.cs (2)
165SyntaxToken[] strippedTokens = new SyntaxToken[tokenList.Count];
Microsoft.Interop.LibraryImportGenerator.Downlevel (2)
DownlevelLibraryImportGenerator.cs (2)
107SyntaxToken[] strippedTokens = new SyntaxToken[tokenList.Count];
Microsoft.Interop.SourceGeneration (13)
ContainingSyntaxContext.cs (2)
15public readonly struct ContainingSyntax(SyntaxTokenList modifiers, SyntaxKind typeKind, SyntaxToken identifier, TypeParameterListSyntax? typeParameters) : IEquatable<ContainingSyntax> 19public SyntaxToken Identifier { get; init; } = identifier.WithoutTrivia();
Marshalling\MarshallerHelpers.cs (1)
453public static SyntaxToken GetManagedArgumentRefKindKeyword(TypePositionInfo typeInfo)
SyntaxEquivalentComparer.cs (4)
9public sealed class SyntaxEquivalentComparer : IEqualityComparer<SyntaxNode>, IEqualityComparer<SyntaxToken> 27public bool Equals(SyntaxToken x, SyntaxToken y) 37public int GetHashCode(SyntaxToken obj)
SyntaxExtensions.cs (4)
76SyntaxToken[] strippedTokens = new SyntaxToken[tokenList.Count]; 86List<SyntaxToken> strippedTokens = new(); 120public static bool IsInPartialContext(this TypeDeclarationSyntax syntax, [NotNullWhen(false)] out SyntaxToken? nonPartialIdentifier)
Utils\SyntaxFactoryExtensions.cs (2)
80private static readonly SyntaxToken _span = Identifier(TypeNames.System_Span); 83private static readonly SyntaxToken _readonlySpan = Identifier(TypeNames.System_ReadOnlySpan);
Microsoft.ML.InternalCodeAnalyzer (7)
NameAnalyzer.cs (4)
32internal static Diagnostic CreateDiagnostic(DiagnosticDescriptor rule, SyntaxToken identifier, NameType desired, params object[] args) 134private static void CheckPascal(SyntaxToken token, SyntaxNodeAnalysisContext context) 149foreach (var mod in node.Modifiers) 158var identifier = variable.Identifier;
NameFixProvider.cs (1)
60var token = root.FindToken(diagnostic.Location.SourceSpan.Start);
ParameterVariableNameAnalyzer.cs (1)
54private static void AnalyzeCore(SyntaxNodeAnalysisContext context, SyntaxToken identifier, string type)
TypeParamNameAnalyzer.cs (1)
42var identifier = node.Identifier;
Microsoft.VisualStudio.LanguageServices (10)
LanguageService\AbstractLanguageService`2.IVsLanguageTextOps.cs (1)
94var prevToken = root.FindToken(start).GetPreviousToken();
Venus\ContainedDocument.cs (3)
973var token = root.FindToken(end); 977if (service.TryGetCorrespondingOpenBrace(token, out var openBrace) && !textSpan.Contains(openBrace.Span)) 997var token = root.FindToken(end, findInsideTrivia: true);
Venus\ContainedDocumentPreserveFormattingRule.cs (4)
19public override AdjustSpacesOperation GetAdjustSpacesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustSpacesOperation nextOperation) 30public override AdjustNewLinesOperation GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation)
Venus\IVenusBraceMatchingService.cs (2)
12bool TryGetCorrespondingOpenBrace(SyntaxToken token, out SyntaxToken openBrace);
Microsoft.VisualStudio.LanguageServices.CSharp (36)
CodeModel\CSharpCodeModelService.cs (11)
879var newIdentifier = SyntaxFactory.Identifier(name); 926private static SyntaxNode SetNameOfClassOrStruct(SyntaxNode node, SyntaxToken newIdentifier) 1245var firstToken = node.GetFirstToken(); 3198var startToken = root.FindToken(span.Start).GetPreviousToken(); 3204var endToken = root.FindToken(span.End).GetNextToken(); 3246var separator = enumDeclaration.Members.GetSeparator(index - 1); 3289var lastToken = newMember.GetLastToken(); 3290var nextToken = lastToken.GetNextToken(); 3301var firstToken = newMember.GetFirstToken(); 3349var firstToken = container.GetFirstToken(); 3692var identifier = typeDeclaration.Identifier;
CodeModel\CSharpCodeModelService.NodeLocator.cs (5)
135private static VirtualTreePoint GetBodyStartPoint(SourceText text, SyntaxToken openBrace) 147private static VirtualTreePoint GetBodyStartPoint(SourceText text, LineFormattingOptions options, SyntaxToken openBrace, SyntaxToken closeBrace, int memberStartColumn) 156var tokenAfterOpenBrace = openBrace.GetNextToken(); 211private static VirtualTreePoint GetBodyEndPoint(SourceText text, SyntaxToken closeBrace)
CodeModel\EndRegionFormattingRule.cs (4)
21private static bool IsAfterEndRegionBeforeMethodDeclaration(SyntaxToken previousToken) 25var previousPreviousToken = previousToken.GetPreviousToken(); 32public override AdjustNewLinesOperation GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation)
CodeModel\ModifierFlagsExtensions.cs (1)
111var newModifierList = new List<SyntaxToken>();
CodeModel\ParameterFlagsExtensions.cs (1)
18foreach (var modifier in parameter.Modifiers)
CodeModel\SyntaxNodeExtensions.cs (1)
61public static SyntaxToken GetFirstTokenAfterAttributes(this SyntaxNode node)
LanguageService\CSharpHelpContextService.cs (9)
95private string? TryGetText(SyntaxToken token, SemanticModel semanticModel, Document document, CancellationToken cancellationToken) 111private static bool TryGetTextForSpecialCharacters(SyntaxToken token, [NotNullWhen(true)] out string? text) 157SyntaxToken token, SemanticModel semanticModel, Document document, CancellationToken cancellationToken, 220private static bool TryGetTextForOperator(SyntaxToken token, Document document, [NotNullWhen(true)] out string? text) 344private static bool TryGetTextForPreProcessor(SyntaxToken token, [NotNullWhen(true)] out string? text) 376private static bool TryGetTextForContextualKeyword(SyntaxToken token, [NotNullWhen(true)] out string? text) 426private static bool TryGetTextForCombinationKeyword(SyntaxToken token, [NotNullWhen(true)] out string? text) 457static bool ModifiersContains(SyntaxToken token, SyntaxKind kind) 463private static bool TryGetTextForKeyword(SyntaxToken token, [NotNullWhen(true)] out string? text)
Utilities\BlankLineInGeneratedMethodFormattingRule.cs (2)
21public override AdjustNewLinesOperation GetAdjustNewLinesOperation(in SyntaxToken previousToken, in SyntaxToken currentToken, in NextGetAdjustNewLinesOperation nextOperation)
Venus\CSharpVenusBraceMatchingService.cs (2)
25public bool TryGetCorrespondingOpenBrace(SyntaxToken token, out SyntaxToken openBrace)
Microsoft.VisualStudio.LanguageServices.VisualBasic (11)
CodeModel\ModifierFlagsExtensions.vb (2)
130Dim newModifierList = New List(Of SyntaxToken) 151Dim newModifierList = New List(Of SyntaxToken)
CodeModel\VisualBasicCodeModelService.vb (3)
961Dim identifier As SyntaxToken = SyntaxFactory.Identifier(name) 1800Dim newModifier As SyntaxToken 2025Dim newModifierList = New List(Of SyntaxToken)
Help\VisualBasicHelpContextService.vb (1)
67Private Shared Function TokenIsHelpKeyword(token As SyntaxToken) As Boolean
Help\VisualBasicHelpContextService.Visitor.vb (3)
786Private Function SelectCombinationModifier(token As SyntaxToken, list As SyntaxTokenList) As Boolean 798Private Function SelectCombinationModifier(token As SyntaxToken, list As SyntaxTokenList, kind1 As SyntaxKind, kind2 As SyntaxKind, helpKeyword As String) As Boolean 943Private Function TryGetDeclaredSymbol(token As SyntaxToken) As Boolean
Venus\VisualBasicVenusBraceMatchingService.vb (2)
23Public Function TryGetCorrespondingOpenBrace(token As SyntaxToken, ByRef openBrace As SyntaxToken) As Boolean Implements IVenusBraceMatchingService.TryGetCorrespondingOpenBrace
System.Private.CoreLib.Generators (3)
IntrinsicsInSystemPrivateCoreLibAnalyzer.cs (3)
250if (binaryExpression.OperatorToken is SyntaxToken operatorToken && operatorToken.ValueText == "&&") 323if (binaryExpression.OperatorToken is SyntaxToken operatorToken && operatorToken.ValueText == "&&") 337else if (binaryExpression.OperatorToken is SyntaxToken operatorToken2 && operatorToken2.ValueText == "||")
System.Text.Json.SourceGeneration (1)
JsonSourceGenerator.Parser.cs (1)
178foreach (SyntaxToken modifier in currentType.Modifiers)