65 references to StructKeyword
Microsoft.CodeAnalysis.CSharp (42)
_generated\0\Syntax.xml.Main.Generated.cs (7)
5035if (keyword.Kind() != SyntaxKind.StructKeyword) throw new ArgumentException(nameof(keyword)); 5123case SyntaxKind.StructKeyword: 5165SyntaxKind.RecordStructDeclaration => SyntaxKind.StructKeyword, 5342case SyntaxKind.StructKeyword: break; 5362SyntaxKind.StructConstraint => SyntaxKind.StructKeyword, 5399if (structKeyword.Kind() != SyntaxKind.StructKeyword) throw new ArgumentException(nameof(structKeyword)); 5405=> SyntaxFactory.RefStructConstraint(SyntaxFactory.Token(SyntaxKind.RefKeyword), SyntaxFactory.Token(SyntaxKind.StructKeyword));
_generated\1\Syntax.xml.Internal.Generated.cs (8)
32066if (keyword.Kind != SyntaxKind.StructKeyword) throw new ArgumentException(nameof(keyword)); 32194case SyntaxKind.StructKeyword: 32444case SyntaxKind.StructKeyword: break; 32536if (structKeyword.Kind != SyntaxKind.StructKeyword) throw new ArgumentException(nameof(structKeyword)); 37493if (keyword.Kind != SyntaxKind.StructKeyword) throw new ArgumentException(nameof(keyword)); 37621case SyntaxKind.StructKeyword: 37871case SyntaxKind.StructKeyword: break; 37963if (structKeyword.Kind != SyntaxKind.StructKeyword) throw new ArgumentException(nameof(structKeyword));
Parser\LanguageParser.cs (14)
345case SyntaxKind.StructKeyword: 1516if (token.Kind == SyntaxKind.StructKeyword) 1670case SyntaxKind.StructKeyword: 1763case SyntaxKind.StructKeyword: 1786Debug.Assert(this.CurrentToken.Kind is SyntaxKind.ClassKeyword or SyntaxKind.StructKeyword or SyntaxKind.InterfaceKeyword || 1931recordModifier = this.CurrentToken.Kind is SyntaxKind.ClassKeyword or SyntaxKind.StructKeyword 1938if (this.CurrentToken.Kind is SyntaxKind.StructKeyword or SyntaxKind.ClassKeyword && 1985case SyntaxKind.StructKeyword: 2038SyntaxKind declarationKind = recordModifier?.Kind == SyntaxKind.StructKeyword ? SyntaxKind.RecordStructDeclaration : SyntaxKind.RecordDeclaration; 2335case SyntaxKind.StructKeyword: 2356SyntaxKind.StructKeyword => 2404this.EatToken(SyntaxKind.StructKeyword))); 2461case SyntaxKind.StructKeyword: 2491case SyntaxKind.StructKeyword:
SymbolDisplay\SymbolDisplayVisitor.Types.cs (4)
760AddKeyword(SyntaxKind.StructKeyword); 798AddKeyword(SyntaxKind.StructKeyword); 943AddKeyword(SyntaxKind.StructKeyword); 992AddKeyword(SyntaxKind.StructKeyword);
Syntax\SyntaxFactory.cs (3)
2948=> SyntaxFactory.StructDeclaration(attributeLists, modifiers, SyntaxFactory.Token(SyntaxKind.StructKeyword), identifier, typeParameterList, parameterList, baseList, constraintClauses, SyntaxFactory.Token(SyntaxKind.OpenBraceToken), members, SyntaxFactory.Token(SyntaxKind.CloseBraceToken), default); 2952=> SyntaxFactory.StructDeclaration(default, default(SyntaxTokenList), SyntaxFactory.Token(SyntaxKind.StructKeyword), identifier, null, null, null, default, SyntaxFactory.Token(SyntaxKind.OpenBraceToken), default, SyntaxFactory.Token(SyntaxKind.CloseBraceToken), default); 2956=> SyntaxFactory.StructDeclaration(default, default(SyntaxTokenList), SyntaxFactory.Token(SyntaxKind.StructKeyword), SyntaxFactory.Identifier(identifier), null, null, null, default, SyntaxFactory.Token(SyntaxKind.OpenBraceToken), default, SyntaxFactory.Token(SyntaxKind.CloseBraceToken), default);
Syntax\SyntaxKindFacts.cs (3)
863case SyntaxKind.StructKeyword: 1025return SyntaxKind.StructKeyword; 1726case SyntaxKind.StructKeyword:
Syntax\TypeDeclarationSyntax.cs (3)
59return SyntaxKind.StructKeyword; 76return SyntaxKind.StructKeyword; 138return SyntaxFactory.RecordDeclaration(SyntaxKind.RecordStructDeclaration, attributes, modifiers, keyword, classOrStructKeyword: SyntaxFactory.Token(SyntaxKind.StructKeyword), identifier, typeParameterList, parameterList: null, baseList, constraintClauses, openBraceToken, members, closeBraceToken, semicolonToken);
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
98public static readonly SyntaxToken StructKeyword = Token(SyntaxKind.StructKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
324case SyntaxKind.StructKeyword:
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\roslyn\src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (1)
54if (classOrStructKeyword.Kind() is SyntaxKind.ClassKeyword or SyntaxKind.StructKeyword)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
202var classOrStructKeyword = Token(isRecordClass ? default : SyntaxKind.StructKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\CSharpSyntaxContext.cs (1)
558RecordDeclarationSyntax record => record.ClassOrStructKeyword.IsKind(SyntaxKind.StructKeyword)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
702or SyntaxKind.StructKeyword
Microsoft.CodeAnalysis.CSharp.Features (6)
Completion\CompletionProviders\CSharpSuggestionModeCompletionProvider.cs (1)
77case SyntaxKind.StructKeyword:
Completion\KeywordRecommenders\NewKeywordRecommender.cs (1)
101.Any(c => c.ClassOrStructKeyword.Kind() == SyntaxKind.StructKeyword))
Completion\KeywordRecommenders\StructKeywordRecommender.cs (1)
13internal sealed class StructKeywordRecommender() : AbstractSyntacticSingleKeywordRecommender(SyntaxKind.StructKeyword)
SignatureHelp\AbstractGenericNameSignatureHelpProvider.cs (2)
232parts.Add(Keyword(SyntaxKind.StructKeyword)); 275parts.Add(Keyword(SyntaxKind.StructKeyword));
src\roslyn\src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (1)
54if (classOrStructKeyword.Kind() is SyntaxKind.ClassKeyword or SyntaxKind.StructKeyword)
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
98public static readonly SyntaxToken StructKeyword = Token(SyntaxKind.StructKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
324case SyntaxKind.StructKeyword:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
202var classOrStructKeyword = Token(isRecordClass ? default : SyntaxKind.StructKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\CSharpSyntaxContext.cs (1)
558RecordDeclarationSyntax record => record.ClassOrStructKeyword.IsKind(SyntaxKind.StructKeyword)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
702or SyntaxKind.StructKeyword
Microsoft.CodeAnalysis.Razor.Compiler (1)
Language\Legacy\NativeCSharpTokenizer.cs (1)
40CSharpSyntaxKind.StructKeyword,
Roslyn.Diagnostics.CSharp.Analyzers (5)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
98public static readonly SyntaxToken StructKeyword = Token(SyntaxKind.StructKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
324case SyntaxKind.StructKeyword:
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
202var classOrStructKeyword = Token(isRecordClass ? default : SyntaxKind.StructKeyword);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\CSharpSyntaxContext.cs (1)
558RecordDeclarationSyntax record => record.ClassOrStructKeyword.IsKind(SyntaxKind.StructKeyword)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
702or SyntaxKind.StructKeyword