18 references to CaseOrDefaultKeyword
Microsoft.CodeAnalysis.CSharp (7)
Binder\SwitchBinder.cs (1)
528var labelName = SyntaxFacts.GetText(node.CaseOrDefaultKeyword.Kind());
Syntax.xml.Main.Generated.cs (1)
1867=> node.Update(VisitList(node.AttributeLists), VisitToken(node.GotoKeyword), VisitToken(node.CaseOrDefaultKeyword), (ExpressionSyntax?)Visit(node.Expression), VisitToken(node.SemicolonToken));
Syntax.xml.Syntax.Generated.cs (5)
7090if (attributeLists != this.AttributeLists || gotoKeyword != this.GotoKeyword || caseOrDefaultKeyword != this.CaseOrDefaultKeyword || expression != this.Expression || semicolonToken != this.SemicolonToken) 7101public new GotoStatementSyntax WithAttributeLists(SyntaxList<AttributeListSyntax> attributeLists) => Update(attributeLists, this.GotoKeyword, this.CaseOrDefaultKeyword, this.Expression, this.SemicolonToken); 7102public GotoStatementSyntax WithGotoKeyword(SyntaxToken gotoKeyword) => Update(this.AttributeLists, gotoKeyword, this.CaseOrDefaultKeyword, this.Expression, this.SemicolonToken); 7104public GotoStatementSyntax WithExpression(ExpressionSyntax? expression) => Update(this.AttributeLists, this.GotoKeyword, this.CaseOrDefaultKeyword, expression, this.SemicolonToken); 7105public GotoStatementSyntax WithSemicolonToken(SyntaxToken semicolonToken) => Update(this.AttributeLists, this.GotoKeyword, this.CaseOrDefaultKeyword, this.Expression, semicolonToken);
Microsoft.CodeAnalysis.CSharp.Features (2)
Highlighting\KeywordHighlighters\SwitchStatementHighlighter.cs (2)
76var end = !gotoStatement.CaseOrDefaultKeyword.IsKind(SyntaxKind.None) 77? gotoStatement.CaseOrDefaultKeyword.Span.End
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (9)
Generated\Syntax.Test.xml.Generated.cs (2)
12533Assert.Equal(SyntaxKind.None, node.CaseOrDefaultKeyword.Kind()); 12536var newNode = node.WithAttributeLists(node.AttributeLists).WithGotoKeyword(node.GotoKeyword).WithCaseOrDefaultKeyword(node.CaseOrDefaultKeyword).WithExpression(node.Expression).WithSemicolonToken(node.SemicolonToken);
Parsing\StatementParsingTests.cs (7)
1039Assert.Equal(SyntaxKind.None, gs.CaseOrDefaultKeyword.Kind()); 1061Assert.NotEqual(default, gs.CaseOrDefaultKeyword); 1062Assert.False(gs.CaseOrDefaultKeyword.IsMissing); 1063Assert.Equal(SyntaxKind.CaseKeyword, gs.CaseOrDefaultKeyword.Kind()); 1085Assert.NotEqual(default, gs.CaseOrDefaultKeyword); 1086Assert.False(gs.CaseOrDefaultKeyword.IsMissing); 1087Assert.Equal(SyntaxKind.DefaultKeyword, gs.CaseOrDefaultKeyword.Kind());