53 references to ScopedKeyword
Microsoft.CodeAnalysis.CSharp (31)
_generated\0\Syntax.xml.Main.Generated.cs (2)
2531if (scopedKeyword.Kind() != SyntaxKind.ScopedKeyword) throw new ArgumentException(nameof(scopedKeyword)); 2538=> SyntaxFactory.ScopedType(SyntaxFactory.Token(SyntaxKind.ScopedKeyword), type);
_generated\1\Syntax.xml.Internal.Generated.cs (2)
28720if (scopedKeyword.Kind != SyntaxKind.ScopedKeyword) throw new ArgumentException(nameof(scopedKeyword)); 34119if (scopedKeyword.Kind != SyntaxKind.ScopedKeyword) throw new ArgumentException(nameof(scopedKeyword));
Parser\LanguageParser.cs (11)
5001=> IsParameterModifierExcludingScoped(token) || token.ContextualKind == SyntaxKind.ScopedKeyword; 5041modifiers.Add(this.EatContextualToken(SyntaxKind.ScopedKeyword)); 5057modifiers.Add(this.EatContextualToken(SyntaxKind.ScopedKeyword)); 5213if (modifiers is [.., SyntaxToken { Kind: SyntaxKind.ScopedKeyword } scopedKeyword]) 8552&& (tk is not (SyntaxKind.AsyncKeyword or SyntaxKind.ScopedKeyword) || ShouldContextualKeywordBeTreatedAsModifier(parsingStatementNotDeclaration: true)); 9644if (this.CurrentToken.ContextualKind == SyntaxKind.ScopedKeyword) 9853if (this.CurrentToken.ContextualKind == SyntaxKind.ScopedKeyword) 10595if (this.CurrentToken.ContextualKind != SyntaxKind.ScopedKeyword) 10607var scopedKeyword = this.EatContextualToken(SyntaxKind.ScopedKeyword); 10645? this.EatContextualToken(SyntaxKind.ScopedKeyword) 11917? EatContextualToken(SyntaxKind.ScopedKeyword)
SymbolDisplay\SymbolDisplayVisitor.cs (2)
247AddKeyword(SyntaxKind.ScopedKeyword); 262AddKeyword(SyntaxKind.ScopedKeyword);
SymbolDisplay\SymbolDisplayVisitor.Members.cs (2)
855AddKeyword(SyntaxKind.ScopedKeyword); 876AddKeyword(SyntaxKind.ScopedKeyword);
Symbols\Source\ModifierUtils.cs (3)
123Debug.Assert(modifier.Kind() == SyntaxKind.ScopedKeyword); 351return SyntaxFacts.GetText(SyntaxKind.ScopedKeyword); 405case SyntaxKind.ScopedKeyword:
Symbols\Source\ParameterHelpers.cs (4)
767case SyntaxKind.ScopedKeyword when parameterContext is not ParameterContext.FunctionPointer: 787if (nextModifier.Kind() is not (SyntaxKind.RefKeyword or SyntaxKind.OutKeyword or SyntaxKind.InKeyword or SyntaxKind.ScopedKeyword)) 811case SyntaxKind.ScopedKeyword when parameterContext is ParameterContext.FunctionPointer: 1176case SyntaxKind.ScopedKeyword:
Symbols\Source\SourceMemberContainerSymbol.cs (1)
536|| reportIfContextual(SyntaxKind.ScopedKeyword, MessageID.IDS_FeatureRefFields, ErrorCode.ERR_ScopedTypeNameDisallowed)
Symbols\Source\SourceMemberFieldSymbol.cs (1)
467diagnostics.Add(ErrorCode.ERR_BadMemberFlag, ErrorLocation, SyntaxFacts.GetText(SyntaxKind.ScopedKeyword));
Syntax\SyntaxKindFacts.cs (3)
1299case SyntaxKind.ScopedKeyword: 1427return SyntaxKind.ScopedKeyword; 1879case SyntaxKind.ScopedKeyword:
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
91public static readonly SyntaxToken ScopedKeyword = Token(SyntaxKind.ScopedKeyword);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (4)
1115if (token.Kind() is SyntaxKind.RefKeyword or SyntaxKind.InKeyword or SyntaxKind.ReadOnlyKeyword or SyntaxKind.OutKeyword or SyntaxKind.ThisKeyword or SyntaxKind.ParamsKeyword or SyntaxKind.ScopedKeyword) 1123previousModifier = SyntaxKind.ScopedKeyword; 1273else if (token.IsKind(SyntaxKind.ScopedKeyword) && token.Parent.IsKind(SyntaxKind.Parameter)) 1879if (token.IsKind(SyntaxKind.ScopedKeyword) && token.Parent is IncompleteMemberSyntax or ScopedTypeSyntax)
Microsoft.CodeAnalysis.CSharp.Features (5)
Completion\KeywordRecommenders\InKeywordRecommender.cs (1)
34if (previousModifier is SyntaxKind.None or SyntaxKind.ScopedKeyword)
Completion\KeywordRecommenders\OutKeywordRecommender.cs (1)
29previousModifier is SyntaxKind.None or SyntaxKind.ScopedKeyword;
Completion\KeywordRecommenders\RefKeywordRecommender.cs (2)
168if (previousModifier is SyntaxKind.None or SyntaxKind.ScopedKeyword) 226case SyntaxKind.ScopedKeyword:
Completion\KeywordRecommenders\ScopedKeywordRecommender.cs (1)
11internal sealed class ScopedKeywordRecommender() : AbstractSyntacticSingleKeywordRecommender(SyntaxKind.ScopedKeyword)
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
91public static readonly SyntaxToken ScopedKeyword = Token(SyntaxKind.ScopedKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (4)
1115if (token.Kind() is SyntaxKind.RefKeyword or SyntaxKind.InKeyword or SyntaxKind.ReadOnlyKeyword or SyntaxKind.OutKeyword or SyntaxKind.ThisKeyword or SyntaxKind.ParamsKeyword or SyntaxKind.ScopedKeyword) 1123previousModifier = SyntaxKind.ScopedKeyword; 1273else if (token.IsKind(SyntaxKind.ScopedKeyword) && token.Parent.IsKind(SyntaxKind.Parameter)) 1879if (token.IsKind(SyntaxKind.ScopedKeyword) && token.Parent is IncompleteMemberSyntax or ScopedTypeSyntax)
Microsoft.Interop.SourceGeneration (2)
Marshalling\MarshallerHelpers.cs (1)
392tokens = tokens.Add(Token(SyntaxKind.ScopedKeyword));
Marshalling\StatefulMarshallingStrategy.cs (1)
142declaration = declaration.AddModifiers(Token(SyntaxKind.ScopedKeyword));
Roslyn.Diagnostics.CSharp.Analyzers (5)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
91public static readonly SyntaxToken ScopedKeyword = Token(SyntaxKind.ScopedKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (4)
1115if (token.Kind() is SyntaxKind.RefKeyword or SyntaxKind.InKeyword or SyntaxKind.ReadOnlyKeyword or SyntaxKind.OutKeyword or SyntaxKind.ThisKeyword or SyntaxKind.ParamsKeyword or SyntaxKind.ScopedKeyword) 1123previousModifier = SyntaxKind.ScopedKeyword; 1273else if (token.IsKind(SyntaxKind.ScopedKeyword) && token.Parent.IsKind(SyntaxKind.Parameter)) 1879if (token.IsKind(SyntaxKind.ScopedKeyword) && token.Parent is IncompleteMemberSyntax or ScopedTypeSyntax)