120 references to RefKeyword
Microsoft.AspNetCore.App.Analyzers (1)
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (1)
169previous.IsKind(SyntaxKind.RefKeyword) ||
Microsoft.CodeAnalysis.CSharp (61)
Declarations\DeclarationTreeBuilder.cs (1)
802else if (modifier.IsKind(SyntaxKind.RefKeyword) && kind is DeclarationKind.Struct or DeclarationKind.RecordStruct)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\Syntax.xml.Main.Generated.cs (8)
2532if (refKeyword.Kind() != SyntaxKind.RefKeyword) throw new ArgumentException(nameof(refKeyword)); 2545=> SyntaxFactory.RefType(SyntaxFactory.Token(SyntaxKind.RefKeyword), default, type); 3205case SyntaxKind.RefKeyword: 3276if (refKeyword.Kind() != SyntaxKind.RefKeyword) throw new ArgumentException(nameof(refKeyword)); 3283=> SyntaxFactory.RefExpression(SyntaxFactory.Token(SyntaxKind.RefKeyword), expression); 5422if (refKeyword.Kind() != SyntaxKind.RefKeyword) throw new ArgumentException(nameof(refKeyword)); 5429=> SyntaxFactory.RefStructConstraint(SyntaxFactory.Token(SyntaxKind.RefKeyword), SyntaxFactory.Token(SyntaxKind.StructKeyword)); 6106case SyntaxKind.RefKeyword:
Parser\DocumentationCommentParser.cs (3)
1298case SyntaxKind.RefKeyword: 1319case SyntaxKind.RefKeyword: 1329if (refKindOpt.Kind != SyntaxKind.RefKeyword)
Parser\LanguageParser.cs (26)
1322case SyntaxKind.RefKeyword: 1450Debug.Assert(this.CurrentToken.Kind == SyntaxKind.RefKeyword); 1467Debug.Assert(this.CurrentToken.Kind == SyntaxKind.RefKeyword); 2340return (this.CurrentToken.ContextualKind == SyntaxKind.AllowsKeyword && PeekToken(1).Kind == SyntaxKind.RefKeyword) || this.IsTrueIdentifier(); 2393PeekToken(1).Kind == SyntaxKind.RefKeyword) 2403this.EatToken(SyntaxKind.RefKeyword), 2406if (this.CurrentToken.Kind == SyntaxKind.CommaToken && PeekToken(1).Kind == SyntaxKind.RefKeyword) 2475case SyntaxKind.RefKeyword: 4421var refKeyword = this.CurrentToken.Kind == SyntaxKind.RefKeyword && !this.IsPossibleLambdaExpression(Precedence.Expression) 5007case SyntaxKind.RefKeyword: 5609var refKeyword = isLocalOrField && !isConst && this.CurrentToken.Kind == SyntaxKind.RefKeyword && !this.IsPossibleLambdaExpression(Precedence.Expression) 7202if (this.CurrentToken.Kind == SyntaxKind.RefKeyword) 7571if (this.CurrentToken.Kind == SyntaxKind.RefKeyword) 8514if (tk == SyntaxKind.RefKeyword || 8667if (tk == SyntaxKind.RefKeyword) 9254case SyntaxKind.RefKeyword: 9641if (this.PeekToken(1).Kind == SyntaxKind.RefKeyword) 9652else if (this.CurrentToken.Kind == SyntaxKind.RefKeyword) 11129case SyntaxKind.RefKeyword: 11361return SyntaxFacts.IsPrefixUnaryExpression(kind) && kind is not SyntaxKind.RefKeyword and not SyntaxKind.OutKeyword; 11844if (operatorExpressionKind == SyntaxKind.SimpleAssignmentExpression && CurrentToken.Kind == SyntaxKind.RefKeyword && 12071case SyntaxKind.RefKeyword: 12575case SyntaxKind.RefKeyword: 12595!(this.CurrentToken.Kind == SyntaxKind.RefKeyword && 13866case SyntaxKind.RefKeyword: 13992case SyntaxKind.RefKeyword:
SymbolDisplay\SymbolDisplayVisitor.cs (1)
251AddKeyword(SyntaxKind.RefKeyword);
SymbolDisplay\SymbolDisplayVisitor.Members.cs (4)
1117AddKeyword(SyntaxKind.RefKeyword); 1131AddKeyword(SyntaxKind.RefKeyword); 1157AddKeyword(SyntaxKind.RefKeyword); 1165AddKeyword(SyntaxKind.RefKeyword);
SymbolDisplay\SymbolDisplayVisitor.Types.cs (2)
794AddKeyword(SyntaxKind.RefKeyword); 990AddKeyword(SyntaxKind.RefKeyword);
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (2)
44case SyntaxKind.RefKeyword when refKind == RefKind.None: 58case SyntaxKind.RefKeyword:
Symbols\RefKindExtensions.cs (1)
25case SyntaxKind.RefKeyword:
Symbols\Source\ModifierUtils.cs (3)
351return SyntaxFacts.GetText(SyntaxKind.RefKeyword); 407case SyntaxKind.RefKeyword: 507var refIndex = modifiers.IndexOf(SyntaxKind.RefKeyword);
Symbols\Source\ParameterHelpers.cs (8)
637case SyntaxKind.RefKeyword: 649addERR_ParamsCantBeWithModifier(diagnostics, modifier, SyntaxKind.RefKeyword); 684addERR_BadParameterModifiers(diagnostics, modifier, SyntaxKind.RefKeyword); 711addERR_BadParameterModifiers(diagnostics, modifier, SyntaxKind.RefKeyword); 755addERR_BadParameterModifiers(diagnostics, modifier, SyntaxKind.RefKeyword); 787if (nextModifier.Kind() is not (SyntaxKind.RefKeyword or SyntaxKind.OutKeyword or SyntaxKind.InKeyword or SyntaxKind.ScopedKeyword)) 799else if (previousModifier?.Kind() != SyntaxKind.RefKeyword) 1153case SyntaxKind.RefKeyword:
Syntax\SyntaxKindFacts.cs (2)
997return SyntaxKind.RefKeyword; 1698case SyntaxKind.RefKeyword:
Microsoft.CodeAnalysis.CSharp.CodeStyle (7)
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePatternCombinators\AnalyzedPattern.cs (1)
167if (target.Syntax.DescendantNodesAndSelf().OfType<ArgumentSyntax>().Any(a => a.RefKindKeyword.Kind() is SyntaxKind.RefKeyword))
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
86public static readonly SyntaxToken RefKeyword = Token(SyntaxKind.RefKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ArgumentSyntaxExtensions.cs (2)
27SyntaxKind.RefKeyword => RefKind.Ref, 87if (argument.RefOrOutKeyword.Kind() == SyntaxKind.RefKeyword &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
213ArgumentSyntax { RefOrOutKeyword.RawKind: (int)SyntaxKind.RefKeyword })
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
100case SyntaxKind.RefKeyword:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (1)
136SyntaxKind.RefKeyword => Modifiers.Ref,
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (6)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (5)
738syntaxTree.IsAfterKeyword(position, SyntaxKind.RefKeyword, cancellationToken) || 1115if (token.Kind() is SyntaxKind.RefKeyword or SyntaxKind.InKeyword or SyntaxKind.ReadOnlyKeyword or SyntaxKind.OutKeyword or SyntaxKind.ThisKeyword or SyntaxKind.ParamsKeyword or SyntaxKind.ScopedKeyword) 1295if (token.Kind() is SyntaxKind.RefKeyword or SyntaxKind.InKeyword or SyntaxKind.OutKeyword) 1803if (token.Kind() is SyntaxKind.RefKeyword or SyntaxKind.ReadOnlyKeyword) 2446if (token.Kind() is SyntaxKind.RefKeyword or SyntaxKind.InKeyword or SyntaxKind.OutKeyword)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\SyntaxKindSet.cs (1)
27SyntaxKind.RefKeyword
Microsoft.CodeAnalysis.CSharp.Features (18)
Completion\CompletionProviders\CompletionUtilities.cs (3)
365if (targetToken.Kind() is not (SyntaxKind.RefKeyword or SyntaxKind.ReadOnlyKeyword)) 379(targetToken.Kind() == SyntaxKind.RefKeyword || 380targetToken.GetPreviousToken().Kind() == SyntaxKind.RefKeyword);
Completion\CompletionProviders\CrefCompletionProvider.cs (1)
154return token is (kind: SyntaxKind.CommaToken or SyntaxKind.RefKeyword or SyntaxKind.OutKeyword);
Completion\KeywordRecommenders\AbstractSpecialTypePreselectingKeywordRecommender.cs (2)
44if (!syntaxTree.IsAfterKeyword(position, SyntaxKind.RefKeyword, cancellationToken) && 58if (token.Kind() != SyntaxKind.RefKeyword)
Completion\KeywordRecommenders\ClosedKeywordRecommender.cs (1)
17.Where(s => s is not (SyntaxKind.ClosedKeyword or SyntaxKind.AbstractKeyword or SyntaxKind.SealedKeyword or SyntaxKind.StaticKeyword or SyntaxKind.ReadOnlyKeyword or SyntaxKind.RefKeyword))
Completion\KeywordRecommenders\ReadOnlyKeywordRecommender.cs (1)
42=> context.TargetToken.IsKind(SyntaxKind.RefKeyword) &&
Completion\KeywordRecommenders\RefKeywordRecommender.cs (1)
16internal sealed class RefKeywordRecommender() : AbstractSyntacticSingleKeywordRecommender(SyntaxKind.RefKeyword)
Completion\KeywordRecommenders\StructKeywordRecommender.cs (2)
22SyntaxKind.RefKeyword, 57if (token.Kind() == SyntaxKind.RefKeyword &&
Completion\KeywordRecommenders\ThisKeywordRecommender.cs (1)
43or SyntaxKind.RefKeyword
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (1)
402? SyntaxKind.RefKeyword
SignatureHelp\AbstractGenericNameSignatureHelpProvider.cs (1)
273parts.Add(Keyword(SyntaxKind.RefKeyword));
SignatureHelp\ElementAccessExpressionSignatureHelpProvider.cs (2)
246result.Add(Keyword(SyntaxKind.RefKeyword)); 251result.Add(Keyword(SyntaxKind.RefKeyword));
Snippets\CSharpStructSnippetProvider.cs (1)
28SyntaxKind.RefKeyword,
src\roslyn\src\Analyzers\CSharp\Analyzers\UsePatternCombinators\AnalyzedPattern.cs (1)
167if (target.Syntax.DescendantNodesAndSelf().OfType<ArgumentSyntax>().Any(a => a.RefKindKeyword.Kind() is SyntaxKind.RefKeyword))
Microsoft.CodeAnalysis.CSharp.Workspaces (12)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
86public static readonly SyntaxToken RefKeyword = Token(SyntaxKind.RefKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ArgumentSyntaxExtensions.cs (2)
27SyntaxKind.RefKeyword => RefKind.Ref, 87if (argument.RefOrOutKeyword.Kind() == SyntaxKind.RefKeyword &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
213ArgumentSyntax { RefOrOutKeyword.RawKind: (int)SyntaxKind.RefKeyword })
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
100case SyntaxKind.RefKeyword:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (1)
136SyntaxKind.RefKeyword => Modifiers.Ref,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (5)
738syntaxTree.IsAfterKeyword(position, SyntaxKind.RefKeyword, cancellationToken) || 1115if (token.Kind() is SyntaxKind.RefKeyword or SyntaxKind.InKeyword or SyntaxKind.ReadOnlyKeyword or SyntaxKind.OutKeyword or SyntaxKind.ThisKeyword or SyntaxKind.ParamsKeyword or SyntaxKind.ScopedKeyword) 1295if (token.Kind() is SyntaxKind.RefKeyword or SyntaxKind.InKeyword or SyntaxKind.OutKeyword) 1803if (token.Kind() is SyntaxKind.RefKeyword or SyntaxKind.ReadOnlyKeyword) 2446if (token.Kind() is SyntaxKind.RefKeyword or SyntaxKind.InKeyword or SyntaxKind.OutKeyword)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\SyntaxKindSet.cs (1)
27SyntaxKind.RefKeyword
Microsoft.CodeAnalysis.Razor.Compiler (1)
Language\Legacy\NativeCSharpTokenizer.cs (1)
48CSharpSyntaxKind.RefKeyword,
Microsoft.Gen.ContextualOptions (1)
Parser.cs (1)
45.Where(modifier => modifier.IsKind(SyntaxKind.RefKeyword))
Roslyn.Diagnostics.CSharp.Analyzers (13)
CSharpExposeMemberForTesting.cs (1)
40var refKeyword = SyntaxFactory.Token(SyntaxKind.RefKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
86public static readonly SyntaxToken RefKeyword = Token(SyntaxKind.RefKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ArgumentSyntaxExtensions.cs (2)
27SyntaxKind.RefKeyword => RefKind.Ref, 87if (argument.RefOrOutKeyword.Kind() == SyntaxKind.RefKeyword &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
213ArgumentSyntax { RefOrOutKeyword.RawKind: (int)SyntaxKind.RefKeyword })
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
100case SyntaxKind.RefKeyword:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (1)
136SyntaxKind.RefKeyword => Modifiers.Ref,
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (5)
738syntaxTree.IsAfterKeyword(position, SyntaxKind.RefKeyword, cancellationToken) || 1115if (token.Kind() is SyntaxKind.RefKeyword or SyntaxKind.InKeyword or SyntaxKind.ReadOnlyKeyword or SyntaxKind.OutKeyword or SyntaxKind.ThisKeyword or SyntaxKind.ParamsKeyword or SyntaxKind.ScopedKeyword) 1295if (token.Kind() is SyntaxKind.RefKeyword or SyntaxKind.InKeyword or SyntaxKind.OutKeyword) 1803if (token.Kind() is SyntaxKind.RefKeyword or SyntaxKind.ReadOnlyKeyword) 2446if (token.Kind() is SyntaxKind.RefKeyword or SyntaxKind.InKeyword or SyntaxKind.OutKeyword)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Utilities\SyntaxKindSet.cs (1)
27SyntaxKind.RefKeyword