100 references to WithKeyword
Microsoft.CodeAnalysis.CSharp (17)
Parser\LanguageParser.cs (6)
7747if (nextToken.ContextualKind == SyntaxKind.WithKeyword) 8205|| (this.CurrentToken.ContextualKind is SyntaxKind.SwitchKeyword or SyntaxKind.WithKeyword && this.PeekToken(1).Kind is SyntaxKind.OpenBraceToken); 11339return next.ContextualKind != SyntaxKind.WithKeyword; 11731if (token1Kind == SyntaxKind.WithKeyword && this.PeekToken(1).Kind == SyntaxKind.OpenBraceToken) 13234if (this.CurrentToken.ContextualKind == SyntaxKind.WithKeyword && 13237return _syntaxFactory.WithElement(this.EatContextualToken(SyntaxKind.WithKeyword), this.ParseParenthesizedArgumentList());
Syntax.xml.Internal.Generated.cs (4)
29698if (withKeyword.Kind != SyntaxKind.WithKeyword) throw new ArgumentException(nameof(withKeyword)); 29886if (withKeyword.Kind != SyntaxKind.WithKeyword) throw new ArgumentException(nameof(withKeyword)); 35086if (withKeyword.Kind != SyntaxKind.WithKeyword) throw new ArgumentException(nameof(withKeyword)); 35274if (withKeyword.Kind != SyntaxKind.WithKeyword) throw new ArgumentException(nameof(withKeyword));
Syntax.xml.Main.Generated.cs (4)
3320if (withKeyword.Kind() != SyntaxKind.WithKeyword) throw new ArgumentException(nameof(withKeyword)); 3327=> SyntaxFactory.WithExpression(expression, SyntaxFactory.Token(SyntaxKind.WithKeyword), initializer); 3451if (withKeyword.Kind() != SyntaxKind.WithKeyword) throw new ArgumentException(nameof(withKeyword)); 3458=> SyntaxFactory.WithElement(SyntaxFactory.Token(SyntaxKind.WithKeyword), argumentList ?? SyntaxFactory.ArgumentList());
Syntax\SyntaxKindFacts.cs (3)
1290case SyntaxKind.WithKeyword: 1410return SyntaxKind.WithKeyword; 1858case SyntaxKind.WithKeyword:
Microsoft.CodeAnalysis.CSharp.Features (1)
Completion\KeywordRecommenders\WithKeywordRecommender.cs (1)
11internal sealed class WithKeywordRecommender() : AbstractSyntacticSingleKeywordRecommender(SyntaxKind.WithKeyword)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (82)
Generated\Syntax.Test.xml.Generated.cs (8)
197=> InternalSyntaxFactory.WithExpression(GenerateIdentifierName(), InternalSyntaxFactory.Token(SyntaxKind.WithKeyword), GenerateInitializerExpression()); 227=> InternalSyntaxFactory.WithElement(InternalSyntaxFactory.Token(SyntaxKind.WithKeyword), GenerateArgumentList()); 1483Assert.Equal(SyntaxKind.WithKeyword, node.WithKeyword.Kind); 1602Assert.Equal(SyntaxKind.WithKeyword, node.WithKeyword.Kind); 10587=> SyntaxFactory.WithExpression(GenerateIdentifierName(), SyntaxFactory.Token(SyntaxKind.WithKeyword), GenerateInitializerExpression()); 10617=> SyntaxFactory.WithElement(SyntaxFactory.Token(SyntaxKind.WithKeyword), GenerateArgumentList()); 11873Assert.Equal(SyntaxKind.WithKeyword, node.WithKeyword.Kind()); 11992Assert.Equal(SyntaxKind.WithKeyword, node.WithKeyword.Kind());
Parsing\CollectionExpressionParsingTests.cs (1)
1221N(SyntaxKind.WithKeyword);
Parsing\ForStatementParsingTest.cs (8)
1792N(SyntaxKind.WithKeyword); 1880N(SyntaxKind.WithKeyword); 1972N(SyntaxKind.WithKeyword); 2068N(SyntaxKind.WithKeyword); 2171N(SyntaxKind.WithKeyword); 2272N(SyntaxKind.WithKeyword); 4420N(SyntaxKind.WithKeyword); 4434N(SyntaxKind.WithKeyword);
Parsing\LambdaAttributeParsingTests.cs (1)
3160N(SyntaxKind.WithKeyword);
Parsing\RecordParsing.cs (21)
1345N(SyntaxKind.WithKeyword); 1427N(SyntaxKind.WithKeyword); 1472N(SyntaxKind.WithKeyword); 1499N(SyntaxKind.WithKeyword); 1535N(SyntaxKind.WithKeyword); 1586N(SyntaxKind.WithKeyword); 1623N(SyntaxKind.WithKeyword); 1664N(SyntaxKind.WithKeyword); 1697N(SyntaxKind.WithKeyword); 1704N(SyntaxKind.WithKeyword); 1738N(SyntaxKind.WithKeyword); 1802N(SyntaxKind.WithKeyword); 1878N(SyntaxKind.WithKeyword); 1899N(SyntaxKind.WithKeyword); 1971N(SyntaxKind.WithKeyword); 2010N(SyntaxKind.WithKeyword); 2075N(SyntaxKind.WithKeyword); 2129N(SyntaxKind.WithKeyword); 2143N(SyntaxKind.WithKeyword); 2189N(SyntaxKind.WithKeyword); 2203N(SyntaxKind.WithKeyword);
Parsing\WithElementParsingTests.cs (43)
18Assert.Equal(SyntaxKind.WithKeyword, SyntaxFacts.GetContextualKeywordKind("with")); 20Assert.True(SyntaxFacts.IsContextualKeyword(SyntaxKind.WithKeyword)); 21Assert.Equal("with", SyntaxFacts.GetText(SyntaxKind.WithKeyword)); 750N(SyntaxKind.WithKeyword); 771N(SyntaxKind.WithKeyword); 798N(SyntaxKind.WithKeyword); 834N(SyntaxKind.WithKeyword); 862N(SyntaxKind.WithKeyword); 891N(SyntaxKind.WithKeyword); 920N(SyntaxKind.WithKeyword); 956N(SyntaxKind.WithKeyword); 992N(SyntaxKind.WithKeyword); 1028N(SyntaxKind.WithKeyword); 1036N(SyntaxKind.WithKeyword); 1065N(SyntaxKind.WithKeyword); 1108N(SyntaxKind.WithKeyword); 1138N(SyntaxKind.WithKeyword); 1159N(SyntaxKind.WithKeyword); 1195N(SyntaxKind.WithKeyword); 1233N(SyntaxKind.WithKeyword); 1263N(SyntaxKind.WithKeyword); 1292N(SyntaxKind.WithKeyword); 1330N(SyntaxKind.WithKeyword); 1369N(SyntaxKind.WithKeyword); 1417N(SyntaxKind.WithKeyword); 1427N(SyntaxKind.WithKeyword); 1453N(SyntaxKind.WithKeyword); 1489N(SyntaxKind.WithKeyword); 1518N(SyntaxKind.WithKeyword); 1547N(SyntaxKind.WithKeyword); 1584N(SyntaxKind.WithKeyword); 1634N(SyntaxKind.WithKeyword); 1672N(SyntaxKind.WithKeyword); 1705N(SyntaxKind.WithKeyword); 1729N(SyntaxKind.WithKeyword); 1751N(SyntaxKind.WithKeyword); 1782N(SyntaxKind.WithKeyword); 1821N(SyntaxKind.WithKeyword); 1864N(SyntaxKind.WithKeyword); 1909N(SyntaxKind.WithKeyword); 1968N(SyntaxKind.WithKeyword); 2006N(SyntaxKind.WithKeyword); 2093N(SyntaxKind.WithKeyword);