259 references to StructKeyword
Microsoft.CodeAnalysis.CSharp (27)
Parser\LanguageParser.cs (14)
345case SyntaxKind.StructKeyword: 1475if (token.Kind == SyntaxKind.StructKeyword) 1617case SyntaxKind.StructKeyword: 1697case SyntaxKind.StructKeyword: 1720Debug.Assert(this.CurrentToken.Kind is SyntaxKind.ClassKeyword or SyntaxKind.StructKeyword or SyntaxKind.InterfaceKeyword || 1855recordModifier = this.CurrentToken.Kind is SyntaxKind.ClassKeyword or SyntaxKind.StructKeyword 1862if (this.CurrentToken.Kind is SyntaxKind.StructKeyword or SyntaxKind.ClassKeyword && 1908case SyntaxKind.StructKeyword: 1942SyntaxKind declarationKind = recordModifier?.Kind == SyntaxKind.StructKeyword ? SyntaxKind.RecordStructDeclaration : SyntaxKind.RecordDeclaration; 2206case SyntaxKind.StructKeyword: 2227SyntaxKind.StructKeyword => 2275this.EatToken(SyntaxKind.StructKeyword))); 2332case SyntaxKind.StructKeyword: 2362case SyntaxKind.StructKeyword:
SymbolDisplay\SymbolDisplayVisitor.Types.cs (4)
715AddKeyword(SyntaxKind.StructKeyword); 753AddKeyword(SyntaxKind.StructKeyword); 898AddKeyword(SyntaxKind.StructKeyword); 947AddKeyword(SyntaxKind.StructKeyword);
Syntax\SyntaxFactory.cs (3)
2900=> SyntaxFactory.StructDeclaration(attributeLists, modifiers, SyntaxFactory.Token(SyntaxKind.StructKeyword), identifier, typeParameterList, parameterList, baseList, constraintClauses, SyntaxFactory.Token(SyntaxKind.OpenBraceToken), members, SyntaxFactory.Token(SyntaxKind.CloseBraceToken), default); 2904=> SyntaxFactory.StructDeclaration(default, default(SyntaxTokenList), SyntaxFactory.Token(SyntaxKind.StructKeyword), identifier, null, null, null, default, SyntaxFactory.Token(SyntaxKind.OpenBraceToken), default, SyntaxFactory.Token(SyntaxKind.CloseBraceToken), default); 2908=> 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)
837case SyntaxKind.StructKeyword: 995return SyntaxKind.StructKeyword; 1643case SyntaxKind.StructKeyword:
Syntax\TypeDeclarationSyntax.cs (3)
59return SyntaxKind.StructKeyword; 74return SyntaxKind.StructKeyword; 132return 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\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
86public static readonly SyntaxToken StructKeyword = Token(SyntaxKind.StructKeyword);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
316case SyntaxKind.StructKeyword:
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (1)
54if (classOrStructKeyword.Kind() is SyntaxKind.ClassKeyword or SyntaxKind.StructKeyword)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
200var classOrStructKeyword = Token(isRecordClass ? default : SyntaxKind.StructKeyword);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
694or SyntaxKind.StructKeyword
Microsoft.CodeAnalysis.CSharp.Features (6)
Completion\CompletionProviders\CSharpSuggestionModeCompletionProvider.cs (1)
81case SyntaxKind.StructKeyword:
Completion\KeywordRecommenders\NewKeywordRecommender.cs (1)
106.Any(c => c.ClassOrStructKeyword.Kind() == SyntaxKind.StructKeyword))
Completion\KeywordRecommenders\StructKeywordRecommender.cs (1)
28: base(SyntaxKind.StructKeyword)
SignatureHelp\GenericNameSignatureHelpProvider.cs (2)
259parts.Add(Keyword(SyntaxKind.StructKeyword)); 302parts.Add(Keyword(SyntaxKind.StructKeyword));
src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (1)
54if (classOrStructKeyword.Kind() is SyntaxKind.ClassKeyword or SyntaxKind.StructKeyword)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
EditAndContinue\TopLevelEditingTests.cs (1)
1948Diagnostic(RudeEditKind.ModifiersUpdate, "readonly struct X", SyntaxFacts.GetText(SyntaxKind.StructKeyword)));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (215)
Generated\Syntax.Test.xml.Generated.cs (8)
503=> InternalSyntaxFactory.StructDeclaration(new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.AttributeListSyntax>(), new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.SyntaxToken>(), InternalSyntaxFactory.Token(SyntaxKind.StructKeyword), InternalSyntaxFactory.Identifier("Identifier"), null, null, null, new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.TypeParameterConstraintClauseSyntax>(), null, new Microsoft.CodeAnalysis.Syntax.InternalSyntax.SyntaxList<Syntax.InternalSyntax.MemberDeclarationSyntax>(), null, null); 548=> InternalSyntaxFactory.RefStructConstraint(InternalSyntaxFactory.Token(SyntaxKind.RefKeyword), InternalSyntaxFactory.Token(SyntaxKind.StructKeyword)); 2775Assert.Equal(SyntaxKind.StructKeyword, node.Keyword.Kind); 2986Assert.Equal(SyntaxKind.StructKeyword, node.StructKeyword.Kind); 10680=> 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.RefStructConstraint(SyntaxFactory.Token(SyntaxKind.RefKeyword), SyntaxFactory.Token(SyntaxKind.StructKeyword)); 12952Assert.Equal(SyntaxKind.StructKeyword, node.Keyword.Kind()); 13163Assert.Equal(SyntaxKind.StructKeyword, node.StructKeyword.Kind());
IncrementalParsing\IncrementalParsingTests.cs (1)
211SyntaxKind.StructKeyword);
Parsing\AllowsConstraintParsing.cs (41)
60N(SyntaxKind.StructKeyword); 117N(SyntaxKind.StructKeyword); 169M(SyntaxKind.StructKeyword); 276N(SyntaxKind.StructKeyword); 343N(SyntaxKind.StructKeyword); 398M(SyntaxKind.StructKeyword); 455N(SyntaxKind.StructKeyword); 461N(SyntaxKind.StructKeyword); 510N(SyntaxKind.StructKeyword); 516N(SyntaxKind.StructKeyword); 568N(SyntaxKind.StructKeyword); 574M(SyntaxKind.StructKeyword); 623N(SyntaxKind.StructKeyword); 633N(SyntaxKind.StructKeyword); 686N(SyntaxKind.StructKeyword); 735N(SyntaxKind.StructKeyword); 744N(SyntaxKind.StructKeyword); 802N(SyntaxKind.StructKeyword); 869N(SyntaxKind.StructKeyword); 878N(SyntaxKind.StructKeyword); 945N(SyntaxKind.StructKeyword); 1008N(SyntaxKind.StructKeyword); 1017N(SyntaxKind.StructKeyword); 1075N(SyntaxKind.StructKeyword); 1084N(SyntaxKind.StructKeyword); 1133N(SyntaxKind.StructKeyword); 1142N(SyntaxKind.StructKeyword); 1196N(SyntaxKind.StructKeyword); 1250N(SyntaxKind.StructKeyword); 1307N(SyntaxKind.StructKeyword); 1364N(SyntaxKind.StructKeyword); 1421N(SyntaxKind.StructKeyword); 1477N(SyntaxKind.StructKeyword); 1522N(SyntaxKind.StructKeyword); 1546N(SyntaxKind.StructKeyword); 1595N(SyntaxKind.StructKeyword); 1649N(SyntaxKind.StructKeyword); 1703N(SyntaxKind.StructKeyword); 1760N(SyntaxKind.StructKeyword); 1817N(SyntaxKind.StructKeyword); 1874N(SyntaxKind.StructKeyword);
Parsing\DeclarationParsingTests.cs (51)
1324Assert.Equal(SyntaxKind.StructKeyword, bound.ClassOrStructKeyword.Kind()); 1695Assert.Equal(SyntaxKind.StructKeyword, cs.Keyword.Kind()); 2798Assert.Equal(SyntaxKind.StructKeyword, structDecl.Keyword.Kind()); 2845Assert.Equal(SyntaxKind.StructKeyword, structDecl.Keyword.Kind()); 2895Assert.Equal(SyntaxKind.StructKeyword, structDecl.Keyword.Kind()); 2936Assert.Equal(SyntaxKind.StructKeyword, structDecl.Keyword.Kind()); 7054N(SyntaxKind.StructKeyword); 7145N(SyntaxKind.StructKeyword); 7237N(SyntaxKind.StructKeyword); 9079N(SyntaxKind.StructKeyword); 9151N(SyntaxKind.StructKeyword); 9416N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 9446N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 9466[InlineDataAttribute(SyntaxKind.StructDeclaration, SyntaxKind.StructKeyword)] 9490[InlineDataAttribute(SyntaxKind.StructDeclaration, SyntaxKind.StructKeyword)] 9522[InlineDataAttribute(SyntaxKind.StructDeclaration, SyntaxKind.StructKeyword)] 9559[InlineDataAttribute(SyntaxKind.StructDeclaration, SyntaxKind.StructKeyword)] 9595[InlineDataAttribute(SyntaxKind.StructDeclaration, SyntaxKind.StructKeyword)] 9630[InlineDataAttribute(SyntaxKind.StructDeclaration, SyntaxKind.StructKeyword)] 9672[InlineDataAttribute(SyntaxKind.StructDeclaration, SyntaxKind.StructKeyword)] 9711[InlineDataAttribute(SyntaxKind.StructDeclaration, SyntaxKind.StructKeyword)] 9766[InlineDataAttribute(SyntaxKind.StructDeclaration, SyntaxKind.StructKeyword)] 9814[InlineDataAttribute(SyntaxKind.StructDeclaration, SyntaxKind.StructKeyword)] 9851N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 9885N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 9912N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 9952N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 9992N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 10023N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 10068N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 10117N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 10160N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 10217N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 10277N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 10331N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 10399N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 10464N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 10516N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 10565N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 10617N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 10670N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 10704N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 10748N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 10797N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 10845N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 10907N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 10949N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 11001N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 11058N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 11113N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword); 11178N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword);
Parsing\DeclarationParsingTests_MissingIdentifiers.cs (25)
1987N(SyntaxKind.StructKeyword); 2061N(SyntaxKind.StructKeyword); 2069N(SyntaxKind.StructKeyword); 2118N(SyntaxKind.StructKeyword); 2178N(SyntaxKind.StructKeyword); 2197N(SyntaxKind.StructKeyword); 2279N(SyntaxKind.StructKeyword); 2373N(SyntaxKind.StructKeyword); 2490N(SyntaxKind.StructKeyword); 2597N(SyntaxKind.StructKeyword); 2714N(SyntaxKind.StructKeyword); 2830N(SyntaxKind.StructKeyword); 3618N(SyntaxKind.StructKeyword); 3699N(SyntaxKind.StructKeyword); 3706N(SyntaxKind.StructKeyword); 3789N(SyntaxKind.StructKeyword); 3815N(SyntaxKind.StructKeyword); 3885N(SyntaxKind.StructKeyword); 4003N(SyntaxKind.StructKeyword); 4010N(SyntaxKind.StructKeyword); 4093N(SyntaxKind.StructKeyword); 4129N(SyntaxKind.StructKeyword); 4167N(SyntaxKind.StructKeyword); 4184N(SyntaxKind.StructKeyword); 4202N(SyntaxKind.StructKeyword);
Parsing\DeclarationScopeParsingTests.cs (19)
11151N(SyntaxKind.StructKeyword); 11170N(SyntaxKind.StructKeyword); 11230N(SyntaxKind.StructKeyword); 11255N(SyntaxKind.StructKeyword); 11547N(SyntaxKind.StructKeyword); 11586N(SyntaxKind.StructKeyword); 13546N(SyntaxKind.StructKeyword); 13608N(SyntaxKind.StructKeyword); 13678N(SyntaxKind.StructKeyword); 13764N(SyntaxKind.StructKeyword); 13877N(SyntaxKind.StructKeyword); 13976N(SyntaxKind.StructKeyword); 14035N(SyntaxKind.StructKeyword); 14096N(SyntaxKind.StructKeyword); 14164N(SyntaxKind.StructKeyword); 14289N(SyntaxKind.StructKeyword); 14372N(SyntaxKind.StructKeyword); 14434N(SyntaxKind.StructKeyword); 14502N(SyntaxKind.StructKeyword);
Parsing\FileModifierParsingTests.cs (12)
43[InlineData(SyntaxKind.StructKeyword)] 69[InlineData(SyntaxKind.StructKeyword)] 123[InlineData(SyntaxKind.StructKeyword)] 221N(SyntaxKind.StructKeyword); 250N(SyntaxKind.StructKeyword); 313N(SyntaxKind.StructKeyword); 376N(SyntaxKind.StructKeyword); 439N(SyntaxKind.StructKeyword); 495[InlineData(SyntaxKind.StructKeyword)] 528[InlineData(SyntaxKind.StructKeyword)] 1573N(SyntaxKind.StructKeyword); 1837N(SyntaxKind.StructKeyword);
Parsing\MemberDeclarationParsingTests.cs (16)
10477[InlineData("struct", SyntaxKind.StructDeclaration, SyntaxKind.StructKeyword)] 10521N(SyntaxKind.StructKeyword); 10560[InlineData("struct", SyntaxKind.StructDeclaration, SyntaxKind.StructKeyword)] 10606N(SyntaxKind.StructKeyword); 10663[InlineData("struct", SyntaxKind.StructDeclaration, SyntaxKind.StructKeyword)] 10714N(SyntaxKind.StructKeyword); 10778[InlineData("struct", SyntaxKind.StructDeclaration, SyntaxKind.StructKeyword)] 10839N(SyntaxKind.StructKeyword); 10934[InlineData("struct", SyntaxKind.StructDeclaration, SyntaxKind.StructKeyword)] 11014N(SyntaxKind.StructKeyword); 11109[InlineData("struct", SyntaxKind.StructDeclaration, SyntaxKind.StructKeyword)] 11188N(SyntaxKind.StructKeyword); 11282[InlineData("struct", SyntaxKind.StructDeclaration, SyntaxKind.StructKeyword)] 11357N(SyntaxKind.StructKeyword); 11413[InlineData("struct", SyntaxKind.StructDeclaration, SyntaxKind.StructKeyword)] 11484N(SyntaxKind.StructKeyword);
Parsing\RecordParsing.cs (23)
2540N(SyntaxKind.StructKeyword); 2640N(SyntaxKind.StructKeyword); 2677N(SyntaxKind.StructKeyword); 2720N(SyntaxKind.StructKeyword); 3068M(SyntaxKind.StructKeyword); 3113M(SyntaxKind.StructKeyword); 3154N(SyntaxKind.StructKeyword); 3174N(SyntaxKind.StructKeyword); 3194N(SyntaxKind.StructKeyword); 3398N(SyntaxKind.StructKeyword); 3460N(SyntaxKind.StructKeyword); 3494N(SyntaxKind.StructKeyword); 3529N(SyntaxKind.StructKeyword); 3551N(SyntaxKind.StructKeyword); 3583N(SyntaxKind.StructKeyword); 3629N(SyntaxKind.StructKeyword); 3679N(SyntaxKind.StructKeyword); 3705N(SyntaxKind.StructKeyword); 3827N(SyntaxKind.StructKeyword); 3890N(SyntaxKind.StructKeyword); 3910N(SyntaxKind.StructKeyword); 3953N(SyntaxKind.StructKeyword); 4035N(@struct ? SyntaxKind.StructKeyword : SyntaxKind.ClassKeyword);
Parsing\RefFieldParsingTests.cs (11)
28N(SyntaxKind.StructKeyword); 65N(SyntaxKind.StructKeyword); 106N(SyntaxKind.StructKeyword); 142N(SyntaxKind.StructKeyword); 176N(SyntaxKind.StructKeyword); 234N(SyntaxKind.StructKeyword); 299N(SyntaxKind.StructKeyword); 359N(SyntaxKind.StructKeyword); 409N(SyntaxKind.StructKeyword); 471N(SyntaxKind.StructKeyword); 560N(SyntaxKind.StructKeyword);
Parsing\ScriptParsingTests.cs (1)
2414N(SyntaxKind.StructKeyword);
Parsing\TopLevelStatementsParsingTests.cs (4)
3096N(SyntaxKind.StructKeyword); 3115N(SyntaxKind.StructKeyword); 3131N(SyntaxKind.StructKeyword); 3574N(SyntaxKind.StructKeyword);
Parsing\TypeArgumentListParsingTests.cs (1)
868N(SyntaxKind.StructKeyword);
Parsing\UsingDirectiveParsingTests.cs (2)
641N(SyntaxKind.StructKeyword); 693N(SyntaxKind.StructKeyword);
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeGeneration\CSharpSyntaxTokens.cs (1)
86public static readonly SyntaxToken StructKeyword = Token(SyntaxKind.StructKeyword);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
316case SyntaxKind.StructKeyword:
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\NamedTypeGenerator.cs (1)
200var classOrStructKeyword = Token(isRecordClass ? default : SyntaxKind.StructKeyword);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (1)
694or SyntaxKind.StructKeyword
Microsoft.VisualStudio.LanguageServices.CSharp (1)
LanguageService\CSharpHelpContextService.cs (1)
496if (token.IsKind(SyntaxKind.StructKeyword) && token.Parent is ClassOrStructConstraintSyntax)