53 references to ScopedKeyword
Microsoft.CodeAnalysis.CSharp (31)
_generated\0\Syntax.xml.Main.Generated.cs (2)
2555if (scopedKeyword.Kind() != SyntaxKind.ScopedKeyword) throw new ArgumentException(nameof(scopedKeyword)); 2562=> SyntaxFactory.ScopedType(SyntaxFactory.Token(SyntaxKind.ScopedKeyword), type);
_generated\1\Syntax.xml.Internal.Generated.cs (2)
29123if (scopedKeyword.Kind != SyntaxKind.ScopedKeyword) throw new ArgumentException(nameof(scopedKeyword)); 34545if (scopedKeyword.Kind != SyntaxKind.ScopedKeyword) throw new ArgumentException(nameof(scopedKeyword));
Parser\LanguageParser.cs (11)
5039=> IsParameterModifierExcludingScoped(token) || token.ContextualKind == SyntaxKind.ScopedKeyword; 5079modifiers.Add(this.EatContextualToken(SyntaxKind.ScopedKeyword)); 5095modifiers.Add(this.EatContextualToken(SyntaxKind.ScopedKeyword)); 5251if (modifiers is [.., SyntaxToken { Kind: SyntaxKind.ScopedKeyword } scopedKeyword]) 8606&& (tk is not (SyntaxKind.AsyncKeyword or SyntaxKind.SafeKeyword or SyntaxKind.ScopedKeyword) || ShouldContextualKeywordBeTreatedAsModifier(parsingStatementNotDeclaration: true)); 9700if (this.CurrentToken.ContextualKind == SyntaxKind.ScopedKeyword) 9909if (this.CurrentToken.ContextualKind == SyntaxKind.ScopedKeyword) 10651if (this.CurrentToken.ContextualKind != SyntaxKind.ScopedKeyword) 10663var scopedKeyword = this.EatContextualToken(SyntaxKind.ScopedKeyword); 10701? this.EatContextualToken(SyntaxKind.ScopedKeyword) 11979? 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)
129Debug.Assert(modifier.Kind() == SyntaxKind.ScopedKeyword); 359return SyntaxFacts.GetText(SyntaxKind.ScopedKeyword); 415case 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)
500diagnostics.Add(ErrorCode.ERR_BadMemberFlag, ErrorLocation, SyntaxFacts.GetText(SyntaxKind.ScopedKeyword));
Syntax\SyntaxKindFacts.cs (3)
1301case SyntaxKind.ScopedKeyword: 1430return SyntaxKind.ScopedKeyword; 1884case 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)