2372 references to Kind
Microsoft.AspNetCore.App.Analyzers (6)
Infrastructure\VirtualChars\CSharpVirtualCharService.cs (5)
30if (token.Kind() is SyntaxKind.MultiLineRawStringLiteralToken or SyntaxKind.Utf8MultiLineRawStringLiteralToken) 60switch (token.Kind()) 96return interpolatedString.StringStartToken.Kind() switch 142if (token.Kind() is SyntaxKind.Utf8SingleLineRawStringLiteralToken) 147if (token.Kind() is SyntaxKind.SingleLineRawStringLiteralToken or SyntaxKind.Utf8SingleLineRawStringLiteralToken)
RouteEmbeddedLanguage\FrameworkParametersCompletionProvider.cs (1)
290return SyntaxFacts.IsPredefinedType(token.Kind()) || token.IsKind(SyntaxKind.IdentifierToken);
Microsoft.CodeAnalysis.CSharp (99)
Binder\Binder_AnonymousTypes.cs (2)
70if (nameToken.Kind() == SyntaxKind.IdentifierToken) 91fieldSyntaxNodes[i] = (nameToken.Kind() == SyntaxKind.IdentifierToken) ? (CSharpSyntaxNode)nameToken.Parent! : fieldInitializer;
Binder\Binder_Expressions.cs (6)
1834((ArgumentSyntax)parent).RefOrOutKeyword.Kind() == SyntaxKind.OutKeyword); 3048RefKind origRefKind = argumentSyntax.RefOrOutKeyword.Kind().GetRefKind(); 3078if (argumentSyntax.RefOrOutKeyword.Kind() != SyntaxKind.None) 7628diagnostics.Add(ErrorCode.ERR_BadUnaryOp, operatorToken.GetLocation(), SyntaxFacts.GetText(operatorToken.Kind()), leftType); 7635DiagnosticInfo diagnosticInfo = new CSDiagnosticInfo(ErrorCode.ERR_BadOpOnNullOrDefaultOrNew, SyntaxFacts.GetText(operatorToken.Kind()), boundLeft.Display); 7645diagnostics.Add(ErrorCode.ERR_BadUnaryOp, node.Location, SyntaxFacts.GetText(operatorToken.Kind()), msgId.Localize());
Binder\Binder_Lambda.cs (2)
186if (isLastParameter && paramsKeyword.Kind() != SyntaxKind.None && type.IsSZArray()) 367var isParams = paramsKeyword.Kind() != SyntaxKind.None;
Binder\Binder_Operators.cs (3)
833bool isEquality = operatorToken.Kind() == SyntaxKind.EqualsEqualsToken || operatorToken.Kind() == SyntaxKind.ExclamationEqualsToken; 869case LookupResultKind.OverloadResolutionFailure when operatorToken.Kind() is SyntaxKind.PlusToken && isReadOnlySpanOfByte(left.Type) && isReadOnlySpanOfByte(right.Type):
Binder\Binder_Symbols.cs (1)
699if (nameToken.Kind() == SyntaxKind.IdentifierToken)
CSharpExtensions.cs (5)
224return SyntaxFacts.IsKeywordKind(token.Kind()); 229return SyntaxFacts.IsContextualKeyword(token.Kind()); 234return SyntaxFacts.IsReservedKeyword(token.Kind()); 239return token.Kind() is (SyntaxKind.StringLiteralToken or SyntaxKind.Utf8StringLiteralToken) && token.Text.Length > 0 && token.Text[0] == '@'; 249switch (node.Kind())
Lowering\DiagnosticsPass_ExpressionTrees.cs (2)
596if (lambdaSyntax.AsyncKeyword.Kind() == SyntaxKind.AsyncKeyword) 614if (lambdaSyntax.AsyncKeyword.Kind() == SyntaxKind.AsyncKeyword)
Parser\Blender.cs (1)
134Debug.Assert(token.Kind() != SyntaxKind.None, "how could we not get a real token back?");
Symbols\FunctionPointers\FunctionPointerMethodSymbol.cs (2)
42switch (modifier.Kind()) 45if (modifiers.Count > i + 1 && modifiers[i + 1].Kind() == SyntaxKind.ReadOnlyKeyword)
Symbols\RangeVariableSymbol.cs (1)
63Debug.Assert(token.Kind() == SyntaxKind.IdentifierToken);
Symbols\Source\LocalFunctionSymbol.cs (1)
206var isVararg = arglistToken.Kind() == SyntaxKind.ArgListKeyword;
Symbols\Source\ModifierUtils.cs (2)
120Debug.Assert(modifier.Kind() == SyntaxKind.ScopedKeyword); 454SyntaxFacts.GetText(modifierToken.Kind()));
Symbols\Source\ParameterHelpers.cs (14)
55hasParamsModifier: paramsKeyword.Kind() != SyntaxKind.None, 56isExtensionMethodThis: ordinal == 0 && thisKeyword.Kind() != SyntaxKind.None, 145if (thisKeyword.Kind() != SyntaxKind.None && !allowThis) 157if (paramsKeyword.Kind() != SyntaxKind.None 158|| refnessKeyword.Kind() != SyntaxKind.None 159|| thisKeyword.Kind() != SyntaxKind.None) 185Debug.Assert(refnessKeyword.Kind() != SyntaxKind.None); 607else if (previousModifier?.Kind() != SyntaxKind.RefKeyword) 632diagnostics.Add(ErrorCode.ERR_DupParamMod, modifier.GetLocation(), SyntaxFacts.GetText(modifier.Kind())); 637diagnostics.Add(ErrorCode.ERR_BadParameterModifiers, modifier.GetLocation(), SyntaxFacts.GetText(modifier.Kind()), SyntaxFacts.GetText(otherModifierKind)); 663if (thisKeyword.Kind() == SyntaxKind.ThisKeyword && parameterIndex != 0) 752else if (paramsKeyword.Kind() == SyntaxKind.ParamsKeyword) 758else if (thisKeyword.Kind() == SyntaxKind.ThisKeyword) 932switch (modifier.Kind())
Symbols\Source\SourceDelegateMethodSymbol.cs (1)
272if (arglistToken.Kind() == SyntaxKind.ArgListKeyword)
Symbols\Source\SourceLabelSymbol.cs (1)
60if (tk.Kind() != SyntaxKind.None)
Symbols\Source\SourceLocalSymbol.cs (1)
50Debug.Assert(identifierToken.Kind() != SyntaxKind.None);
Symbols\Source\SourceMemberFieldSymbol.cs (2)
75if (modifier.Kind() == SyntaxKind.ConstKeyword) 81Debug.Assert(constToken.Kind() == SyntaxKind.ConstKeyword);
Symbols\Source\SourcePropertySymbol.cs (1)
620if (arglistToken.Kind() != SyntaxKind.None)
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (1)
241if (arglistToken.Kind() == SyntaxKind.ArgListKeyword)
Symbols\Symbol.cs (1)
514if (token.Kind() != SyntaxKind.None)
Syntax\CSharpLineDirectiveMap.cs (4)
54switch (lineToken.Kind()) 111token.Kind() == SyntaxKind.NumericLiteralToken && 130if (token.Kind() == SyntaxKind.StringLiteralToken) 144if (token.Kind() == SyntaxKind.None)
Syntax\CSharpSyntaxRewriter.cs (1)
267if (alternate != null && visited.Kind() != SyntaxKind.None) //skip the null check since SyntaxToken is a value type
Syntax\DirectiveTriviaSyntax.cs (2)
71while (token.Kind() != SyntaxKind.None) 102while (token.Kind() != SyntaxKind.None)
Syntax\LookupPosition.cs (1)
95return firstExcluded.Kind() == SyntaxKind.None || position < firstExcluded.SpanStart;
Syntax\SyntaxExtensions.cs (1)
387&& ((ArgumentSyntax)p.Parent).RefOrOutKeyword.Kind() == SyntaxKind.OutKeyword;
Syntax\SyntaxNodeRemover.cs (1)
196if (result.Kind() != SyntaxKind.None && _residualTrivia != null && _residualTrivia.Count > 0)
Syntax\SyntaxNormalizer.cs (36)
86if (token.Kind() == SyntaxKind.None || (token.IsMissing && token.FullWidth == 0)) 189if (nextToken.Kind() == SyntaxKind.None) 214switch (currentToken.Kind()) 247|| nextToken.Kind() == SyntaxKind.OpenBraceToken 248|| nextToken.Kind() == SyntaxKind.WhereKeyword) ? 1 : 0; 268return nextToken.Kind() != SyntaxKind.IfKeyword ? 1 : 0; 291switch (nextToken.Kind()) 389var kind = nextToken.Kind(); 412nextToken.Kind() is SyntaxKind.CommaToken or SyntaxKind.SemicolonToken; 421else if (nextToken.Kind() == SyntaxKind.CloseBraceToken) 629if (IsXmlTextToken(token.Kind()) || IsXmlTextToken(next.Kind())) 634if (next.Kind() == SyntaxKind.EndOfDirectiveToken) 638return IsKeyword(token.Kind()) && next.LeadingWidth > 0; 641if ((token.Parent is AssignmentExpressionSyntax && AssignmentTokenNeedsSeparator(token.Kind())) || 642(next.Parent is AssignmentExpressionSyntax && AssignmentTokenNeedsSeparator(next.Kind())) || 643(token.Parent is BinaryExpressionSyntax && BinaryTokenNeedsSeparator(token.Kind())) || 644(next.Parent is BinaryExpressionSyntax && BinaryTokenNeedsSeparator(next.Kind()))) 651if (!SyntaxFacts.IsPunctuation(next.Kind())) 671if (token.Kind() == SyntaxKind.SemicolonToken 672&& !(next.Kind() == SyntaxKind.SemicolonToken || next.Kind() == SyntaxKind.CloseParenToken)) 709if (token.IsKind(SyntaxKind.CloseBracketToken) && IsWord(next.Kind())) 715if (token.IsKind(SyntaxKind.CloseParenToken) && IsWord(next.Kind()) && token.Parent.IsKind(SyntaxKind.TupleType) == true) 749switch (next.Kind()) 761switch (token.Kind()) 836if (SyntaxFacts.IsLiteral(token.Kind()) && SyntaxFacts.IsLiteral(next.Kind())) 889if (IsKeyword(token.Kind())) 896(!next.IsKind(SyntaxKind.OpenParenToken) || KeywordNeedsSeparatorBeforeOpenParen(token.Kind()) || next.Parent.IsKind(SyntaxKind.TupleType)) && 907if (IsWordOrLiteral(token.Kind()) && IsWordOrLiteral(next.Kind())) 927switch (next.Kind()) 934switch (token.Kind()) 1224return token.Kind() == SyntaxKind.XmlTextLiteralNewLineToken; 1487SyntaxKind nextTokenKind = GetNextRelevantToken(node.EndQuoteToken).Kind();
Syntax\SyntaxTokenParser.cs (3)
61/// token parser to the end of the leading trivia of the next token. The returned result will have a token with <see cref="CSharpExtensions.Kind(SyntaxToken)"/> 76/// token parser to the end of the trailing trivia from the current location. The returned result will have a token with <see cref="CSharpExtensions.Kind(SyntaxToken)"/> 134return contextualKind == Token.Kind() ? SyntaxKind.None : contextualKind;
Microsoft.CodeAnalysis.CSharp.CodeStyle (231)
src\Analyzers\CSharp\Analyzers\AddAccessibilityModifiers\CSharpAddAccessibilityModifiers.cs (1)
33if (name.Kind() == SyntaxKind.None)
src\Analyzers\CSharp\Analyzers\AddBraces\CSharpAddBracesDiagnosticAnalyzer.cs (1)
117SyntaxFacts.GetText(firstToken.Kind())));
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (1)
132if (member.Modifiers.Any(m => m.Kind() is SyntaxKind.PublicKeyword or SyntaxKind.ProtectedKeyword or SyntaxKind.InternalKeyword))
src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (1)
86if (argumentNode.RefOrOutKeyword.Kind() != SyntaxKind.OutKeyword)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessarySuppressions\CSharpRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.cs (1)
19switch (attributeList.Target?.Identifier.Kind())
src\Analyzers\CSharp\Analyzers\UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs (1)
77if (argument.RefKindKeyword.Kind() != SyntaxKind.None)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
583siblingArgument.RefOrOutKeyword.Kind() == SyntaxKind.OutKeyword &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\TypeStyle\TypeStyleHelper.cs (1)
225? SyntaxFacts.IsPredefinedType(predefinedType.Keyword.Kind())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (5)
36if (token.Kind() is SyntaxKind.MultiLineRawStringLiteralToken or SyntaxKind.Utf8MultiLineRawStringLiteralToken) 62switch (token.Kind()) 96return interpolatedString.StringStartToken.Kind() switch 140if (token.Kind() is SyntaxKind.Utf8SingleLineRawStringLiteralToken) 146if (token.Kind() is SyntaxKind.SingleLineRawStringLiteralToken or SyntaxKind.Utf8SingleLineRawStringLiteralToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ArgumentSyntaxExtensions.cs (4)
19return [SyntaxFactory.Token(argument.RefKindKeyword.Kind())]; 26=> argument?.RefKindKeyword.Kind() switch 82if (argument.RefOrOutKeyword.Kind() == SyntaxKind.OutKeyword && 88if (argument.RefOrOutKeyword.Kind() == SyntaxKind.RefKeyword &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\AssignmentExpressionSyntaxExtensions.cs (1)
17assignment.OperatorToken.Kind() == SyntaxKind.EqualsToken &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (2)
84return firstToken.Kind() != SyntaxKind.None 85&& firstToken.GetPreviousToken().Kind() == SyntaxKind.CloseParenToken;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.DeclarationFinder.cs (1)
32if (syntaxToken.Kind() == SyntaxKind.IdentifierToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
151switch (token.Kind())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
73if (prevToken.Kind() == SyntaxKind.None)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.SingleLineRewriter.cs (2)
60if (token.Kind() is SyntaxKind.StringLiteralToken or SyntaxKind.InterpolatedStringTextToken) 67token.Kind(),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (16)
21=> kind = token.Kind(); 40=> token.Kind() == kind || token.HasMatchingText(kind); 46=> token.Kind() is SyntaxKind.OpenBraceToken or SyntaxKind.CommaToken && 65if (token.Kind() == SyntaxKind.IdentifierToken) 78var tokenKind = token.Kind(); 127switch (token.Kind()) 163if (previousToken.Kind() == SyntaxKind.None) 196=> token.Kind() == SyntaxKind.StringLiteralToken && !token.IsVerbatimStringLiteral(); 200switch (token.Kind()) 234if (genericIdentifier.GetNextToken(includeSkipped: true).Kind() == SyntaxKind.LessThanToken) 258Contract.ThrowIfFalse(genericIdentifier.Kind() == SyntaxKind.IdentifierToken); 262Contract.ThrowIfFalse(token.Kind() == SyntaxKind.LessThanToken); 271if (next.Kind() == SyntaxKind.None) 279if (token.Kind() == SyntaxKind.GreaterThanToken) 292switch (token.Kind()) 330if (SyntaxFacts.IsKeywordKind(token.Kind()))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (7)
198var endsWithNewLine = trivia.GetStructure()!.GetLastToken(includeSkipped: true).Kind() == SyntaxKind.XmlTextLiteralNewLineToken; 320var kind = token.Kind(); 395if (token.Kind() is SyntaxKind.EndOfDirectiveToken or SyntaxKind.EndOfFileToken) 399if (token.Kind() is 416if (token.Kind() is 426if (token.Kind() is SyntaxKind.InterpolatedStringTextToken) 451if (token.Kind() == SyntaxKind.CharacterLiteralToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\DefaultOperationProvider.cs (1)
45var space = currentToken.Kind() == SyntaxKind.EndOfFileToken ? 0 : 1;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\FormattingHelpers.cs (33)
83=> token.Kind() == SyntaxKind.OpenParenToken && token.Parent.IsKind(SyntaxKind.ParameterList); 86=> token.Kind() == SyntaxKind.CloseParenToken && token.Parent.IsKind(SyntaxKind.ParameterList); 90return token.Kind() == SyntaxKind.OpenParenToken && 96return token.Kind() == SyntaxKind.CloseParenToken && 119=> token.Kind() == SyntaxKind.ColonToken && token.Parent.IsKind(SyntaxKind.BaseList); 122=> token.Kind() == SyntaxKind.CommaToken && (token.Parent.IsAnyArgumentList() || token.Parent?.Kind() is SyntaxKind.ParameterList or SyntaxKind.FunctionPointerParameterList); 125=> token.Kind() == SyntaxKind.OpenParenToken && token.Parent.IsKind(SyntaxKind.ParameterList) && token.Parent.Parent.IsKind(SyntaxKind.ParenthesizedLambdaExpression); 150token.Kind() == SyntaxKind.SemicolonToken && 157if (token.Kind() != SyntaxKind.SemicolonToken) 173if (token.Kind() != SyntaxKind.CloseBraceToken) 183if (token.Kind() != SyntaxKind.CloseBraceToken) 209return token.Kind() == SyntaxKind.CommaToken && 215return token.Kind() == SyntaxKind.CommaToken && 305=> token.IsDotInMemberAccess() || (token.Kind() == SyntaxKind.DotToken && token.Parent.IsKind(SyntaxKind.QualifiedName)); 314return token.Kind() == SyntaxKind.DotToken 320if (token.Kind() == SyntaxKind.GreaterThanToken) 328return token.Kind() == SyntaxKind.CommaToken && 334=> token.Kind() == SyntaxKind.ColonToken && token.Parent is CasePatternSwitchLabelSyntax; 337=> token.Kind() == SyntaxKind.ColonToken && token.Parent.IsKind(SyntaxKind.SwitchExpressionArm); 340=> token.Kind() == SyntaxKind.CommaToken && token.Parent.IsKind(SyntaxKind.SwitchExpression); 343=> token.Kind() == SyntaxKind.CommaToken && token.Parent.IsKind(SyntaxKind.PropertyPatternClause); 347return token.Kind() == SyntaxKind.IdentifierToken && 357return token.Kind() == SyntaxKind.ColonToken && 375return token.Kind() == SyntaxKind.InKeyword && 382return token.Kind() == SyntaxKind.FromKeyword && 467return (token1.Kind() == SyntaxKind.OpenParenToken && token2.Kind() == SyntaxKind.CloseParenToken) || 468(token1.Kind() == SyntaxKind.OpenBracketToken && token2.Kind() == SyntaxKind.CloseBracketToken); 473if (token.Kind() is not SyntaxKind.SemicolonToken and not SyntaxKind.CloseBraceToken) 512if (token.Kind() is not SyntaxKind.PlusToken and not SyntaxKind.MinusToken) 528return currentToken.Kind() == SyntaxKind.OpenParenToken && 543=> token.Kind() == SyntaxKind.CommaToken && token.Parent.IsKind(SyntaxKind.CollectionExpression);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\BaseFormattingRule.cs (14)
24if (startToken.Kind() == SyntaxKind.None || endToken.Kind() == SyntaxKind.None) 39if (startToken.Kind() == SyntaxKind.None || endToken.Kind() == SyntaxKind.None) 63if (startToken.Kind() == SyntaxKind.None || endToken.Kind() == SyntaxKind.None) 77if (startToken.Kind() == SyntaxKind.None || endToken.Kind() == SyntaxKind.None) 92if (startToken.Kind() == SyntaxKind.None || endToken.Kind() == SyntaxKind.None) 128if (startToken.Kind() == SyntaxKind.None || endToken.Kind() == SyntaxKind.None) 138if (anchorToken.Kind() == SyntaxKind.None || endToken.Kind() == SyntaxKind.None)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (22)
176if (previousToken.Kind() != SyntaxKind.SemicolonToken) 179if (currentToken.Kind() == SyntaxKind.EndOfFileToken) 182if (currentToken.Kind() == SyntaxKind.CloseBraceToken) 310if (currentToken.Kind() == SyntaxKind.None) 315switch (previousToken.Kind()) 329|| currentToken.Kind() == SyntaxKind.OpenBraceToken) ? 1 : 0; 362return currentToken.Kind() != SyntaxKind.IfKeyword ? 1 : 0; 373if ((currentToken.Kind() == SyntaxKind.FromKeyword && currentToken.Parent.IsKind(SyntaxKind.FromClause)) || 374(currentToken.Kind() == SyntaxKind.LetKeyword && currentToken.Parent.IsKind(SyntaxKind.LetClause)) || 375(currentToken.Kind() == SyntaxKind.WhereKeyword && currentToken.Parent.IsKind(SyntaxKind.WhereClause)) || 376(currentToken.Kind() == SyntaxKind.JoinKeyword && currentToken.Parent.IsKind(SyntaxKind.JoinClause)) || 377(currentToken.Kind() == SyntaxKind.JoinKeyword && currentToken.Parent.IsKind(SyntaxKind.JoinIntoClause)) || 378(currentToken.Kind() == SyntaxKind.OrderByKeyword && currentToken.Parent.IsKind(SyntaxKind.OrderByClause)) || 379(currentToken.Kind() == SyntaxKind.SelectKeyword && currentToken.Parent.IsKind(SyntaxKind.SelectClause)) || 380(currentToken.Kind() == SyntaxKind.GroupKeyword && currentToken.Parent.IsKind(SyntaxKind.GroupClause))) 385switch (currentToken.Kind()) 399parent.Target.Identifier.Kind() is SyntaxKind.AssemblyKeyword or SyntaxKind.ModuleKeyword && 425if (nextToken.Kind() == SyntaxKind.CloseBraceToken) 430nextToken.Kind() is SyntaxKind.CatchKeyword or 437nextToken.Kind() == SyntaxKind.WhileKeyword && 442else if (nextToken.Kind() == SyntaxKind.EndOfFileToken) 458else if (currentToken.Kind() == SyntaxKind.CloseBraceToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\EndOfFileTokenFormattingRule.cs (2)
17if (currentToken.Kind() == SyntaxKind.EndOfFileToken) 29if (currentToken.Kind() == SyntaxKind.EndOfFileToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\QueryExpressionFormattingRule.cs (1)
148switch (currentToken.Kind())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (3)
47var previousKind = previousToken.Kind(); 48var currentKind = currentToken.Kind(); 85if ((previousToken.IsKeyword() || previousToken.Kind() is SyntaxKind.QuestionToken or SyntaxKind.AsteriskToken or SyntaxKind.CloseBracketToken or SyntaxKind.CloseParenToken or SyntaxKind.GreaterThanToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\StructuredTriviaFormattingRule.cs (5)
29if (previousToken.Kind() == SyntaxKind.HashToken && SyntaxFacts.IsPreprocessorKeyword(currentToken.Kind())) 34if (previousToken.Kind() == SyntaxKind.RegionKeyword && currentToken.Kind() == SyntaxKind.EndOfDirectiveToken) 39if (currentToken.Kind() == SyntaxKind.EndOfDirectiveToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\TokenBasedFormattingRule.cs (57)
48switch (currentToken.Kind()) 73if (previousToken.Kind() == SyntaxKind.CloseBraceToken && currentToken.Kind() == SyntaxKind.WhileKeyword) 79switch (previousToken.Kind()) 151if (previousToken.Kind() == SyntaxKind.ElseKeyword && currentToken.Kind() != SyntaxKind.IfKeyword) 170if (previousToken.Kind() == SyntaxKind.CloseParenToken && previousToken.Parent.IsEmbeddedStatementOwnerWithCloseParen()) 175if (previousToken.Kind() == SyntaxKind.DoKeyword && previousToken.Parent.IsKind(SyntaxKind.DoStatement)) 187if (previousToken.Kind() == SyntaxKind.SemicolonToken && 188(currentToken.Kind() == SyntaxKind.CaseKeyword || currentToken.Kind() == SyntaxKind.DefaultKeyword || currentToken.Kind() == SyntaxKind.ElseKeyword)) 194if (previousToken.Kind() == SyntaxKind.SemicolonToken) 201if (previousToken.Kind() == SyntaxKind.CloseBracketToken && previousToken.Parent is AttributeListSyntax) 260if (currentToken.Kind() == SyntaxKind.SemicolonToken) 263if (previousToken.Kind() == SyntaxKind.SemicolonToken) 269if (previousToken.Kind() == SyntaxKind.CloseParenToken && previousToken.Parent.IsEmbeddedStatementOwnerWithCloseParen()) 279if (previousToken.Kind() == SyntaxKind.OmittedArraySizeExpressionToken || 280previousToken.Kind() == SyntaxKind.OmittedTypeArgumentToken || 281currentToken.Kind() == SyntaxKind.OmittedArraySizeExpressionToken || 282currentToken.Kind() == SyntaxKind.OmittedTypeArgumentToken) 307if (currentToken.Kind() == SyntaxKind.OpenParenToken && 308previousToken.Kind() == SyntaxKind.ThisKeyword) 313if (previousToken.Kind() == SyntaxKind.NewKeyword) 325if (currentToken.Kind() == SyntaxKind.OpenParenToken) 327if (previousToken.Kind() == SyntaxKind.IdentifierToken || 328previousToken.Kind() == SyntaxKind.DefaultKeyword || 329previousToken.Kind() == SyntaxKind.BaseKeyword || 330previousToken.Kind() == SyntaxKind.ThisKeyword || 346if (previousToken.Kind() == SyntaxKind.CommaToken && currentToken.Kind() == SyntaxKind.OpenBracketToken && currentToken.Parent is AttributeListSyntax) 352if (previousToken.Kind() == SyntaxKind.CloseBracketToken && previousToken.Parent is AttributeListSyntax) 363switch (currentToken.Kind()) 410previousToken.Kind() == SyntaxKind.CloseParenToken) 419if (previousToken.Kind() == SyntaxKind.LessThanToken) 425if (previousToken.Kind() == SyntaxKind.GreaterThanToken && currentToken.Kind() == SyntaxKind.GreaterThanToken) 432if ((currentToken.Kind() == SyntaxKind.LessThanToken || currentToken.Kind() == SyntaxKind.GreaterThanToken) && 439if ((previousToken.Kind() == SyntaxKind.PlusPlusToken || previousToken.Kind() == SyntaxKind.MinusMinusToken) && 446if ((currentToken.Kind() == SyntaxKind.PlusPlusToken || currentToken.Kind() == SyntaxKind.MinusMinusToken) && 459if (currentToken.Kind() == SyntaxKind.QuestionToken && 473if (currentToken.Kind() == SyntaxKind.ExclamationToken && 480if (currentToken.Kind() == SyntaxKind.AsteriskToken && currentToken.Parent is PointerTypeSyntax) 486if (previousToken.Kind() == SyntaxKind.AsteriskToken && previousToken.Parent is PrefixUnaryExpressionSyntax) 492switch (previousToken.Kind()) 502var space = (previousToken.Kind() == currentToken.Kind()) ? 0 : 1; 514previousToken.Kind() != currentToken.Kind()) 520if (previousToken.Kind() == SyntaxKind.ExclamationToken 527if (previousToken.Kind() == SyntaxKind.TildeToken && (previousToken.Parent is PrefixUnaryExpressionSyntax || previousToken.Parent is DestructorDeclarationSyntax)) 533if (previousToken.Kind() == SyntaxKind.AmpersandToken && 540if (previousToken.Kind() == SyntaxKind.ColonColonToken || currentToken.Kind() == SyntaxKind.ColonColonToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\WrappingFormattingRule.cs (2)
183if (startToken.Kind() == SyntaxKind.None || endToken.Kind() == SyntaxKind.None)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Indentation\CSharpSmartTokenFormatter.cs (4)
49Contract.ThrowIfTrue(startToken.Kind() is SyntaxKind.None or SyntaxKind.EndOfFileToken); 50Contract.ThrowIfTrue(endToken.Kind() is SyntaxKind.None or SyntaxKind.EndOfFileToken); 80Contract.ThrowIfTrue(token.Kind() is SyntaxKind.None or SyntaxKind.EndOfFileToken); 84if (previousToken.Kind() == SyntaxKind.None)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (5)
290AssignmentExpressionSyntax _ when token.Kind() == SyntaxKind.EqualsToken => GetDeconstructionAssignmentMethods(semanticModel, node).As<ISymbol>(), 291ForEachVariableStatementSyntax _ when token.Kind() == SyntaxKind.InKeyword => GetDeconstructionForEachMethods(semanticModel, node).As<ISymbol>(), 314if (token.Kind() == SyntaxKind.CommaToken) 324if (ordering.AscendingOrDescendingKeyword.Kind() == SyntaxKind.None) 328else if (orderByClauseSyntax.Orderings[0].AscendingOrDescendingKeyword.Kind() == SyntaxKind.None)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (3)
111accessibility = (token.Kind(), accessibility) switch 128modifiers |= token.Kind() switch 149isDefault |= token.Kind() == SyntaxKind.DefaultKeyword;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (17)
98var kind = token.Kind(); 108=> SyntaxFacts.IsReservedKeyword(token.Kind()); 111=> SyntaxFacts.IsContextualKeyword(token.Kind()); 114=> SyntaxFacts.IsPreprocessorKeyword(token.Kind()); 137if (lineDirective.Line.Kind() == SyntaxKind.DefaultKeyword) 142else if (lineDirective.Line.Kind() == SyntaxKind.NumericLiteralToken && 281switch (token.Kind()) 325=> token.Kind() switch 477switch (token.Kind()) 504=> token.Kind() is SyntaxKind.StringLiteralToken or SyntaxKind.InterpolatedStringTextToken; 521if (token.Kind() == SyntaxKind.CommaToken && token.Parent.IsKind(SyntaxKind.OrderByClause)) 526if (token.Kind() is SyntaxKind.OpenBracketToken or SyntaxKind.CloseBracketToken 556simpleName.GetLastToken().GetNextToken().Kind() == SyntaxKind.LessThanToken; 607argument.RefOrOutKeyword.Kind() == SyntaxKind.None && 1200=> token.Kind() == SyntaxKind.NumericLiteralToken; 1243attributeList.Target?.Identifier.Kind() == attributeTarget; 1415if (token.Kind() == SyntaxKind.OverrideKeyword && token.Parent is MemberDeclarationSyntax member)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\FormattingRangeHelper.cs (12)
22Contract.ThrowIfTrue(endToken.Kind() == SyntaxKind.None); 40while (currentToken.Kind() != SyntaxKind.CloseBraceToken && previousToken.Kind() == SyntaxKind.OpenBraceToken) 43if (closeBrace.Kind() == SyntaxKind.None || !AreTwoTokensOnSameLine(previousToken, closeBrace)) 58switch (endToken.Kind()) 85if (endToken.Kind() == SyntaxKind.SkippedTokensTrivia) 289return previousToken.Kind() == SyntaxKind.None ? token : previousToken; 311if (previousToken.Kind() == SyntaxKind.None) 409return token.Kind() == SyntaxKind.ColonToken && 416if (previousToken.Kind() is not SyntaxKind.SemicolonToken and not SyntaxKind.CloseBraceToken) 421if (currentToken.Kind() == SyntaxKind.CloseBraceToken) 438if (token.Kind() == SyntaxKind.CloseBraceToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TokenComparer.cs (2)
24x.GetPreviousToken(includeSkipped: true).Kind() is SyntaxKind.UsingKeyword or SyntaxKind.StaticKeyword && 25y.GetPreviousToken(includeSkipped: true).Kind() is SyntaxKind.UsingKeyword or SyntaxKind.StaticKeyword)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (83)
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (1)
287if (firstBodyToken.Kind() != SyntaxKind.EndOfFileToken
src\Analyzers\CSharp\CodeFixes\DocumentationComments\CSharpRemoveDocCommentNodeCodeFixProvider.cs (2)
47=> token.Kind() == SyntaxKind.XmlTextLiteralToken && IsWhitespace(token.Text); 50=> token.Kind() == SyntaxKind.XmlTextLiteralNewLineToken;
src\Analyzers\CSharp\CodeFixes\FixIncorrectConstraint\CSharpFixIncorrectConstraintCodeFixProvider.cs (1)
60return enumOrDelegateKeyword.Kind() is SyntaxKind.EnumKeyword or SyntaxKind.DelegateKeyword;
src\Analyzers\CSharp\CodeFixes\MakeMethodAsynchronous\CSharpMakeMethodAsynchronousCodeFixProvider.cs (1)
49return token.Kind() == SyntaxKind.IdentifierToken && token.Text == "await";
src\Analyzers\CSharp\CodeFixes\SimplifyInterpolation\CSharpSimplifyInterpolationCodeFixProvider.cs (1)
36if (interpolatedString.StringStartToken.Kind() == SyntaxKind.InterpolatedVerbatimStringStartToken)
src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (1)
54if (classOrStructKeyword.Kind() is SyntaxKind.ClassKeyword or SyntaxKind.StructKeyword)
src\Analyzers\CSharp\CodeFixes\UseConditionalExpression\MultiLineConditionalExpressionFormattingRule.cs (1)
34=> token.Kind() is SyntaxKind.QuestionToken or SyntaxKind.ColonToken && token.GetRequiredParent().HasAnnotation(SpecializedFormattingAnnotation);
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
224var inKeyword = current.Modifiers.FirstOrDefault(t => t.Kind() == SyntaxKind.InKeyword);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
195=> declaration.ChildTokens().Where(t => t.Kind() is SyntaxKind.OpenBraceToken or SyntaxKind.CloseBraceToken && t.IsMissing).Any();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (5)
215if (x.ImplicitOrExplicitKeyword.Kind() != y.ImplicitOrExplicitKeyword.Kind()) 217return x.ImplicitOrExplicitKeyword.Kind() == SyntaxKind.ImplicitKeyword ? -1 : 1; 403s_operatorPrecedenceMap.TryGetValue(x.Kind(), out var xPrecedence); 404s_operatorPrecedenceMap.TryGetValue(y.Kind(), out var yPrecedence);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (27)
19token.Kind() is SyntaxKind.UsingKeyword or 113switch (token.Kind()) 207if (token.Kind() == SyntaxKind.CloseBraceToken) 217if (token.Kind() == SyntaxKind.SemicolonToken) 250if (token.Kind() == SyntaxKind.CloseBracketToken) 272if (token.Kind() == SyntaxKind.CloseParenToken) 300if (token.Kind() == SyntaxKind.IdentifierToken && 301token.GetPreviousToken(includeSkipped: true).Kind() == SyntaxKind.IntoKeyword) 326if (targetToken.Kind() is SyntaxKind.IfKeyword or 333if (targetToken.Kind() == SyntaxKind.OpenParenToken && 363if (targetToken.Kind() is not (SyntaxKind.IdentifierToken or SyntaxKind.CloseParenToken or SyntaxKind.CloseBracketToken)) 395if (targetToken.Kind() == SyntaxKind.OpenBraceToken && 401if (targetToken.Kind() == SyntaxKind.ColonToken) 409if (targetToken.Kind() is SyntaxKind.SemicolonToken or 430return targetToken.Kind() is SyntaxKind.CommaToken or SyntaxKind.OpenParenToken && 449if (targetToken.Kind() == SyntaxKind.ColonToken && 465if (targetToken.Kind() is SyntaxKind.OpenParenToken or 493if (targetToken.Kind() == SyntaxKind.OperatorKeyword && 570while (targetToken.Kind() is SyntaxKind.InternalKeyword or 581if (targetToken.Kind() == SyntaxKind.OpenBraceToken && 589if (targetToken.Kind() == SyntaxKind.CloseBraceToken && 597if (targetToken.Kind() == SyntaxKind.SemicolonToken && 604if (targetToken.Kind() == SyntaxKind.CloseBracketToken && 637if (targetToken.Kind() == SyntaxKind.LessThanToken && 643if (targetToken.Kind() == SyntaxKind.CommaToken && 649if (targetToken.Kind() == SyntaxKind.CloseBracketToken && 662if (token.Kind() == SyntaxKind.CommaToken && token.Parent is BaseArgumentListSyntax)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (20)
419(nextToken.Kind() == SyntaxKind.GlobalKeyword && nextToken.GetAncestor<UsingDirectiveSyntax>()?.GlobalKeyword == nextToken)) 937switch (token.Kind()) 956targetToken.Kind() is SyntaxKind.ColonToken or SyntaxKind.CommaToken; 972if (token.Kind() is not SyntaxKind.LessThanToken and not SyntaxKind.CommaToken) 1156if (token.Kind() is SyntaxKind.OpenBracketToken or SyntaxKind.CommaToken) 1186token.GetPreviousToken(includeSkipped: true).Kind() is SyntaxKind.ImplicitKeyword or SyntaxKind.ExplicitKeyword) 1228if (token.Kind() is SyntaxKind.OpenParenToken or SyntaxKind.CommaToken) 1261if (token.Kind() is SyntaxKind.OpenParenToken or SyntaxKind.CommaToken) 1287if (token.Kind() is SyntaxKind.RefKeyword or SyntaxKind.InKeyword or SyntaxKind.OutKeyword) 1384if (leftToken.Kind() is SyntaxKind.CaseKeyword or SyntaxKind.IsKeyword) 1391if (leftToken.Kind() is SyntaxKind.OpenBraceToken or SyntaxKind.CommaToken && leftToken.Parent.IsKind(SyntaxKind.SwitchExpression)) 1398if (leftToken.Kind() is SyntaxKind.OpenParenToken or SyntaxKind.CommaToken && leftToken.Parent.IsKind(SyntaxKind.PositionalPatternClause)) 1405if (leftToken.Kind() is SyntaxKind.OpenBracketToken or SyntaxKind.CommaToken && leftToken.Parent.IsKind(SyntaxKind.ListPattern)) 1447if (leftToken.Kind() is SyntaxKind.GreaterThanToken or SyntaxKind.GreaterThanEqualsToken or SyntaxKind.LessThanToken or SyntaxKind.LessThanEqualsToken && 1484return leftToken.Kind() is not (SyntaxKind.OrKeyword 1568if (possibleCommaOrParen.Kind() is not (SyntaxKind.OpenParenToken or SyntaxKind.CommaToken)) 1691if (leftToken.Kind() is SyntaxKind.OpenParenToken or SyntaxKind.CommaToken && 1919if (token.Kind() is SyntaxKind.IsKeyword or SyntaxKind.AsKeyword) 2343if (previousToken.Kind() is SyntaxKind.AsteriskToken or SyntaxKind.QuestionToken && 2872if (token.Kind() is SyntaxKind.IdentifierToken &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SyntaxTokenListExtensions.cs (1)
13=> tokenList.SkipWhile(t => kinds.Contains(t.Kind()));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Indentation\CSharpIndentationService.cs (3)
90if (previousToken.Kind() == SyntaxKind.None || previousToken.IsMissing) 110return token.Kind() is SyntaxKind.None or SyntaxKind.EndOfDirectiveToken or SyntaxKind.EndOfFileToken; 142constructorInitializer.ArgumentList.OpenParenToken.Kind() != SyntaxKind.None &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Indentation\CSharpIndentationService.Indenter.cs (4)
77Contract.ThrowIfTrue(token.Kind() == SyntaxKind.None); 123if (token.Kind() is SyntaxKind.InterpolatedMultiLineRawStringStartToken or SyntaxKind.InterpolatedStringTextToken 178token.Kind() is SyntaxKind.InterpolatedVerbatimStringStartToken or SyntaxKind.InterpolatedStringTextToken || 236switch (token.Kind())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (13)
423if (previousToken.Kind() == SyntaxKind.NewKeyword && 424previousToken.GetPreviousToken().Kind() is SyntaxKind.EqualsToken or SyntaxKind.OpenParenToken or SyntaxKind.CommaToken) 498if (previousToken != argumentList.OpenParenToken && previousToken.Kind() != SyntaxKind.CommaToken) 528if (previousToken != attributeArgumentList.OpenParenToken && previousToken.Kind() != SyntaxKind.CommaToken) 802if (previousToken.HasValue && previousToken.Value.GetPreviousToken().Kind() == SyntaxKind.EqualsToken) 877if (previousToken != bracketedArgumentList.OpenBracketToken && previousToken.Kind() != SyntaxKind.CommaToken) 940switch (operatorToken.Kind()) 959if (operatorToken.Kind() is SyntaxKind.AmpersandAmpersandToken or 995if (operatorToken.Kind() is SyntaxKind.AmpersandToken or 1011if (operatorToken.Kind() == SyntaxKind.PlusToken) 1024switch (operatorToken.Kind()) 1609var isAsync = anonymousFunction.AsyncKeyword.Kind() != SyntaxKind.None; 2086if (token.Kind() is SyntaxKind.OpenBraceToken or SyntaxKind.CommaToken)
Microsoft.CodeAnalysis.CSharp.EditorFeatures (13)
AutomaticCompletion\AutomaticLineEnderCommandHandler.cs (4)
127if (startToken.IsMissing || startToken.Kind() == SyntaxKind.None) 227if (previousToken.Kind() == SyntaxKind.StringLiteralToken && previousToken.ToString().Last() != '"') 232if (previousToken.Kind() == SyntaxKind.CharacterLiteralToken && previousToken.ToString().Last() != '\'') 266if (!lastToken.IsMissing && lastToken.Kind() == SyntaxKind.SemicolonToken)
StringCopyPaste\StringCopyPasteHelpers.cs (2)
164=> interpolatedString.StringStartToken.Kind() is SyntaxKind.InterpolatedSingleLineRawStringStartToken or SyntaxKind.InterpolatedMultiLineRawStringStartToken; 167=> literal.Token.Kind() is SyntaxKind.SingleLineRawStringLiteralToken or SyntaxKind.MultiLineRawStringLiteralToken;
StringCopyPaste\StringInfo.cs (2)
96if (literal.Token.Kind() is SyntaxKind.SingleLineRawStringLiteralToken) 109else if (literal.Token.Kind() is SyntaxKind.MultiLineRawStringLiteralToken)
TextStructureNavigation\CSharpTextStructureNavigatorProvider.cs (5)
32switch (token.Kind()) 69if (token.Kind() is SyntaxKind.Utf8MultiLineRawStringLiteralToken or SyntaxKind.Utf8SingleLineRawStringLiteralToken) 85=> token.Kind() switch 94if (token.Kind() is SyntaxKind.StringLiteralToken or SyntaxKind.Utf8StringLiteralToken && 103else if (token.Kind() is
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (4)
ExtractMethod\MiscTests.cs (2)
49var publicToken = rootWithAnnotation.DescendantTokens().First(t => t.Kind() == SyntaxKind.PublicKeyword); 94var publicToken = rootWithAnnotation.DescendantTokens().First(t => t.Kind() == SyntaxKind.PublicKeyword);
Formatting\Indentation\SmartTokenFormatterFormatRangeTests.cs (2)
3423Assert.Equal(tokenKind, endToken.Kind()); 3437Assert.Equal(startTokenKind, tokenRange.Value.Item1.Kind());
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (2)
EmbeddedLanguages\Json\CSharpJsonParserTests.cs (1)
37Assert.True(token.Kind() == SyntaxKind.StringLiteralToken);
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests.cs (1)
35Assert.True(token.Kind() == SyntaxKind.StringLiteralToken);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenInterpolatedString.cs (1)
46foreach (var token in tree.GetRoot().DescendantTokens().Where(t => t.Kind() != SyntaxKind.EndOfFileToken))
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
Semantics\OutVarTests.cs (2)
1227if (((ArgumentSyntax)reference.Parent).RefOrOutKeyword.Kind() != SyntaxKind.OutKeyword) 1336if (((ArgumentSyntax)reference.Parent).RefOrOutKeyword.Kind() != SyntaxKind.None)
Microsoft.CodeAnalysis.CSharp.Features (206)
BraceCompletion\InterpolatedStringBraceCompletionService.cs (1)
37=> leftToken.Kind() is SyntaxKind.InterpolatedStringStartToken or SyntaxKind.InterpolatedVerbatimStringStartToken;
ChangeSignature\ChangeSignatureFormattingRule.cs (1)
54if (previousToken.Kind() == SyntaxKind.CommaToken && s_allowableKinds.Contains(previousToken.Parent.Kind()))
CodeFixes\Suppression\CSharpSuppressionCodeFixProvider.cs (4)
90attributeList.Target.Identifier.Kind() == SyntaxKind.AssemblyKeyword; 97=> token.Kind() == SyntaxKind.EndOfFileToken; 227enableDirective = pragmaWarning.DisableOrRestoreKeyword.Kind() == SyntaxKind.RestoreKeyword; 241var toggledKeywordKind = currentKeyword.Kind() == SyntaxKind.DisableKeyword ? SyntaxKind.RestoreKeyword : SyntaxKind.DisableKeyword;
CodeRefactorings\InlineTemporary\InlineTemporaryCodeRefactoringProvider.cs (1)
113if (argument.RefOrOutKeyword.Kind() != SyntaxKind.None)
CodeRefactorings\UseRecursivePatterns\UseRecursivePatternsCodeRefactoringProvider.cs (1)
292return Token(token.Kind() switch
Completion\CompletionProviders\AttributeNamedParameterCompletionProvider.cs (2)
111if (token.Kind() == SyntaxKind.CommaToken && token.Parent is AttributeArgumentListSyntax argumentList) 133if (token.Kind() == SyntaxKind.CommaToken && token.Parent is AttributeArgumentListSyntax argumentList)
Completion\CompletionProviders\CompletionUtilities.cs (2)
34if (token.Kind() == SyntaxKind.DotToken) 38if (token.Kind() == SyntaxKind.DotDotToken && token.SpanStart == characterPosition)
Completion\CompletionProviders\CrefCompletionProvider.cs (1)
121return token.Kind() is SyntaxKind.DoubleQuoteToken or SyntaxKind.SingleQuoteToken &&
Completion\CompletionProviders\CSharpSuggestionModeCompletionProvider.cs (6)
104return token.Kind() is SyntaxKind.OpenBraceToken or SyntaxKind.CommaToken; 121if (token.Kind() == SyntaxKind.LessThanToken && token.Parent is BinaryExpressionSyntax) 127if (token.Kind() is SyntaxKind.OpenParenToken or SyntaxKind.CommaToken) 147if (token.Kind() == SyntaxKind.OpenParenToken && 155if (token.Kind() == SyntaxKind.OpenParenToken && 174if (token.Kind() is SyntaxKind.OpenParenToken or SyntaxKind.CommaToken && token.Parent.IsKind(SyntaxKind.ArgumentList)
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (4)
418if (token.Kind() is SyntaxKind.LessThanToken or SyntaxKind.CommaToken && 500=> token.Kind() is 549switch (modifer.Kind()) 595switch (modifier.Kind())
Completion\CompletionProviders\EnumAndCompletionListTagCompletionProvider.cs (1)
286if (token.Kind() is SyntaxKind.BarToken or
Completion\CompletionProviders\ExplicitInterfaceTypeCompletionProvider.cs (3)
127if (tokenBeforeType.Kind() == SyntaxKind.AsyncKeyword) 132if (tokenBeforeType.Kind() == SyntaxKind.OpenBraceToken) 138if (tokenBeforeType.Kind() is SyntaxKind.CloseBraceToken or
Completion\CompletionProviders\ObjectAndWithInitializerCompletionProvider.cs (1)
188.Where(b => b.OperatorToken.Kind() == SyntaxKind.EqualsToken)
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider.cs (2)
85var expression = dotToken.Kind() == SyntaxKind.DotToken 190var questionToken = dotToken.GetPreviousToken().Kind() == SyntaxKind.QuestionToken
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Conversions.cs (1)
84var questionToken = dotToken.GetPreviousToken().Kind() == SyntaxKind.QuestionToken
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Operators.cs (1)
147dotLikeToken.Kind() == SyntaxKind.DotDotToken ? dotLikeToken.Span.Start + 1 : dotLikeToken.Span.End),
Completion\CompletionProviders\OverrideCompletionProvider.cs (2)
106if (token.Kind() == SyntaxKind.CloseBracketToken) 120switch (token.Kind())
Completion\CompletionProviders\PartialMethodCompletionProvider.cs (1)
41switch (mod.Kind())
Completion\CompletionProviders\Scripting\DirectiveCompletionProviderUtilities.cs (2)
17if (token.Kind() is SyntaxKind.EndOfDirectiveToken or SyntaxKind.EndOfFileToken) 22if (token.Kind() == SyntaxKind.StringLiteralToken && token.Parent!.Kind() == directiveKind)
Completion\CompletionProviders\SymbolCompletionProvider.cs (1)
175return token.GetPreviousToken().Kind() != SyntaxKind.NumericLiteralToken;
Completion\KeywordRecommenders\AliasKeywordRecommender.cs (1)
26if (token.Kind() == SyntaxKind.ExternKeyword)
Completion\KeywordRecommenders\AllowsKeywordRecommender.cs (2)
40if (token.Kind() == SyntaxKind.CommaToken && 45.Any(c => c.ClassOrStructKeyword.Kind() == SyntaxKind.ClassKeyword))
Completion\KeywordRecommenders\AnnotationsKeywordRecommender.cs (5)
26(previousToken1.Kind() == SyntaxKind.EnableKeyword || previousToken1.Kind() == SyntaxKind.DisableKeyword || previousToken1.Kind() == SyntaxKind.RestoreKeyword) && 27previousToken2.Kind() == SyntaxKind.NullableKeyword && 28previousToken3.Kind() == SyntaxKind.HashToken;
Completion\KeywordRecommenders\AssemblyKeywordRecommender.cs (1)
23if (token.Kind() == SyntaxKind.OpenBracketToken &&
Completion\KeywordRecommenders\BaseKeywordRecommender.cs (1)
51if (token.Kind() == SyntaxKind.ColonToken &&
Completion\KeywordRecommenders\ByKeywordRecommender.cs (1)
45token.Kind() == SyntaxKind.IdentifierToken &&
Completion\KeywordRecommenders\CaseKeywordRecommender.cs (1)
30if (token.Kind() == SyntaxKind.GotoKeyword &&
Completion\KeywordRecommenders\CheckedKeywordRecommender.cs (2)
31if (targetToken.Kind() == SyntaxKind.OperatorKeyword) 58if (previousToken.Kind() == SyntaxKind.ExplicitKeyword)
Completion\KeywordRecommenders\ChecksumKeywordRecommender.cs (2)
25previousToken1.Kind() == SyntaxKind.PragmaKeyword && 26previousToken2.Kind() == SyntaxKind.HashToken;
Completion\KeywordRecommenders\DefaultKeywordRecommender.cs (2)
40previousToken1.Kind() == SyntaxKind.LineKeyword && 41previousToken2.Kind() == SyntaxKind.HashToken;
Completion\KeywordRecommenders\DisableKeywordRecommender.cs (5)
23if (previousToken1.Kind() == SyntaxKind.NullableKeyword && 24previousToken2.Kind() == SyntaxKind.HashToken) 34previousToken1.Kind() == SyntaxKind.WarningKeyword && 35previousToken2.Kind() == SyntaxKind.PragmaKeyword && 36previousToken3.Kind() == SyntaxKind.HashToken;
Completion\KeywordRecommenders\EnableKeywordRecommender.cs (5)
24if (previousToken1.Kind() == SyntaxKind.NullableKeyword && 25previousToken2.Kind() == SyntaxKind.HashToken) 35previousToken1.Kind() == SyntaxKind.WarningKeyword && 36previousToken2.Kind() == SyntaxKind.PragmaKeyword && 37previousToken3.Kind() == SyntaxKind.HashToken;
Completion\KeywordRecommenders\ExternKeywordRecommender.cs (4)
84if (token.Kind() == SyntaxKind.None) 90if (token.Kind() == SyntaxKind.OpenBraceToken && 98if (token.Kind() == SyntaxKind.SemicolonToken && 106if (token.Kind() == SyntaxKind.SemicolonToken &&
Completion\KeywordRecommenders\HiddenKeywordRecommender.cs (2)
29previousToken1.Kind() == SyntaxKind.LineKeyword && 30previousToken2.Kind() == SyntaxKind.HashToken;
Completion\KeywordRecommenders\InKeywordRecommender.cs (4)
64if (token.Kind() == SyntaxKind.IdentifierToken) 71else if (token.Kind() == SyntaxKind.CloseParenToken) 87if (token.Kind() == SyntaxKind.IdentifierToken) 118if (token.Kind() == SyntaxKind.IdentifierToken)
Completion\KeywordRecommenders\MethodKeywordRecommender.cs (1)
22if (token.Kind() == SyntaxKind.OpenBracketToken)
Completion\KeywordRecommenders\NamespaceKeywordRecommender.cs (7)
85(nextToken.Kind() == SyntaxKind.GlobalKeyword && nextToken.GetAncestor<UsingDirectiveSyntax>()?.GlobalKeyword == nextToken)) 91if (token.Kind() == SyntaxKind.None) 104if (token.Kind() == SyntaxKind.OpenBraceToken && 115if (token.Kind() == SyntaxKind.SemicolonToken) 126if (token.Kind() == SyntaxKind.CloseBraceToken) 142if (token.Kind() == SyntaxKind.SemicolonToken) 154if (token.Kind() == SyntaxKind.CloseBracketToken &&
Completion\KeywordRecommenders\NewKeywordRecommender.cs (2)
101if (token.Kind() == SyntaxKind.CommaToken && 106.Any(c => c.ClassOrStructKeyword.Kind() == SyntaxKind.StructKeyword))
Completion\KeywordRecommenders\OperatorKeywordRecommender.cs (1)
25token.Kind() is SyntaxKind.ImplicitKeyword or
Completion\KeywordRecommenders\ParamKeywordRecommender.cs (1)
28if (token.Kind() == SyntaxKind.OpenBracketToken &&
Completion\KeywordRecommenders\RefKeywordRecommender.cs (4)
105if (token.Kind() == SyntaxKind.IdentifierToken && SyntaxFacts.GetContextualKeywordKind((string)token.Value!) == SyntaxKind.AllowsKeyword && 112.Any(c => c.ClassOrStructKeyword.Kind() == SyntaxKind.ClassKeyword)) 175switch (token.Kind()) 201return previous.Kind() is SyntaxKind.ForKeyword or SyntaxKind.ForEachKeyword;
Completion\KeywordRecommenders\RestoreKeywordRecommender.cs (5)
26(previousToken1.Kind() == SyntaxKind.WarningKeyword && 27previousToken2.Kind() == SyntaxKind.PragmaKeyword && 28previousToken3.Kind() == SyntaxKind.HashToken) || 31(previousToken1.Kind() == SyntaxKind.NullableKeyword && 32previousToken2.Kind() == SyntaxKind.HashToken);
Completion\KeywordRecommenders\ReturnKeywordRecommender.cs (1)
40return token.Kind() == SyntaxKind.OpenBracketToken &&
Completion\KeywordRecommenders\ScopedKeywordRecommender.cs (2)
32switch (token.Kind()) 38return previous.Kind() is SyntaxKind.ForKeyword or SyntaxKind.ForEachKeyword;
Completion\KeywordRecommenders\StructKeywordRecommender.cs (1)
62if (token.Kind() == SyntaxKind.RefKeyword &&
Completion\KeywordRecommenders\ThisKeywordRecommender.cs (1)
45if (token.Kind() == SyntaxKind.ColonToken &&
Completion\KeywordRecommenders\TypeVarKeywordRecommender.cs (1)
23if (token.Kind() == SyntaxKind.OpenBracketToken &&
Completion\KeywordRecommenders\UsingKeywordRecommender.cs (12)
96if (token.Kind() == SyntaxKind.None) 103if ((token.Kind() == SyntaxKind.OpenBraceToken && token.Parent.IsKind(SyntaxKind.NamespaceDeclaration)) 104|| (token.Kind() == SyntaxKind.SemicolonToken && token.Parent.IsKind(SyntaxKind.FileScopedNamespaceDeclaration))) 108if (nextToken.Kind() == SyntaxKind.ExternKeyword) 121if (token.Kind() == SyntaxKind.SemicolonToken) 139if (previousToken.Kind() == SyntaxKind.None) 142if (token.Kind() == SyntaxKind.GlobalKeyword) 146else if (token.Kind() == SyntaxKind.IdentifierToken && SyntaxFacts.GetContextualKeywordKind((string)token.Value!) == SyntaxKind.GlobalKeyword) 151else if (previousToken.Kind() == SyntaxKind.SemicolonToken && 154if (token.Kind() == SyntaxKind.GlobalKeyword) 158else if (token.Kind() == SyntaxKind.IdentifierToken && SyntaxFacts.GetContextualKeywordKind((string)token.Value!) == SyntaxKind.GlobalKeyword) 171if (nextToken.Kind() == SyntaxKind.ExternKeyword ||
Completion\KeywordRecommenders\VoidKeywordRecommender.cs (1)
75if (token.Kind() == SyntaxKind.OpenParenToken &&
Completion\KeywordRecommenders\WarningKeywordRecommender.cs (2)
31previousToken1.Kind() == SyntaxKind.PragmaKeyword && 32previousToken2.Kind() == SyntaxKind.HashToken;
Completion\KeywordRecommenders\WarningsKeywordRecommender.cs (5)
26(previousToken1.Kind() == SyntaxKind.EnableKeyword || previousToken1.Kind() == SyntaxKind.DisableKeyword || previousToken1.Kind() == SyntaxKind.RestoreKeyword) && 27previousToken2.Kind() == SyntaxKind.NullableKeyword && 28previousToken3.Kind() == SyntaxKind.HashToken;
Completion\KeywordRecommenders\WhereKeywordRecommender.cs (3)
43if (token.Kind() == SyntaxKind.GreaterThanToken) 57if (token.Kind() == SyntaxKind.CloseParenToken && 70if (token.Kind() == SyntaxKind.CloseParenToken &&
Completion\KeywordRecommenders\WhileKeywordRecommender.cs (1)
40if (token.Kind() == SyntaxKind.CloseBraceToken &&
ConvertBetweenRegularAndVerbatimString\ConvertBetweenRegularAndVerbatimInterpolatedStringCodeRefactoringProvider.cs (1)
42=> literalExpression.StringStartToken.Kind() == SyntaxKind.InterpolatedVerbatimStringStartToken;
ConvertPrimaryToRegularConstructor\ConvertPrimaryToRegularConstructorCodeRefactoringProvider_DocumentationComments.cs (3)
57t => t.Kind() == SyntaxKind.XmlTextLiteralNewLineToken || string.IsNullOrWhiteSpace(t.Text)))) 85if (lastIndex - 1 >= 0 && tokens[lastIndex - 1].Kind() == SyntaxKind.XmlTextLiteralToken && string.IsNullOrWhiteSpace(tokens[lastIndex - 1].Text)) 88if (lastIndex - 1 >= 0 && tokens[lastIndex - 1].Kind() == SyntaxKind.XmlTextLiteralNewLineToken)
ConvertProgram\ConvertProgramTransform_TopLevelStatements.cs (1)
198modifiers: [.. otherMethod.Modifiers.Where(m => m.Kind() is SyntaxKind.AsyncKeyword or SyntaxKind.UnsafeKeyword)],
ConvertToRawString\ConvertInterpolatedStringToRawStringCodeRefactoringProvider.cs (3)
68if (stringExpression.StringStartToken.Kind() is not SyntaxKind.InterpolatedStringStartToken and not SyntaxKind.InterpolatedVerbatimStringStartToken) 162stringExpression.StringStartToken.Kind() == SyntaxKind.InterpolatedVerbatimStringStartToken) 687kind ?? token.Kind(),
ConvertToRawString\ConvertRegularStringToRawStringCodeRefactoringProvider.cs (1)
48if (token.Kind() != SyntaxKind.StringLiteralToken)
Debugging\CSharpProximityExpressionsService.cs (2)
58if (token.Kind() == SyntaxKind.CloseBraceToken && token.GetPreviousToken().Kind() != SyntaxKind.None)
Debugging\CSharpProximityExpressionsService.Worker.cs (1)
82catchClause.Declaration != null && catchClause.Declaration.Identifier.Kind() != SyntaxKind.None)
DecompiledSource\CSharpDecompiledSourceFormattingRule.cs (2)
29if (previousToken.Kind() != SyntaxKind.CloseBraceToken) 32if (currentToken.Kind() == SyntaxKind.CloseBraceToken)
Diagnostics\Analyzers\CSharpPreferFrameworkTypeDiagnosticAnalyzer.cs (1)
29=> node.Keyword.Kind() != SyntaxKind.VoidKeyword;
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (3)
88if (previousToken.Kind() != SyntaxKind.None) 296return lastTextToken.Kind() == SyntaxKind.XmlTextLiteralNewLineToken 349return lastTextToken.Kind() == SyntaxKind.XmlTextLiteralNewLineToken
EmbeddedLanguages\CSharpTestEmbeddedLanguageClassifier.cs (2)
42if (token.Kind() is not (SyntaxKind.StringLiteralToken or SyntaxKind.SingleLineRawStringLiteralToken or SyntaxKind.MultiLineRawStringLiteralToken)) 70if (token.Kind() is SyntaxKind.MultiLineRawStringLiteralToken)
EmbeddedLanguages\EmbeddedLanguageUtilities.cs (1)
32return token.Kind() is SyntaxKind.StringLiteralToken or SyntaxKind.Utf8StringLiteralToken && !token.IsVerbatimStringLiteral()
EncapsulateField\CSharpEncapsulateFieldService.cs (1)
76.WithModifiers([PrivateKeyword, .. fieldSyntax.Modifiers.Where(m => !modifierKinds.Contains(m.Kind()))])
ExtractInterface\CSharpExtractInterfaceService.cs (1)
63return typeDeclaration.Modifiers.Any(m => SyntaxFacts.IsAccessibilityModifier(m.Kind()));
ExtractMethod\CSharpSelectionResult.StatementResult.cs (3)
36ParenthesizedLambdaExpressionSyntax lambda => lambda.AsyncKeyword.Kind() == SyntaxKind.AsyncKeyword, 37SimpleLambdaExpressionSyntax lambda => lambda.AsyncKeyword.Kind() == SyntaxKind.AsyncKeyword, 38AnonymousMethodExpressionSyntax anonymous => anonymous.AsyncKeyword.Kind() == SyntaxKind.AsyncKeyword,
ExtractMethod\CSharpSelectionValidator.cs (4)
133if (assign.Right.GetLastToken().Kind() == SyntaxKind.None) 349if (tokens.Any(t => t.Kind() == SyntaxKind.YieldKeyword)) 474if (lastToken.Kind() == SyntaxKind.None) 514p.Keyword.Kind() == SyntaxKind.VoidKeyword;
ExtractMethod\Extensions.cs (1)
147if (token.Kind() != SyntaxKind.ThrowKeyword)
GoToDefinition\CSharpGoToDefinitionSymbolService.cs (1)
32switch (token.Kind())
Highlighting\KeywordHighlighters\AsyncAwaitHighlighter.cs (2)
77localDeclaration.UsingKeyword.Kind() == SyntaxKind.UsingKeyword && TryAddAsyncOrAwaitKeyword(localDeclaration.AwaitKeyword, spans), 98if (mod.Kind() is SyntaxKind.AsyncKeyword or SyntaxKind.AwaitKeyword)
MetadataAsSource\FormattingRule.cs (4)
27if ((previousToken.Kind() != SyntaxKind.SemicolonToken && previousToken.Kind() != SyntaxKind.CloseBraceToken) || 28currentToken.Kind() == SyntaxKind.CloseBraceToken) 38if (previousToken.Kind() == SyntaxKind.SemicolonToken && previousToken.Parent.Kind() == SyntaxKind.UsingDirective)
Organizing\Organizers\ModifiersOrganizer.Comparer.cs (3)
28if (x.Kind() == y.Kind()) 41switch (token.Kind())
QuickInfo\CSharpSemanticQuickInfoProvider.cs (1)
58if (token.Kind() is SyntaxKind.CloseBracketToken or SyntaxKind.OpenBracketToken &&
QuickInfo\CSharpSyntacticQuickInfoProvider.cs (2)
41switch (token.Kind()) 69if (openBrace.Kind() != SyntaxKind.OpenBraceToken)
ReplaceDocCommentTextWithTag\CSharpReplaceDocCommentTextWithTagCodeRefactoringProvider.cs (1)
24=> token.Kind() is SyntaxKind.XmlTextLiteralToken or SyntaxKind.XmlTextLiteralNewLineToken;
ReplaceMethodWithProperty\CSharpReplaceMethodWithPropertyService.cs (3)
221if (getMethodDeclaration.SemicolonToken.Kind() != SyntaxKind.None) 269if (setMethodDeclaration.SemicolonToken.Kind() != SyntaxKind.None) 359if (nameToken.Kind() != SyntaxKind.IdentifierToken)
SpellCheck\CSharpSpellcheckCodeFixProvider.cs (1)
48=> token.GetNextToken().Kind() == SyntaxKind.LessThanToken;
SplitStringLiteral\InterpolatedStringSplitter.cs (1)
34=> _interpolatedStringExpression.StringStartToken.Kind() == SyntaxKind.InterpolatedStringStartToken;
SplitStringLiteral\SimpleStringSplitter.cs (3)
46var firstTokenSuffix = _token.Kind() == SyntaxKind.Utf8StringLiteralToken 52_token.Kind(), 59_token.Kind(),
SplitStringLiteral\StringSplitter.cs (2)
61if (token.Kind() is SyntaxKind.InterpolatedStringTextToken or SyntaxKind.InterpolatedStringEndToken || 72return token.Kind() == SyntaxKind.OpenBraceToken &&
src\Analyzers\CSharp\Analyzers\AddAccessibilityModifiers\CSharpAddAccessibilityModifiers.cs (1)
33if (name.Kind() == SyntaxKind.None)
src\Analyzers\CSharp\Analyzers\AddBraces\CSharpAddBracesDiagnosticAnalyzer.cs (1)
117SyntaxFacts.GetText(firstToken.Kind())));
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (1)
132if (member.Modifiers.Any(m => m.Kind() is SyntaxKind.PublicKeyword or SyntaxKind.ProtectedKeyword or SyntaxKind.InternalKeyword))
src\Analyzers\CSharp\Analyzers\InlineDeclaration\CSharpInlineDeclarationDiagnosticAnalyzer.cs (1)
86if (argumentNode.RefOrOutKeyword.Kind() != SyntaxKind.OutKeyword)
src\Analyzers\CSharp\Analyzers\RemoveUnnecessarySuppressions\CSharpRemoveUnnecessaryAttributeSuppressionsDiagnosticAnalyzer.cs (1)
19switch (attributeList.Target?.Identifier.Kind())
src\Analyzers\CSharp\Analyzers\UseAutoProperty\CSharpUseAutoPropertyAnalyzer.cs (1)
77if (argument.RefKindKeyword.Kind() != SyntaxKind.None)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (1)
583siblingArgument.RefOrOutKeyword.Kind() == SyntaxKind.OutKeyword &&
src\Analyzers\CSharp\CodeFixes\ConvertNamespace\ConvertNamespaceTransform.cs (1)
287if (firstBodyToken.Kind() != SyntaxKind.EndOfFileToken
src\Analyzers\CSharp\CodeFixes\DocumentationComments\CSharpRemoveDocCommentNodeCodeFixProvider.cs (2)
47=> token.Kind() == SyntaxKind.XmlTextLiteralToken && IsWhitespace(token.Text); 50=> token.Kind() == SyntaxKind.XmlTextLiteralNewLineToken;
src\Analyzers\CSharp\CodeFixes\FixIncorrectConstraint\CSharpFixIncorrectConstraintCodeFixProvider.cs (1)
60return enumOrDelegateKeyword.Kind() is SyntaxKind.EnumKeyword or SyntaxKind.DelegateKeyword;
src\Analyzers\CSharp\CodeFixes\MakeMethodAsynchronous\CSharpMakeMethodAsynchronousCodeFixProvider.cs (1)
49return token.Kind() == SyntaxKind.IdentifierToken && token.Text == "await";
src\Analyzers\CSharp\CodeFixes\SimplifyInterpolation\CSharpSimplifyInterpolationCodeFixProvider.cs (1)
36if (interpolatedString.StringStartToken.Kind() == SyntaxKind.InterpolatedVerbatimStringStartToken)
src\Analyzers\CSharp\CodeFixes\TransposeRecordKeyword\CSharpTransposeRecordKeywordCodeFixProvider.cs (1)
54if (classOrStructKeyword.Kind() is SyntaxKind.ClassKeyword or SyntaxKind.StructKeyword)
src\Analyzers\CSharp\CodeFixes\UseConditionalExpression\MultiLineConditionalExpressionFormattingRule.cs (1)
34=> token.Kind() is SyntaxKind.QuestionToken or SyntaxKind.ColonToken && token.GetRequiredParent().HasAnnotation(SpecializedFormattingAnnotation);
src\Analyzers\CSharp\CodeFixes\UsePrimaryConstructor\CSharpUsePrimaryConstructorCodeFixProvider.cs (1)
224var inKeyword = current.Modifiers.FirstOrDefault(t => t.Kind() == SyntaxKind.InKeyword);
Structure\CSharpStructureHelpers.cs (2)
87if (lastToken.Kind() == SyntaxKind.None) 95if (nextToken.Kind() is not SyntaxKind.None and SyntaxKind.SemicolonToken)
Structure\Providers\AnonymousMethodExpressionStructureProvider.cs (1)
30if (lastToken.Kind() == SyntaxKind.None)
Structure\Providers\CollectionExpressionStructureProvider.cs (1)
38var end = nextToken.Kind() == SyntaxKind.CommaToken
Structure\Providers\InitializerExpressionStructureProvider.cs (1)
40var end = nextToken.Kind() == SyntaxKind.CommaToken
Structure\Providers\ParenthesizedLambdaExpressionStructureProvider.cs (1)
35if (lastToken.Kind() == SyntaxKind.None)
Structure\Providers\SimpleLambdaExpressionStructureProvider.cs (1)
35if (lastToken.Kind() == SyntaxKind.None)
Structure\Providers\StringLiteralExpressionStructureProvider.cs (1)
38if (node.Token.Kind() is SyntaxKind.MultiLineRawStringLiteralToken or SyntaxKind.Utf8MultiLineRawStringLiteralToken)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\LocalFunctionTests.cs (1)
810Assert.Equal(SyntaxKind.ReturnKeyword, attributeList.Target.Identifier.Kind());
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (15)
Compilation\GetSemanticInfoTests.cs (1)
5914var expr = tokens.Single(t => t.Kind() == SyntaxKind.TrueKeyword).Parent;
DocumentationComments\CrefTests.cs (7)
4559Assert.Equal(SyntaxKind.EndOfFileToken, crefSyntax.Ancestors().First(n => n.IsStructuredTrivia).ParentTrivia.Token.Kind()); 6705Assert.Equal(SyntaxKind.InKeyword, parameter.RefKindKeyword.Kind()); 6706Assert.Equal(SyntaxKind.None, parameter.ReadOnlyKeyword.Kind()); 6748Assert.Equal(SyntaxKind.RefKeyword, parameter.RefKindKeyword.Kind()); 6749Assert.Equal(SyntaxKind.ReadOnlyKeyword, parameter.ReadOnlyKeyword.Kind()); 6898Assert.Equal(SyntaxKind.RefKeyword, parameter.RefKindKeyword.Kind()); 6899Assert.Equal(SyntaxKind.ReadOnlyKeyword, parameter.ReadOnlyKeyword.Kind());
DocumentationComments\DocumentationCommentCompilerTests.cs (1)
3221if (newToken.Width == 0 && newToken.Kind() != SyntaxKind.EndOfFileToken)
Symbols\Source\MethodTests.cs (4)
236var node = tree.GetRoot().DescendantNodes().OfType<PredefinedTypeSyntax>().Where(n => n.Keyword.Kind() == SyntaxKind.VoidKeyword).First(); 264var node = tree.GetRoot().DescendantNodes().OfType<PredefinedTypeSyntax>().Where(n => n.Keyword.Kind() == SyntaxKind.VoidKeyword).Last(); 289var node = tree.DescendantNodes().OfType<PredefinedTypeSyntax>().Where(n => n.Keyword.Kind() == SyntaxKind.VoidKeyword).Single(); 310var node = tree.DescendantNodes().OfType<PredefinedTypeSyntax>().Where(n => n.Keyword.Kind() == SyntaxKind.VoidKeyword).Single();
Symbols\StaticAbstractMembersInInterfacesTests.cs (2)
17495private static string UnaryOperatorName(string op, bool isChecked = false) => OperatorFacts.UnaryOperatorNameFromSyntaxKindIfAny(SyntaxFactory.ParseToken(op).Kind(), isChecked: isChecked); 17497op switch { ">>" => WellKnownMemberNames.RightShiftOperatorName, ">>>" => WellKnownMemberNames.UnsignedRightShiftOperatorName, _ => OperatorFacts.BinaryOperatorNameFromSyntaxKindIfAny(SyntaxFactory.ParseToken(op).Kind(), isChecked: isChecked) };
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1324)
Diagnostics\LineSpanDirectiveTests.cs (1)
466Assert.NotEqual(SyntaxKind.None, directive.DirectiveNameToken.Kind());
Generated\Syntax.Test.xml.Generated.cs (466)
10968Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 10979Assert.Equal(SyntaxKind.DotToken, node.DotToken.Kind()); 10990Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 11001Assert.Equal(SyntaxKind.LessThanToken, node.LessThanToken.Kind()); 11003Assert.Equal(SyntaxKind.GreaterThanToken, node.GreaterThanToken.Kind()); 11014Assert.Equal(SyntaxKind.ColonColonToken, node.ColonColonToken.Kind()); 11025Assert.Equal(SyntaxKind.BoolKeyword, node.Keyword.Kind()); 11046Assert.Equal(SyntaxKind.OpenBracketToken, node.OpenBracketToken.Kind()); 11048Assert.Equal(SyntaxKind.CloseBracketToken, node.CloseBracketToken.Kind()); 11059Assert.Equal(SyntaxKind.AsteriskToken, node.AsteriskToken.Kind()); 11069Assert.Equal(SyntaxKind.DelegateKeyword, node.DelegateKeyword.Kind()); 11070Assert.Equal(SyntaxKind.AsteriskToken, node.AsteriskToken.Kind()); 11082Assert.Equal(SyntaxKind.LessThanToken, node.LessThanToken.Kind()); 11084Assert.Equal(SyntaxKind.GreaterThanToken, node.GreaterThanToken.Kind()); 11094Assert.Equal(SyntaxKind.ManagedKeyword, node.ManagedOrUnmanagedKeyword.Kind()); 11105Assert.Equal(SyntaxKind.OpenBracketToken, node.OpenBracketToken.Kind()); 11107Assert.Equal(SyntaxKind.CloseBracketToken, node.CloseBracketToken.Kind()); 11117Assert.Equal(SyntaxKind.IdentifierToken, node.Name.Kind()); 11128Assert.Equal(SyntaxKind.QuestionToken, node.QuestionToken.Kind()); 11138Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 11140Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 11151Assert.Equal(SyntaxKind.None, node.Identifier.Kind()); 11161Assert.Equal(SyntaxKind.OmittedTypeArgumentToken, node.OmittedTypeArgumentToken.Kind()); 11171Assert.Equal(SyntaxKind.RefKeyword, node.RefKeyword.Kind()); 11172Assert.Equal(SyntaxKind.None, node.ReadOnlyKeyword.Kind()); 11183Assert.Equal(SyntaxKind.ScopedKeyword, node.ScopedKeyword.Kind()); 11194Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 11196Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 11206Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 11208Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 11218Assert.Equal(SyntaxKind.PlusToken, node.OperatorToken.Kind()); 11229Assert.Equal(SyntaxKind.AwaitKeyword, node.AwaitKeyword.Kind()); 11241Assert.Equal(SyntaxKind.PlusPlusToken, node.OperatorToken.Kind()); 11252Assert.Equal(SyntaxKind.DotToken, node.OperatorToken.Kind()); 11264Assert.Equal(SyntaxKind.QuestionToken, node.OperatorToken.Kind()); 11275Assert.Equal(SyntaxKind.DotToken, node.OperatorToken.Kind()); 11297Assert.Equal(SyntaxKind.DotDotToken, node.OperatorToken.Kind()); 11319Assert.Equal(SyntaxKind.PlusToken, node.OperatorToken.Kind()); 11331Assert.Equal(SyntaxKind.EqualsToken, node.OperatorToken.Kind()); 11343Assert.Equal(SyntaxKind.QuestionToken, node.QuestionToken.Kind()); 11345Assert.Equal(SyntaxKind.ColonToken, node.ColonToken.Kind()); 11356Assert.Equal(SyntaxKind.ThisKeyword, node.Token.Kind()); 11366Assert.Equal(SyntaxKind.BaseKeyword, node.Token.Kind()); 11376Assert.Equal(SyntaxKind.ArgListKeyword, node.Token.Kind()); 11386Assert.Equal(SyntaxKind.FieldKeyword, node.Token.Kind()); 11396Assert.Equal(SyntaxKind.MakeRefKeyword, node.Keyword.Kind()); 11397Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 11399Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 11409Assert.Equal(SyntaxKind.RefTypeKeyword, node.Keyword.Kind()); 11410Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 11412Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 11422Assert.Equal(SyntaxKind.RefValueKeyword, node.Keyword.Kind()); 11423Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 11425Assert.Equal(SyntaxKind.CommaToken, node.Comma.Kind()); 11427Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 11437Assert.Equal(SyntaxKind.CheckedKeyword, node.Keyword.Kind()); 11438Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 11440Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 11450Assert.Equal(SyntaxKind.DefaultKeyword, node.Keyword.Kind()); 11451Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 11453Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 11463Assert.Equal(SyntaxKind.TypeOfKeyword, node.Keyword.Kind()); 11464Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 11466Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 11476Assert.Equal(SyntaxKind.SizeOfKeyword, node.Keyword.Kind()); 11477Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 11479Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 11511Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 11513Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 11523Assert.Equal(SyntaxKind.OpenBracketToken, node.OpenBracketToken.Kind()); 11525Assert.Equal(SyntaxKind.CloseBracketToken, node.CloseBracketToken.Kind()); 11536Assert.Equal(SyntaxKind.None, node.RefKindKeyword.Kind()); 11548Assert.Equal(SyntaxKind.ColonToken, node.ColonToken.Kind()); 11559Assert.Equal(SyntaxKind.ColonToken, node.ColonToken.Kind()); 11580Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 11582Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 11594Assert.Equal(SyntaxKind.DelegateKeyword, node.DelegateKeyword.Kind()); 11610Assert.Equal(SyntaxKind.EqualsGreaterThanToken, node.ArrowToken.Kind()); 11622Assert.Equal(SyntaxKind.RefKeyword, node.RefKeyword.Kind()); 11637Assert.Equal(SyntaxKind.EqualsGreaterThanToken, node.ArrowToken.Kind()); 11649Assert.Equal(SyntaxKind.OpenBraceToken, node.OpenBraceToken.Kind()); 11651Assert.Equal(SyntaxKind.CloseBraceToken, node.CloseBraceToken.Kind()); 11661Assert.Equal(SyntaxKind.NewKeyword, node.NewKeyword.Kind()); 11673Assert.Equal(SyntaxKind.NewKeyword, node.NewKeyword.Kind()); 11687Assert.Equal(SyntaxKind.WithKeyword, node.WithKeyword.Kind()); 11709Assert.Equal(SyntaxKind.NewKeyword, node.NewKeyword.Kind()); 11710Assert.Equal(SyntaxKind.OpenBraceToken, node.OpenBraceToken.Kind()); 11712Assert.Equal(SyntaxKind.CloseBraceToken, node.CloseBraceToken.Kind()); 11722Assert.Equal(SyntaxKind.NewKeyword, node.NewKeyword.Kind()); 11734Assert.Equal(SyntaxKind.NewKeyword, node.NewKeyword.Kind()); 11735Assert.Equal(SyntaxKind.OpenBracketToken, node.OpenBracketToken.Kind()); 11737Assert.Equal(SyntaxKind.CloseBracketToken, node.CloseBracketToken.Kind()); 11748Assert.Equal(SyntaxKind.StackAllocKeyword, node.StackAllocKeyword.Kind()); 11760Assert.Equal(SyntaxKind.StackAllocKeyword, node.StackAllocKeyword.Kind()); 11761Assert.Equal(SyntaxKind.OpenBracketToken, node.OpenBracketToken.Kind()); 11762Assert.Equal(SyntaxKind.CloseBracketToken, node.CloseBracketToken.Kind()); 11773Assert.Equal(SyntaxKind.OpenBracketToken, node.OpenBracketToken.Kind()); 11775Assert.Equal(SyntaxKind.CloseBracketToken, node.CloseBracketToken.Kind()); 11795Assert.Equal(SyntaxKind.DotDotToken, node.OperatorToken.Kind()); 11829Assert.Equal(SyntaxKind.FromKeyword, node.FromKeyword.Kind()); 11831Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 11832Assert.Equal(SyntaxKind.InKeyword, node.InKeyword.Kind()); 11843Assert.Equal(SyntaxKind.LetKeyword, node.LetKeyword.Kind()); 11844Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 11845Assert.Equal(SyntaxKind.EqualsToken, node.EqualsToken.Kind()); 11856Assert.Equal(SyntaxKind.JoinKeyword, node.JoinKeyword.Kind()); 11858Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 11859Assert.Equal(SyntaxKind.InKeyword, node.InKeyword.Kind()); 11861Assert.Equal(SyntaxKind.OnKeyword, node.OnKeyword.Kind()); 11863Assert.Equal(SyntaxKind.EqualsKeyword, node.EqualsKeyword.Kind()); 11875Assert.Equal(SyntaxKind.IntoKeyword, node.IntoKeyword.Kind()); 11876Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 11886Assert.Equal(SyntaxKind.WhereKeyword, node.WhereKeyword.Kind()); 11897Assert.Equal(SyntaxKind.OrderByKeyword, node.OrderByKeyword.Kind()); 11909Assert.Equal(SyntaxKind.None, node.AscendingOrDescendingKeyword.Kind()); 11919Assert.Equal(SyntaxKind.SelectKeyword, node.SelectKeyword.Kind()); 11930Assert.Equal(SyntaxKind.GroupKeyword, node.GroupKeyword.Kind()); 11932Assert.Equal(SyntaxKind.ByKeyword, node.ByKeyword.Kind()); 11943Assert.Equal(SyntaxKind.IntoKeyword, node.IntoKeyword.Kind()); 11944Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 11955Assert.Equal(SyntaxKind.OmittedArraySizeExpressionToken, node.OmittedArraySizeExpressionToken.Kind()); 11965Assert.Equal(SyntaxKind.InterpolatedStringStartToken, node.StringStartToken.Kind()); 11967Assert.Equal(SyntaxKind.InterpolatedStringEndToken, node.StringEndToken.Kind()); 11978Assert.Equal(SyntaxKind.IsKeyword, node.IsKeyword.Kind()); 11989Assert.Equal(SyntaxKind.ThrowKeyword, node.ThrowKeyword.Kind()); 12000Assert.Equal(SyntaxKind.WhenKeyword, node.WhenKeyword.Kind()); 12011Assert.Equal(SyntaxKind.UnderscoreToken, node.UnderscoreToken.Kind()); 12032Assert.Equal(SyntaxKind.VarKeyword, node.VarKeyword.Kind()); 12056Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 12058Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 12068Assert.Equal(SyntaxKind.OpenBraceToken, node.OpenBraceToken.Kind()); 12070Assert.Equal(SyntaxKind.CloseBraceToken, node.CloseBraceToken.Kind()); 12101Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 12103Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 12113Assert.Equal(SyntaxKind.EqualsEqualsToken, node.OperatorToken.Kind()); 12135Assert.Equal(SyntaxKind.OrKeyword, node.OperatorToken.Kind()); 12146Assert.Equal(SyntaxKind.NotKeyword, node.OperatorToken.Kind()); 12157Assert.Equal(SyntaxKind.OpenBracketToken, node.OpenBracketToken.Kind()); 12159Assert.Equal(SyntaxKind.CloseBracketToken, node.CloseBracketToken.Kind()); 12170Assert.Equal(SyntaxKind.DotDotToken, node.DotDotToken.Kind()); 12181Assert.Equal(SyntaxKind.InterpolatedStringTextToken, node.TextToken.Kind()); 12191Assert.Equal(SyntaxKind.OpenBraceToken, node.OpenBraceToken.Kind()); 12195Assert.Equal(SyntaxKind.CloseBraceToken, node.CloseBraceToken.Kind()); 12205Assert.Equal(SyntaxKind.IdentifierToken, node.CommaToken.Kind()); 12216Assert.Equal(SyntaxKind.IdentifierToken, node.ColonToken.Kind()); 12217Assert.Equal(SyntaxKind.InterpolatedStringTextToken, node.FormatStringToken.Kind()); 12240Assert.Equal(SyntaxKind.OpenBraceToken, node.OpenBraceToken.Kind()); 12242Assert.Equal(SyntaxKind.CloseBraceToken, node.CloseBraceToken.Kind()); 12255Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 12261Assert.Equal(SyntaxKind.None, node.SemicolonToken.Kind()); 12272Assert.Equal(SyntaxKind.None, node.AwaitKeyword.Kind()); 12273Assert.Equal(SyntaxKind.None, node.UsingKeyword.Kind()); 12276Assert.Equal(SyntaxKind.SemicolonToken, node.SemicolonToken.Kind()); 12297Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 12309Assert.Equal(SyntaxKind.EqualsToken, node.EqualsToken.Kind()); 12320Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 12330Assert.Equal(SyntaxKind.UnderscoreToken, node.UnderscoreToken.Kind()); 12340Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 12342Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 12354Assert.Equal(SyntaxKind.SemicolonToken, node.SemicolonToken.Kind()); 12365Assert.Equal(SyntaxKind.SemicolonToken, node.SemicolonToken.Kind()); 12376Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 12377Assert.Equal(SyntaxKind.ColonToken, node.ColonToken.Kind()); 12389Assert.Equal(SyntaxKind.GotoKeyword, node.GotoKeyword.Kind()); 12390Assert.Equal(SyntaxKind.None, node.CaseOrDefaultKeyword.Kind()); 12392Assert.Equal(SyntaxKind.SemicolonToken, node.SemicolonToken.Kind()); 12403Assert.Equal(SyntaxKind.BreakKeyword, node.BreakKeyword.Kind()); 12404Assert.Equal(SyntaxKind.SemicolonToken, node.SemicolonToken.Kind()); 12415Assert.Equal(SyntaxKind.ContinueKeyword, node.ContinueKeyword.Kind()); 12416Assert.Equal(SyntaxKind.SemicolonToken, node.SemicolonToken.Kind()); 12427Assert.Equal(SyntaxKind.ReturnKeyword, node.ReturnKeyword.Kind()); 12429Assert.Equal(SyntaxKind.SemicolonToken, node.SemicolonToken.Kind()); 12440Assert.Equal(SyntaxKind.ThrowKeyword, node.ThrowKeyword.Kind()); 12442Assert.Equal(SyntaxKind.SemicolonToken, node.SemicolonToken.Kind()); 12453Assert.Equal(SyntaxKind.YieldKeyword, node.YieldKeyword.Kind()); 12454Assert.Equal(SyntaxKind.ReturnKeyword, node.ReturnOrBreakKeyword.Kind()); 12456Assert.Equal(SyntaxKind.SemicolonToken, node.SemicolonToken.Kind()); 12467Assert.Equal(SyntaxKind.WhileKeyword, node.WhileKeyword.Kind()); 12468Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 12470Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 12482Assert.Equal(SyntaxKind.DoKeyword, node.DoKeyword.Kind()); 12484Assert.Equal(SyntaxKind.WhileKeyword, node.WhileKeyword.Kind()); 12485Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 12487Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 12488Assert.Equal(SyntaxKind.SemicolonToken, node.SemicolonToken.Kind()); 12499Assert.Equal(SyntaxKind.ForKeyword, node.ForKeyword.Kind()); 12500Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 12503Assert.Equal(SyntaxKind.SemicolonToken, node.FirstSemicolonToken.Kind()); 12505Assert.Equal(SyntaxKind.SemicolonToken, node.SecondSemicolonToken.Kind()); 12507Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 12519Assert.Equal(SyntaxKind.None, node.AwaitKeyword.Kind()); 12520Assert.Equal(SyntaxKind.ForEachKeyword, node.ForEachKeyword.Kind()); 12521Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 12523Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 12524Assert.Equal(SyntaxKind.InKeyword, node.InKeyword.Kind()); 12526Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 12538Assert.Equal(SyntaxKind.None, node.AwaitKeyword.Kind()); 12539Assert.Equal(SyntaxKind.ForEachKeyword, node.ForEachKeyword.Kind()); 12540Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 12542Assert.Equal(SyntaxKind.InKeyword, node.InKeyword.Kind()); 12544Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 12556Assert.Equal(SyntaxKind.None, node.AwaitKeyword.Kind()); 12557Assert.Equal(SyntaxKind.UsingKeyword, node.UsingKeyword.Kind()); 12558Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 12561Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 12573Assert.Equal(SyntaxKind.FixedKeyword, node.FixedKeyword.Kind()); 12574Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 12576Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 12588Assert.Equal(SyntaxKind.CheckedKeyword, node.Keyword.Kind()); 12600Assert.Equal(SyntaxKind.UnsafeKeyword, node.UnsafeKeyword.Kind()); 12612Assert.Equal(SyntaxKind.LockKeyword, node.LockKeyword.Kind()); 12613Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 12615Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 12627Assert.Equal(SyntaxKind.IfKeyword, node.IfKeyword.Kind()); 12628Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 12630Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 12642Assert.Equal(SyntaxKind.ElseKeyword, node.ElseKeyword.Kind()); 12654Assert.Equal(SyntaxKind.SwitchKeyword, node.SwitchKeyword.Kind()); 12655Assert.Equal(SyntaxKind.None, node.OpenParenToken.Kind()); 12657Assert.Equal(SyntaxKind.None, node.CloseParenToken.Kind()); 12658Assert.Equal(SyntaxKind.OpenBraceToken, node.OpenBraceToken.Kind()); 12660Assert.Equal(SyntaxKind.CloseBraceToken, node.CloseBraceToken.Kind()); 12681Assert.Equal(SyntaxKind.CaseKeyword, node.Keyword.Kind()); 12684Assert.Equal(SyntaxKind.ColonToken, node.ColonToken.Kind()); 12694Assert.Equal(SyntaxKind.CaseKeyword, node.Keyword.Kind()); 12696Assert.Equal(SyntaxKind.ColonToken, node.ColonToken.Kind()); 12706Assert.Equal(SyntaxKind.DefaultKeyword, node.Keyword.Kind()); 12707Assert.Equal(SyntaxKind.ColonToken, node.ColonToken.Kind()); 12718Assert.Equal(SyntaxKind.SwitchKeyword, node.SwitchKeyword.Kind()); 12719Assert.Equal(SyntaxKind.OpenBraceToken, node.OpenBraceToken.Kind()); 12721Assert.Equal(SyntaxKind.CloseBraceToken, node.CloseBraceToken.Kind()); 12733Assert.Equal(SyntaxKind.EqualsGreaterThanToken, node.EqualsGreaterThanToken.Kind()); 12745Assert.Equal(SyntaxKind.TryKeyword, node.TryKeyword.Kind()); 12758Assert.Equal(SyntaxKind.CatchKeyword, node.CatchKeyword.Kind()); 12771Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 12773Assert.Equal(SyntaxKind.None, node.Identifier.Kind()); 12774Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 12784Assert.Equal(SyntaxKind.WhenKeyword, node.WhenKeyword.Kind()); 12785Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 12787Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 12797Assert.Equal(SyntaxKind.FinallyKeyword, node.FinallyKeyword.Kind()); 12812Assert.Equal(SyntaxKind.EndOfFileToken, node.EndOfFileToken.Kind()); 12822Assert.Equal(SyntaxKind.ExternKeyword, node.ExternKeyword.Kind()); 12823Assert.Equal(SyntaxKind.AliasKeyword, node.AliasKeyword.Kind()); 12824Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 12825Assert.Equal(SyntaxKind.SemicolonToken, node.SemicolonToken.Kind()); 12835Assert.Equal(SyntaxKind.None, node.GlobalKeyword.Kind()); 12836Assert.Equal(SyntaxKind.UsingKeyword, node.UsingKeyword.Kind()); 12837Assert.Equal(SyntaxKind.None, node.StaticKeyword.Kind()); 12838Assert.Equal(SyntaxKind.None, node.UnsafeKeyword.Kind()); 12841Assert.Equal(SyntaxKind.SemicolonToken, node.SemicolonToken.Kind()); 12853Assert.Equal(SyntaxKind.NamespaceKeyword, node.NamespaceKeyword.Kind()); 12855Assert.Equal(SyntaxKind.OpenBraceToken, node.OpenBraceToken.Kind()); 12859Assert.Equal(SyntaxKind.CloseBraceToken, node.CloseBraceToken.Kind()); 12860Assert.Equal(SyntaxKind.None, node.SemicolonToken.Kind()); 12872Assert.Equal(SyntaxKind.NamespaceKeyword, node.NamespaceKeyword.Kind()); 12874Assert.Equal(SyntaxKind.SemicolonToken, node.SemicolonToken.Kind()); 12887Assert.Equal(SyntaxKind.OpenBracketToken, node.OpenBracketToken.Kind()); 12890Assert.Equal(SyntaxKind.CloseBracketToken, node.CloseBracketToken.Kind()); 12900Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 12901Assert.Equal(SyntaxKind.ColonToken, node.ColonToken.Kind()); 12922Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 12924Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 12947Assert.Equal(SyntaxKind.EqualsToken, node.EqualsToken.Kind()); 12957Assert.Equal(SyntaxKind.LessThanToken, node.LessThanToken.Kind()); 12959Assert.Equal(SyntaxKind.GreaterThanToken, node.GreaterThanToken.Kind()); 12970Assert.Equal(SyntaxKind.None, node.VarianceKeyword.Kind()); 12971Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 12983Assert.Equal(SyntaxKind.ClassKeyword, node.Keyword.Kind()); 12984Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 12989Assert.Equal(SyntaxKind.None, node.OpenBraceToken.Kind()); 12991Assert.Equal(SyntaxKind.None, node.CloseBraceToken.Kind()); 12992Assert.Equal(SyntaxKind.None, node.SemicolonToken.Kind()); 13004Assert.Equal(SyntaxKind.StructKeyword, node.Keyword.Kind()); 13005Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 13010Assert.Equal(SyntaxKind.None, node.OpenBraceToken.Kind()); 13012Assert.Equal(SyntaxKind.None, node.CloseBraceToken.Kind()); 13013Assert.Equal(SyntaxKind.None, node.SemicolonToken.Kind()); 13025Assert.Equal(SyntaxKind.InterfaceKeyword, node.Keyword.Kind()); 13026Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 13031Assert.Equal(SyntaxKind.None, node.OpenBraceToken.Kind()); 13033Assert.Equal(SyntaxKind.None, node.CloseBraceToken.Kind()); 13034Assert.Equal(SyntaxKind.None, node.SemicolonToken.Kind()); 13046Assert.Equal(SyntaxKind.IdentifierToken, node.Keyword.Kind()); 13047Assert.Equal(SyntaxKind.None, node.ClassOrStructKeyword.Kind()); 13048Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 13053Assert.Equal(SyntaxKind.None, node.OpenBraceToken.Kind()); 13055Assert.Equal(SyntaxKind.None, node.CloseBraceToken.Kind()); 13056Assert.Equal(SyntaxKind.None, node.SemicolonToken.Kind()); 13068Assert.Equal(SyntaxKind.EnumKeyword, node.EnumKeyword.Kind()); 13069Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 13071Assert.Equal(SyntaxKind.None, node.OpenBraceToken.Kind()); 13073Assert.Equal(SyntaxKind.None, node.CloseBraceToken.Kind()); 13074Assert.Equal(SyntaxKind.None, node.SemicolonToken.Kind()); 13086Assert.Equal(SyntaxKind.DelegateKeyword, node.DelegateKeyword.Kind()); 13088Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 13092Assert.Equal(SyntaxKind.SemicolonToken, node.SemicolonToken.Kind()); 13104Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 13115Assert.Equal(SyntaxKind.ColonToken, node.ColonToken.Kind()); 13147Assert.Equal(SyntaxKind.WhereKeyword, node.WhereKeyword.Kind()); 13149Assert.Equal(SyntaxKind.ColonToken, node.ColonToken.Kind()); 13160Assert.Equal(SyntaxKind.NewKeyword, node.NewKeyword.Kind()); 13161Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 13162Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 13172Assert.Equal(SyntaxKind.ClassKeyword, node.ClassOrStructKeyword.Kind()); 13173Assert.Equal(SyntaxKind.None, node.QuestionToken.Kind()); 13193Assert.Equal(SyntaxKind.DefaultKeyword, node.DefaultKeyword.Kind()); 13203Assert.Equal(SyntaxKind.AllowsKeyword, node.AllowsKeyword.Kind()); 13214Assert.Equal(SyntaxKind.RefKeyword, node.RefKeyword.Kind()); 13215Assert.Equal(SyntaxKind.StructKeyword, node.StructKeyword.Kind()); 13228Assert.Equal(SyntaxKind.SemicolonToken, node.SemicolonToken.Kind()); 13240Assert.Equal(SyntaxKind.EventKeyword, node.EventKeyword.Kind()); 13242Assert.Equal(SyntaxKind.SemicolonToken, node.SemicolonToken.Kind()); 13253Assert.Equal(SyntaxKind.DotToken, node.DotToken.Kind()); 13267Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 13273Assert.Equal(SyntaxKind.None, node.SemicolonToken.Kind()); 13287Assert.Equal(SyntaxKind.OperatorKeyword, node.OperatorKeyword.Kind()); 13288Assert.Equal(SyntaxKind.None, node.CheckedKeyword.Kind()); 13289Assert.Equal(SyntaxKind.PlusToken, node.OperatorToken.Kind()); 13293Assert.Equal(SyntaxKind.None, node.SemicolonToken.Kind()); 13305Assert.Equal(SyntaxKind.ImplicitKeyword, node.ImplicitOrExplicitKeyword.Kind()); 13307Assert.Equal(SyntaxKind.OperatorKeyword, node.OperatorKeyword.Kind()); 13308Assert.Equal(SyntaxKind.None, node.CheckedKeyword.Kind()); 13313Assert.Equal(SyntaxKind.None, node.SemicolonToken.Kind()); 13325Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 13330Assert.Equal(SyntaxKind.None, node.SemicolonToken.Kind()); 13340Assert.Equal(SyntaxKind.ColonToken, node.ColonToken.Kind()); 13341Assert.Equal(SyntaxKind.BaseKeyword, node.ThisOrBaseKeyword.Kind()); 13354Assert.Equal(SyntaxKind.TildeToken, node.TildeToken.Kind()); 13355Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 13359Assert.Equal(SyntaxKind.None, node.SemicolonToken.Kind()); 13373Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 13377Assert.Equal(SyntaxKind.None, node.SemicolonToken.Kind()); 13387Assert.Equal(SyntaxKind.EqualsGreaterThanToken, node.ArrowToken.Kind()); 13400Assert.Equal(SyntaxKind.EventKeyword, node.EventKeyword.Kind()); 13403Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 13405Assert.Equal(SyntaxKind.None, node.SemicolonToken.Kind()); 13419Assert.Equal(SyntaxKind.ThisKeyword, node.ThisKeyword.Kind()); 13423Assert.Equal(SyntaxKind.None, node.SemicolonToken.Kind()); 13433Assert.Equal(SyntaxKind.OpenBraceToken, node.OpenBraceToken.Kind()); 13435Assert.Equal(SyntaxKind.CloseBraceToken, node.CloseBraceToken.Kind()); 13447Assert.Equal(SyntaxKind.GetKeyword, node.Keyword.Kind()); 13450Assert.Equal(SyntaxKind.None, node.SemicolonToken.Kind()); 13460Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 13462Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 13472Assert.Equal(SyntaxKind.OpenBracketToken, node.OpenBracketToken.Kind()); 13474Assert.Equal(SyntaxKind.CloseBracketToken, node.CloseBracketToken.Kind()); 13487Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 13533Assert.Equal(SyntaxKind.EndOfDocumentationCommentToken, node.EndOfComment.Kind()); 13554Assert.Equal(SyntaxKind.DotToken, node.DotToken.Kind()); 13576Assert.Equal(SyntaxKind.ThisKeyword, node.ThisKeyword.Kind()); 13587Assert.Equal(SyntaxKind.OperatorKeyword, node.OperatorKeyword.Kind()); 13588Assert.Equal(SyntaxKind.None, node.CheckedKeyword.Kind()); 13589Assert.Equal(SyntaxKind.PlusToken, node.OperatorToken.Kind()); 13600Assert.Equal(SyntaxKind.ImplicitKeyword, node.ImplicitOrExplicitKeyword.Kind()); 13601Assert.Equal(SyntaxKind.OperatorKeyword, node.OperatorKeyword.Kind()); 13602Assert.Equal(SyntaxKind.None, node.CheckedKeyword.Kind()); 13614Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 13616Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 13626Assert.Equal(SyntaxKind.OpenBracketToken, node.OpenBracketToken.Kind()); 13628Assert.Equal(SyntaxKind.CloseBracketToken, node.CloseBracketToken.Kind()); 13638Assert.Equal(SyntaxKind.None, node.RefKindKeyword.Kind()); 13639Assert.Equal(SyntaxKind.None, node.ReadOnlyKeyword.Kind()); 13662Assert.Equal(SyntaxKind.LessThanToken, node.LessThanToken.Kind()); 13665Assert.Equal(SyntaxKind.GreaterThanToken, node.GreaterThanToken.Kind()); 13675Assert.Equal(SyntaxKind.LessThanSlashToken, node.LessThanSlashToken.Kind()); 13677Assert.Equal(SyntaxKind.GreaterThanToken, node.GreaterThanToken.Kind()); 13687Assert.Equal(SyntaxKind.LessThanToken, node.LessThanToken.Kind()); 13690Assert.Equal(SyntaxKind.SlashGreaterThanToken, node.SlashGreaterThanToken.Kind()); 13701Assert.Equal(SyntaxKind.IdentifierToken, node.LocalName.Kind()); 13711Assert.Equal(SyntaxKind.IdentifierToken, node.Prefix.Kind()); 13712Assert.Equal(SyntaxKind.ColonToken, node.ColonToken.Kind()); 13723Assert.Equal(SyntaxKind.EqualsToken, node.EqualsToken.Kind()); 13724Assert.Equal(SyntaxKind.SingleQuoteToken, node.StartQuoteToken.Kind()); 13726Assert.Equal(SyntaxKind.SingleQuoteToken, node.EndQuoteToken.Kind()); 13737Assert.Equal(SyntaxKind.EqualsToken, node.EqualsToken.Kind()); 13738Assert.Equal(SyntaxKind.SingleQuoteToken, node.StartQuoteToken.Kind()); 13740Assert.Equal(SyntaxKind.SingleQuoteToken, node.EndQuoteToken.Kind()); 13751Assert.Equal(SyntaxKind.EqualsToken, node.EqualsToken.Kind()); 13752Assert.Equal(SyntaxKind.SingleQuoteToken, node.StartQuoteToken.Kind()); 13754Assert.Equal(SyntaxKind.SingleQuoteToken, node.EndQuoteToken.Kind()); 13774Assert.Equal(SyntaxKind.XmlCDataStartToken, node.StartCDataToken.Kind()); 13776Assert.Equal(SyntaxKind.XmlCDataEndToken, node.EndCDataToken.Kind()); 13786Assert.Equal(SyntaxKind.XmlProcessingInstructionStartToken, node.StartProcessingInstructionToken.Kind()); 13789Assert.Equal(SyntaxKind.XmlProcessingInstructionEndToken, node.EndProcessingInstructionToken.Kind()); 13799Assert.Equal(SyntaxKind.XmlCommentStartToken, node.LessThanExclamationMinusMinusToken.Kind()); 13801Assert.Equal(SyntaxKind.XmlCommentEndToken, node.MinusMinusGreaterThanToken.Kind()); 13811Assert.Equal(SyntaxKind.HashToken, node.HashToken.Kind()); 13812Assert.Equal(SyntaxKind.IfKeyword, node.IfKeyword.Kind()); 13814Assert.Equal(SyntaxKind.EndOfDirectiveToken, node.EndOfDirectiveToken.Kind()); 13827Assert.Equal(SyntaxKind.HashToken, node.HashToken.Kind()); 13828Assert.Equal(SyntaxKind.ElifKeyword, node.ElifKeyword.Kind()); 13830Assert.Equal(SyntaxKind.EndOfDirectiveToken, node.EndOfDirectiveToken.Kind()); 13843Assert.Equal(SyntaxKind.HashToken, node.HashToken.Kind()); 13844Assert.Equal(SyntaxKind.ElseKeyword, node.ElseKeyword.Kind()); 13845Assert.Equal(SyntaxKind.EndOfDirectiveToken, node.EndOfDirectiveToken.Kind()); 13857Assert.Equal(SyntaxKind.HashToken, node.HashToken.Kind()); 13858Assert.Equal(SyntaxKind.EndIfKeyword, node.EndIfKeyword.Kind()); 13859Assert.Equal(SyntaxKind.EndOfDirectiveToken, node.EndOfDirectiveToken.Kind()); 13870Assert.Equal(SyntaxKind.HashToken, node.HashToken.Kind()); 13871Assert.Equal(SyntaxKind.RegionKeyword, node.RegionKeyword.Kind()); 13872Assert.Equal(SyntaxKind.EndOfDirectiveToken, node.EndOfDirectiveToken.Kind()); 13883Assert.Equal(SyntaxKind.HashToken, node.HashToken.Kind()); 13884Assert.Equal(SyntaxKind.EndRegionKeyword, node.EndRegionKeyword.Kind()); 13885Assert.Equal(SyntaxKind.EndOfDirectiveToken, node.EndOfDirectiveToken.Kind()); 13896Assert.Equal(SyntaxKind.HashToken, node.HashToken.Kind()); 13897Assert.Equal(SyntaxKind.ErrorKeyword, node.ErrorKeyword.Kind()); 13898Assert.Equal(SyntaxKind.EndOfDirectiveToken, node.EndOfDirectiveToken.Kind()); 13909Assert.Equal(SyntaxKind.HashToken, node.HashToken.Kind()); 13910Assert.Equal(SyntaxKind.WarningKeyword, node.WarningKeyword.Kind()); 13911Assert.Equal(SyntaxKind.EndOfDirectiveToken, node.EndOfDirectiveToken.Kind()); 13922Assert.Equal(SyntaxKind.HashToken, node.HashToken.Kind()); 13923Assert.Equal(SyntaxKind.IdentifierToken, node.Identifier.Kind()); 13924Assert.Equal(SyntaxKind.EndOfDirectiveToken, node.EndOfDirectiveToken.Kind()); 13935Assert.Equal(SyntaxKind.HashToken, node.HashToken.Kind()); 13936Assert.Equal(SyntaxKind.DefineKeyword, node.DefineKeyword.Kind()); 13937Assert.Equal(SyntaxKind.IdentifierToken, node.Name.Kind()); 13938Assert.Equal(SyntaxKind.EndOfDirectiveToken, node.EndOfDirectiveToken.Kind()); 13949Assert.Equal(SyntaxKind.HashToken, node.HashToken.Kind()); 13950Assert.Equal(SyntaxKind.UndefKeyword, node.UndefKeyword.Kind()); 13951Assert.Equal(SyntaxKind.IdentifierToken, node.Name.Kind()); 13952Assert.Equal(SyntaxKind.EndOfDirectiveToken, node.EndOfDirectiveToken.Kind()); 13963Assert.Equal(SyntaxKind.HashToken, node.HashToken.Kind()); 13964Assert.Equal(SyntaxKind.LineKeyword, node.LineKeyword.Kind()); 13965Assert.Equal(SyntaxKind.NumericLiteralToken, node.Line.Kind()); 13966Assert.Equal(SyntaxKind.None, node.File.Kind()); 13967Assert.Equal(SyntaxKind.EndOfDirectiveToken, node.EndOfDirectiveToken.Kind()); 13978Assert.Equal(SyntaxKind.OpenParenToken, node.OpenParenToken.Kind()); 13979Assert.Equal(SyntaxKind.NumericLiteralToken, node.Line.Kind()); 13980Assert.Equal(SyntaxKind.CommaToken, node.CommaToken.Kind()); 13981Assert.Equal(SyntaxKind.NumericLiteralToken, node.Character.Kind()); 13982Assert.Equal(SyntaxKind.CloseParenToken, node.CloseParenToken.Kind()); 13992Assert.Equal(SyntaxKind.HashToken, node.HashToken.Kind()); 13993Assert.Equal(SyntaxKind.LineKeyword, node.LineKeyword.Kind()); 13995Assert.Equal(SyntaxKind.MinusToken, node.MinusToken.Kind()); 13997Assert.Equal(SyntaxKind.None, node.CharacterOffset.Kind()); 13998Assert.Equal(SyntaxKind.StringLiteralToken, node.File.Kind()); 13999Assert.Equal(SyntaxKind.EndOfDirectiveToken, node.EndOfDirectiveToken.Kind()); 14010Assert.Equal(SyntaxKind.HashToken, node.HashToken.Kind()); 14011Assert.Equal(SyntaxKind.PragmaKeyword, node.PragmaKeyword.Kind()); 14012Assert.Equal(SyntaxKind.WarningKeyword, node.WarningKeyword.Kind()); 14013Assert.Equal(SyntaxKind.DisableKeyword, node.DisableOrRestoreKeyword.Kind()); 14015Assert.Equal(SyntaxKind.EndOfDirectiveToken, node.EndOfDirectiveToken.Kind()); 14026Assert.Equal(SyntaxKind.HashToken, node.HashToken.Kind()); 14027Assert.Equal(SyntaxKind.PragmaKeyword, node.PragmaKeyword.Kind()); 14028Assert.Equal(SyntaxKind.ChecksumKeyword, node.ChecksumKeyword.Kind()); 14029Assert.Equal(SyntaxKind.StringLiteralToken, node.File.Kind()); 14030Assert.Equal(SyntaxKind.StringLiteralToken, node.Guid.Kind()); 14031Assert.Equal(SyntaxKind.StringLiteralToken, node.Bytes.Kind()); 14032Assert.Equal(SyntaxKind.EndOfDirectiveToken, node.EndOfDirectiveToken.Kind()); 14043Assert.Equal(SyntaxKind.HashToken, node.HashToken.Kind()); 14044Assert.Equal(SyntaxKind.ReferenceKeyword, node.ReferenceKeyword.Kind()); 14045Assert.Equal(SyntaxKind.StringLiteralToken, node.File.Kind()); 14046Assert.Equal(SyntaxKind.EndOfDirectiveToken, node.EndOfDirectiveToken.Kind()); 14057Assert.Equal(SyntaxKind.HashToken, node.HashToken.Kind()); 14058Assert.Equal(SyntaxKind.LoadKeyword, node.LoadKeyword.Kind()); 14059Assert.Equal(SyntaxKind.StringLiteralToken, node.File.Kind()); 14060Assert.Equal(SyntaxKind.EndOfDirectiveToken, node.EndOfDirectiveToken.Kind()); 14071Assert.Equal(SyntaxKind.HashToken, node.HashToken.Kind()); 14072Assert.Equal(SyntaxKind.ExclamationToken, node.ExclamationToken.Kind()); 14073Assert.Equal(SyntaxKind.EndOfDirectiveToken, node.EndOfDirectiveToken.Kind()); 14084Assert.Equal(SyntaxKind.HashToken, node.HashToken.Kind()); 14085Assert.Equal(SyntaxKind.NullableKeyword, node.NullableKeyword.Kind()); 14086Assert.Equal(SyntaxKind.EnableKeyword, node.SettingToken.Kind()); 14087Assert.Equal(SyntaxKind.None, node.TargetToken.Kind()); 14088Assert.Equal(SyntaxKind.EndOfDirectiveToken, node.EndOfDirectiveToken.Kind());
IncrementalParsing\IncrementalParsingTests.cs (1)
3055var tempToken = tempRoot.DescendantTokens().First(t => t.Kind() == SyntaxKind.IdentifierToken);
LexicalAndXml\LexicalTests.cs (284)
51if (result.Kind() == SyntaxKind.None) 55else if (token.Kind() == SyntaxKind.EndOfFileToken) 64if (result.Kind() == SyntaxKind.None) 108Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 127Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 146Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 165Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 187Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 209Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 231Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 249Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 269Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 293Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 317Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 337Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 359Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 381Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 403Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 424Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 451Assert.Equal(SyntaxKind.RazorContentToken, token.Kind()); 474Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 479Assert.Equal(SyntaxKind.RazorContentToken, token.Kind()); 491Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 512Assert.Equal(SyntaxKind.RazorContentToken, token.Kind()); 523Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 540Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 566Assert.Equal(SyntaxKind.RazorContentToken, token.Kind()); 580Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 596Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 615Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 630Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 645Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 660Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 675Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 690Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 705Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 720Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 737Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 754Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 771Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 788Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 805Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 822Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 844Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 864Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 885Assert.True(SyntaxFacts.IsReservedKeyword(token.Kind())); 964Assert.Equal(kind, token.Kind()); 979Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 994Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 1009Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 1024Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 1039Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 1055Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 1071Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 1088Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 1104Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 1120Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 1136Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 1155Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 1174Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 1192Assert.Equal(SyntaxKind.StringLiteralToken, token.Kind()); 1208Assert.Equal(SyntaxKind.CharacterLiteralToken, token.Kind()); 1224Assert.Equal(SyntaxKind.CharacterLiteralToken, token.Kind()); 1240Assert.Equal(SyntaxKind.CharacterLiteralToken, token.Kind()); 1256Assert.Equal(SyntaxKind.CharacterLiteralToken, token.Kind()); 1272Assert.Equal(SyntaxKind.CharacterLiteralToken, token.Kind()); 1288Assert.Equal(SyntaxKind.CharacterLiteralToken, token.Kind()); 1304Assert.Equal(SyntaxKind.CharacterLiteralToken, token.Kind()); 1320Assert.Equal(SyntaxKind.CharacterLiteralToken, token.Kind()); 1336Assert.Equal(SyntaxKind.CharacterLiteralToken, token.Kind()); 1353Assert.Equal(SyntaxKind.CharacterLiteralToken, token.Kind()); 1369Assert.Equal(SyntaxKind.CharacterLiteralToken, token.Kind()); 1385Assert.Equal(SyntaxKind.CharacterLiteralToken, token.Kind()); 1401Assert.Equal(SyntaxKind.CharacterLiteralToken, token.Kind()); 1417Assert.Equal(SyntaxKind.CharacterLiteralToken, token.Kind()); 1433Assert.Equal(SyntaxKind.CharacterLiteralToken, token.Kind()); 1449Assert.Equal(SyntaxKind.CharacterLiteralToken, token.Kind()); 1465Assert.Equal(SyntaxKind.CharacterLiteralToken, token.Kind()); 1481Assert.Equal(SyntaxKind.CharacterLiteralToken, token.Kind()); 1497Assert.Equal(SyntaxKind.CharacterLiteralToken, token.Kind()); 1514Assert.Equal(SyntaxKind.CharacterLiteralToken, token.Kind()); 1531Assert.Equal(SyntaxKind.CharacterLiteralToken, token.Kind()); 1547Assert.Equal(SyntaxKind.CharacterLiteralToken, token.Kind()); 1565Assert.Equal(SyntaxKind.CharacterLiteralToken, token.Kind()); 1585Assert.Equal(SyntaxKind.CharacterLiteralToken, token.Kind()); 1600Assert.Equal(SyntaxKind.BadToken, token.Kind()); 1615Assert.Equal(SyntaxKind.BadToken, token.Kind()); 1630Assert.Equal(SyntaxKind.BadToken, token.Kind()); 1645Assert.Equal(SyntaxKind.BadToken, token.Kind()); 1660Assert.Equal(SyntaxKind.BadToken, token.Kind()); 1676Assert.Equal(SyntaxKind.BadToken, token.Kind()); 1692Assert.Equal(SyntaxKind.BadToken, token.Kind()); 1708Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 1724Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 1741Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 1757Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 1773Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 1789Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 1805Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 1820Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 1834Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 1849Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 1864Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 1879Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 1894Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 1909Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 1932Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 1947Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 1962Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 1977Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 1992Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2008Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2024Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2040Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2056Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2072Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2088Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2104Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2120Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2136Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2152Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2168Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2184Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2200Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2216Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2232Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2248Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2264Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2274Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2290Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2300Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2316Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2326Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2342Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2352Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2368Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2378Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2394Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2404Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2419Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2430Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2445Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2456Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2469Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2485Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2495Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2511Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2521Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2536Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2547Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2562Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2573Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2587Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2602Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2618Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2634Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2650Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2665Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2680Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2695Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2710Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2725Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2741Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2757Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2773Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2789Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2805Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2821Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2837Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2853Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2869Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2885Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2901Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2917Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2933Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2949Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2965Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2981Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 2997Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3013Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3028Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3044Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3060Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3069Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3078Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3087Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3096Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3105Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3114Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3127Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3142Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3151Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3160Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3169Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3182Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3191Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3200Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3209Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3225Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 3232Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3243Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3258Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3269Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3280Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3291Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3302Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3313Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3324Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3335Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3346Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3357Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3368Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3386Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3402Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3418Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3434Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3455Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 3466Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 3476Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 3486Assert.Equal(SyntaxKind.BadToken, token.Kind()); 3492Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 3498Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 3504Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 3510Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 3516Assert.Equal(SyntaxKind.BadToken, token.Kind()); 3522Assert.Equal(SyntaxKind.BadToken, token.Kind()); 3528Assert.Equal(SyntaxKind.BadToken, token.Kind()); 3534Assert.Equal(SyntaxKind.BadToken, token.Kind()); 3540Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 3557Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 3570Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 3580Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3590Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3601Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 3614Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 3632Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 3652Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 3776Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3784Assert.Equal(SyntaxKind.NumericLiteralToken, token.Kind()); 3834Assert.Equal(SyntaxKind.LessThanLessThanToken, token.Kind()); 3838Assert.Equal(SyntaxKind.LessThanLessThanToken, token.Kind()); 3844Assert.Equal(SyntaxKind.LessThanLessThanToken, token.Kind()); 3848Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 3863Assert.Equal(SyntaxKind.LessThanLessThanToken, token.Kind()); 3866Assert.Equal(SyntaxKind.LessThanLessThanToken, token.Kind()); 3871Assert.Equal(SyntaxKind.LessThanLessThanToken, token.Kind()); 3874Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 3894Assert.Equal(SyntaxKind.GreaterThanToken, token.Kind()); 3897Assert.Equal(SyntaxKind.GreaterThanToken, token.Kind()); 3902Assert.Equal(SyntaxKind.GreaterThanToken, token.Kind()); 3905Assert.Equal(SyntaxKind.GreaterThanToken, token.Kind()); 3917Assert.Equal(SyntaxKind.GreaterThanToken, token.Kind()); 3920Assert.Equal(SyntaxKind.GreaterThanToken, token.Kind()); 3925Assert.Equal(SyntaxKind.GreaterThanToken, token.Kind()); 3928Assert.Equal(SyntaxKind.GreaterThanToken, token.Kind()); 3938Assert.Equal(SyntaxKind.EqualsEqualsToken, token.Kind()); 3944Assert.Equal(SyntaxKind.EqualsEqualsToken, token.Kind()); 3948Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 3954Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 3966Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 3989Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 4011Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 4044Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 4077Assert.Equal(SyntaxKind.EqualsEqualsToken, token.Kind()); 4083Assert.Equal(SyntaxKind.EqualsEqualsToken, token.Kind()); 4087Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 4093Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 4100Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 4118Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 4135Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 4169Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 4209Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 4243Assert.Equal(SyntaxKind.BarBarToken, token.Kind()); 4249Assert.Equal(SyntaxKind.BarBarToken, token.Kind()); 4253Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 4259Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 4273Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 4295Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 4318Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 4347Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 4378Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 4417Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 4473Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind()); 4531Assert.Equal(SyntaxKind.EndOfFileToken, token.Kind());
LexicalAndXml\PreprocessorTests.cs (20)
227Assert.Equal(SyntaxKind.LineKeyword, ld.LineKeyword.Kind()); 228Assert.Equal(SyntaxKind.DefaultKeyword, ld.Line.Kind()); 232Assert.Equal(SyntaxKind.LineKeyword, ld.LineKeyword.Kind()); 233Assert.Equal(SyntaxKind.HiddenKeyword, ld.Line.Kind()); 247Assert.Equal(SyntaxKind.None, ld.File.Kind()); 251Assert.NotEqual(SyntaxKind.None, ld.File.Kind()); 273Assert.True(target.Kind() == SyntaxKind.WarningsKeyword || target.Kind() == SyntaxKind.AnnotationsKeyword || 274target.Kind() == SyntaxKind.None); 276Assert.True(setting.Kind() == SyntaxKind.EnableKeyword || setting.Kind() == SyntaxKind.DisableKeyword || 277setting.Kind() == SyntaxKind.RestoreKeyword); 279Assert.Equal(SyntaxKind.NullableKeyword, nn.DirectiveNameToken.Kind()); 308Assert.Equal(SyntaxKind.PragmaKeyword, pwd.PragmaKeyword.Kind()); 315Assert.Equal(SyntaxKind.WarningKeyword, pwd.WarningKeyword.Kind()); 324Assert.Equal(expected.DisableOrRestoreKind, pwd.DisableOrRestoreKeyword.Kind()); 358Assert.Equal(SyntaxKind.PragmaKeyword, pcd.PragmaKeyword.Kind()); 359Assert.Equal(SyntaxKind.ChecksumKeyword, pcd.ChecksumKeyword.Kind()); // no missing 4568Assert.Equal(SyntaxKind.EnableKeyword, token.Kind()); 4570Assert.Equal(SyntaxKind.IdentifierToken, token.Kind());
LexicalAndXml\RawStringLiteralLexingTests.cs (1)
191Assert.Equal(expectedKind, token.Kind());
LexicalAndXml\SyntaxTokenParserTests.cs (1)
409Assert.Equal(expectedKind, result.Token.Kind());
Parsing\DeclarationParsingTests.cs (275)
42Assert.Equal(SyntaxKind.ExternKeyword, ea.ExternKeyword.Kind()); 44Assert.Equal(SyntaxKind.AliasKeyword, ea.AliasKeyword.Kind()); 65Assert.Equal(SyntaxKind.UsingKeyword, ud.UsingKeyword.Kind()); 87Assert.Equal(SyntaxKind.UsingKeyword, ud.UsingKeyword.Kind()); 88Assert.Equal(SyntaxKind.StaticKeyword, ud.StaticKeyword.Kind()); 154Assert.Equal(SyntaxKind.UsingKeyword, ud.UsingKeyword.Kind()); 176Assert.Equal(SyntaxKind.UsingKeyword, ud.UsingKeyword.Kind()); 177Assert.Equal(SyntaxKind.StaticKeyword, ud.StaticKeyword.Kind()); 198Assert.Equal(SyntaxKind.UsingKeyword, ud.UsingKeyword.Kind()); 199Assert.Equal(SyntaxKind.StaticKeyword, ud.StaticKeyword.Kind()); 220Assert.Equal(SyntaxKind.UsingKeyword, ud.UsingKeyword.Kind()); 244Assert.Equal(SyntaxKind.UsingKeyword, ud.UsingKeyword.Kind()); 299Assert.Equal(SyntaxKind.IdentifierToken, ad.Target.Identifier.Kind()); 328Assert.Equal(SyntaxKind.IdentifierToken, ad.Target.Identifier.Kind()); 356Assert.Equal(SyntaxKind.ModuleKeyword, ad.Target.Identifier.Kind()); 383Assert.Equal(SyntaxKind.IdentifierToken, ad.Target.Identifier.Kind()); 411Assert.Equal(SyntaxKind.AssemblyKeyword, ad.Target.Identifier.Kind()); 785Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 810Assert.Equal(SyntaxKind.PublicKeyword, cs.Modifiers[0].Kind()); 812Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 837Assert.Equal(SyntaxKind.InternalKeyword, cs.Modifiers[0].Kind()); 839Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 864Assert.Equal(SyntaxKind.StaticKeyword, cs.Modifiers[0].Kind()); 866Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 891Assert.Equal(SyntaxKind.SealedKeyword, cs.Modifiers[0].Kind()); 893Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 918Assert.Equal(SyntaxKind.AbstractKeyword, cs.Modifiers[0].Kind()); 920Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 945Assert.Equal(SyntaxKind.PartialKeyword, cs.Modifiers[0].Kind()); 947Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 974Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1002Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1029Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1055Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1086Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1118Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1160Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1221Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1265Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1283Assert.Equal(SyntaxKind.ClassKeyword, bound.ClassOrStructKeyword.Kind()); 1306Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1324Assert.Equal(SyntaxKind.StructKeyword, bound.ClassOrStructKeyword.Kind()); 1347Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1366Assert.Equal(SyntaxKind.ClassKeyword, classBound.ClassOrStructKeyword.Kind()); 1403Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1458Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1504Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1548Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1571Assert.Equal(SyntaxKind.ClassKeyword, classBound.ClassOrStructKeyword.Kind()); 1608Assert.Equal(SyntaxKind.InterfaceKeyword, cs.Keyword.Kind()); 1633Assert.Equal(SyntaxKind.InterfaceKeyword, cs.Keyword.Kind()); 1639Assert.Equal(SyntaxKind.None, gn.Parameters[0].VarianceKeyword.Kind()); 1663Assert.Equal(SyntaxKind.InterfaceKeyword, cs.Keyword.Kind()); 1672Assert.Equal(SyntaxKind.OutKeyword, gn.Parameters[0].VarianceKeyword.Kind()); 1695Assert.Equal(SyntaxKind.StructKeyword, cs.Keyword.Kind()); 1720Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1735Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1760Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1774Assert.Equal(SyntaxKind.PrivateKeyword, cs.Modifiers[0].Kind()); 1776Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1801Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1815Assert.Equal(SyntaxKind.ProtectedKeyword, cs.Modifiers[0].Kind()); 1817Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1842Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1856Assert.Equal(SyntaxKind.ProtectedKeyword, cs.Modifiers[0].Kind()); 1857Assert.Equal(SyntaxKind.InternalKeyword, cs.Modifiers[1].Kind()); 1859Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1884Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1898Assert.Equal(SyntaxKind.InternalKeyword, cs.Modifiers[0].Kind()); 1899Assert.Equal(SyntaxKind.ProtectedKeyword, cs.Modifiers[1].Kind()); 1901Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1926Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1940Assert.Equal(SyntaxKind.PublicKeyword, cs.Modifiers[0].Kind()); 1942Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1967Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 1981Assert.Equal(SyntaxKind.InternalKeyword, cs.Modifiers[0].Kind()); 1983Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 2276Assert.Equal(SyntaxKind.RefKeyword, ds.ParameterList.Parameters[0].Modifiers[0].Kind()); 2312Assert.Equal(SyntaxKind.OutKeyword, ds.ParameterList.Parameters[0].Modifiers[0].Kind()); 2348Assert.Equal(SyntaxKind.ParamsKeyword, ds.ParameterList.Parameters[0].Modifiers[0].Kind()); 2446Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 2488Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 2513Assert.NotEqual(SyntaxKind.None, ms.Body.OpenBraceToken.Kind()); 2514Assert.NotEqual(SyntaxKind.None, ms.Body.CloseBraceToken.Kind()); 2515Assert.Equal(SyntaxKind.None, ms.SemicolonToken.Kind()); 2534Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 2558Assert.NotEqual(SyntaxKind.None, ms.Body.OpenBraceToken.Kind()); 2559Assert.NotEqual(SyntaxKind.None, ms.Body.CloseBraceToken.Kind()); 2560Assert.Equal(SyntaxKind.None, ms.SemicolonToken.Kind()); 2580Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 2604Assert.NotEqual(SyntaxKind.None, ms.Body.OpenBraceToken.Kind()); 2605Assert.NotEqual(SyntaxKind.None, ms.Body.CloseBraceToken.Kind()); 2606Assert.Equal(SyntaxKind.None, ms.SemicolonToken.Kind()); 2625Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 2655Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 2683Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 2699Assert.Equal(modifiers[i], ms.Modifiers[i].Kind()); 2712Assert.NotEqual(SyntaxKind.None, ms.Body.OpenBraceToken.Kind()); 2713Assert.NotEqual(SyntaxKind.None, ms.Body.CloseBraceToken.Kind()); 2714Assert.Equal(SyntaxKind.None, ms.SemicolonToken.Kind()); 2751Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 2765Assert.Equal(SyntaxKind.PartialKeyword, ms.Modifiers[0].Kind()); 2777Assert.NotEqual(SyntaxKind.None, ms.Body.OpenBraceToken.Kind()); 2778Assert.NotEqual(SyntaxKind.None, ms.Body.CloseBraceToken.Kind()); 2779Assert.Equal(SyntaxKind.None, ms.SemicolonToken.Kind()); 2798Assert.Equal(SyntaxKind.StructKeyword, structDecl.Keyword.Kind()); 2812Assert.Equal(SyntaxKind.ReadOnlyKeyword, ms.Modifiers[0].Kind()); 2824Assert.NotEqual(SyntaxKind.None, ms.Body.OpenBraceToken.Kind()); 2825Assert.NotEqual(SyntaxKind.None, ms.Body.CloseBraceToken.Kind()); 2826Assert.Equal(SyntaxKind.None, ms.SemicolonToken.Kind()); 2845Assert.Equal(SyntaxKind.StructKeyword, structDecl.Keyword.Kind()); 2859Assert.Equal(SyntaxKind.ReadOnlyKeyword, ms.Modifiers[0].Kind()); 2862Assert.Equal(SyntaxKind.RefKeyword, rt.RefKeyword.Kind()); 2863Assert.Equal(SyntaxKind.ReadOnlyKeyword, rt.ReadOnlyKeyword.Kind()); 2874Assert.NotEqual(SyntaxKind.None, ms.Body.OpenBraceToken.Kind()); 2875Assert.NotEqual(SyntaxKind.None, ms.Body.CloseBraceToken.Kind()); 2876Assert.Equal(SyntaxKind.None, ms.SemicolonToken.Kind()); 2895Assert.Equal(SyntaxKind.StructKeyword, structDecl.Keyword.Kind()); 2909Assert.Equal(SyntaxKind.ReadOnlyKeyword, propertySyntax.Modifiers[0].Kind()); 2915Assert.NotEqual(SyntaxKind.None, propertySyntax.ExpressionBody.ArrowToken.Kind()); 2917Assert.Equal(SyntaxKind.SemicolonToken, propertySyntax.SemicolonToken.Kind()); 2936Assert.Equal(SyntaxKind.StructKeyword, structDecl.Keyword.Kind()); 2957Assert.Equal(SyntaxKind.ReadOnlyKeyword, accessors[0].Modifiers[0].Kind()); 2997Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 3028Assert.NotEqual(SyntaxKind.None, ms.Body.OpenBraceToken.Kind()); 3029Assert.NotEqual(SyntaxKind.None, ms.Body.CloseBraceToken.Kind()); 3030Assert.Equal(SyntaxKind.None, ms.SemicolonToken.Kind()); 3049Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 3090Assert.NotEqual(SyntaxKind.None, ms.Body.OpenBraceToken.Kind()); 3091Assert.NotEqual(SyntaxKind.None, ms.Body.CloseBraceToken.Kind()); 3092Assert.Equal(SyntaxKind.None, ms.SemicolonToken.Kind()); 3110Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 3135Assert.Equal(mod, ms.ParameterList.Parameters[0].Modifiers[0].Kind()); 3145Assert.NotEqual(SyntaxKind.None, ms.Body.OpenBraceToken.Kind()); 3146Assert.NotEqual(SyntaxKind.None, ms.Body.CloseBraceToken.Kind()); 3147Assert.Equal(SyntaxKind.None, ms.SemicolonToken.Kind()); 3175Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 3202Assert.Equal(SyntaxKind.ArgListKeyword, ms.ParameterList.Parameters[0].Identifier.Kind()); 3208Assert.NotEqual(SyntaxKind.None, ms.Body.OpenBraceToken.Kind()); 3209Assert.NotEqual(SyntaxKind.None, ms.Body.CloseBraceToken.Kind()); 3210Assert.Equal(SyntaxKind.None, ms.SemicolonToken.Kind()); 3249Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 3274Assert.NotEqual(SyntaxKind.None, ms.Body.OpenBraceToken.Kind()); 3275Assert.NotEqual(SyntaxKind.None, ms.Body.CloseBraceToken.Kind()); 3276Assert.Equal(SyntaxKind.None, ms.SemicolonToken.Kind()); 3314Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 3345Assert.NotEqual(SyntaxKind.None, ms.Body.OpenBraceToken.Kind()); 3346Assert.NotEqual(SyntaxKind.None, ms.Body.CloseBraceToken.Kind()); 3347Assert.Equal(SyntaxKind.None, ms.SemicolonToken.Kind()); 3366Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 3391Assert.NotEqual(SyntaxKind.None, ms.Body.OpenBraceToken.Kind()); 3392Assert.NotEqual(SyntaxKind.None, ms.Body.CloseBraceToken.Kind()); 3393Assert.Equal(SyntaxKind.None, ms.SemicolonToken.Kind()); 3412Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 3451Assert.NotEqual(SyntaxKind.None, ms.Body.OpenBraceToken.Kind()); 3452Assert.NotEqual(SyntaxKind.None, ms.Body.CloseBraceToken.Kind()); 3453Assert.Equal(SyntaxKind.None, ms.SemicolonToken.Kind()); 3493Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 3498Assert.NotEqual(SyntaxKind.None, cs.OpenBraceToken.Kind()); 3499Assert.NotEqual(SyntaxKind.None, cs.CloseBraceToken.Kind()); 3500Assert.Equal(SyntaxKind.None, cs.SemicolonToken.Kind()); 3528Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 3533Assert.NotEqual(SyntaxKind.None, cs.OpenBraceToken.Kind()); 3534Assert.NotEqual(SyntaxKind.None, cs.CloseBraceToken.Kind()); 3535Assert.Equal(SyntaxKind.None, cs.SemicolonToken.Kind()); 3543Assert.Equal(mod, cn.Modifiers[0].Kind()); 3575Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 3580Assert.NotEqual(SyntaxKind.None, cs.OpenBraceToken.Kind()); 3581Assert.NotEqual(SyntaxKind.None, cs.CloseBraceToken.Kind()); 3582Assert.Equal(SyntaxKind.None, cs.SemicolonToken.Kind()); 3612Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 3672Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 3712Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 3726Assert.Equal(mod, fs.Modifiers[0].Kind()); 3766Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 3780Assert.Equal(mod, fs.Modifiers[0].Kind()); 3822Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 3836Assert.Equal(SyntaxKind.ConstKeyword, fs.Modifiers[0].Kind()); 3867Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 3911Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 3956Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 4010Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 4073Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 4087Assert.Equal(SyntaxKind.FixedKeyword, fs.Modifiers[0].Kind()); 4119Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 4145Assert.Equal(SyntaxKind.GetKeyword, ps.AccessorList.Accessors[0].Keyword.Kind()); 4152Assert.Equal(SyntaxKind.SetKeyword, ps.AccessorList.Accessors[1].Keyword.Kind()); 4173Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 4199Assert.Equal(SyntaxKind.GetKeyword, ps.AccessorList.Accessors[0].Keyword.Kind()); 4206Assert.Equal(SyntaxKind.SetKeyword, ps.AccessorList.Accessors[1].Keyword.Kind()); 4228Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 4254Assert.Equal(SyntaxKind.GetKeyword, ps.AccessorList.Accessors[0].Keyword.Kind()); 4261Assert.Equal(SyntaxKind.SetKeyword, ps.AccessorList.Accessors[1].Keyword.Kind()); 4301Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 4327Assert.Equal(SyntaxKind.GetKeyword, ps.AccessorList.Accessors[0].Keyword.Kind()); 4334Assert.Equal(SyntaxKind.SetKeyword, ps.AccessorList.Accessors[1].Keyword.Kind()); 4355Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 4381Assert.Equal(SyntaxKind.GetKeyword, ps.AccessorList.Accessors[0].Keyword.Kind()); 4383Assert.Equal(SyntaxKind.None, ps.AccessorList.Accessors[0].SemicolonToken.Kind()); 4388Assert.Equal(SyntaxKind.SetKeyword, ps.AccessorList.Accessors[1].Keyword.Kind()); 4390Assert.Equal(SyntaxKind.None, ps.AccessorList.Accessors[1].SemicolonToken.Kind()); 4409Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 4435Assert.Equal(SyntaxKind.GetKeyword, ps.AccessorList.Accessors[0].Keyword.Kind()); 4441Assert.Equal(SyntaxKind.SetKeyword, ps.AccessorList.Accessors[1].Keyword.Kind()); 4493Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 4520Assert.Equal(accessorKeyword, ps.AccessorList.Accessors[0].Keyword.Kind()); 4521Assert.Equal(SyntaxKind.None, ps.AccessorList.Accessors[0].SemicolonToken.Kind()); 4531Assert.Equal(tokenKind, ((IdentifierNameSyntax)bx.Right).Identifier.Kind()); 4549Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 4576Assert.Equal(accessorKeyword, es.AccessorList.Accessors[0].Keyword.Kind()); 4577Assert.Equal(SyntaxKind.None, es.AccessorList.Accessors[0].SemicolonToken.Kind()); 4587Assert.Equal(tokenKind, ((IdentifierNameSyntax)bx.Right).Identifier.Kind()); 4605Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 4619Assert.Equal(mod, ps.Modifiers[0].Kind()); 4632Assert.Equal(SyntaxKind.GetKeyword, ps.AccessorList.Accessors[0].Keyword.Kind()); 4639Assert.Equal(SyntaxKind.SetKeyword, ps.AccessorList.Accessors[1].Keyword.Kind()); 4689Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 4717Assert.Equal(SyntaxKind.GetKeyword, ps.AccessorList.Accessors[0].Keyword.Kind()); 4724Assert.Equal(SyntaxKind.SetKeyword, ps.AccessorList.Accessors[1].Keyword.Kind()); 4745Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 4772Assert.Equal(SyntaxKind.AddKeyword, es.AccessorList.Accessors[0].Keyword.Kind()); 4774Assert.Equal(SyntaxKind.None, es.AccessorList.Accessors[0].SemicolonToken.Kind()); 4779Assert.Equal(SyntaxKind.RemoveKeyword, es.AccessorList.Accessors[1].Keyword.Kind()); 4781Assert.Equal(SyntaxKind.None, es.AccessorList.Accessors[1].SemicolonToken.Kind()); 4799Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 4813Assert.Equal(mod, es.Modifiers[0].Kind()); 4827Assert.Equal(SyntaxKind.AddKeyword, es.AccessorList.Accessors[0].Keyword.Kind()); 4829Assert.Equal(SyntaxKind.None, es.AccessorList.Accessors[0].SemicolonToken.Kind()); 4834Assert.Equal(SyntaxKind.RemoveKeyword, es.AccessorList.Accessors[1].Keyword.Kind()); 4836Assert.Equal(SyntaxKind.None, es.AccessorList.Accessors[1].SemicolonToken.Kind()); 4882Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 4911Assert.Equal(SyntaxKind.AddKeyword, es.AccessorList.Accessors[0].Keyword.Kind()); 4913Assert.Equal(SyntaxKind.None, es.AccessorList.Accessors[0].SemicolonToken.Kind()); 4918Assert.Equal(SyntaxKind.RemoveKeyword, es.AccessorList.Accessors[1].Keyword.Kind()); 4920Assert.Equal(SyntaxKind.None, es.AccessorList.Accessors[1].SemicolonToken.Kind()); 4939Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 4960Assert.Equal(SyntaxKind.OpenBracketToken, ps.ParameterList.OpenBracketToken.Kind()); 4962Assert.Equal(SyntaxKind.CloseBracketToken, ps.ParameterList.CloseBracketToken.Kind()); 4978Assert.Equal(SyntaxKind.GetKeyword, ps.AccessorList.Accessors[0].Keyword.Kind()); 4985Assert.Equal(SyntaxKind.SetKeyword, ps.AccessorList.Accessors[1].Keyword.Kind()); 5006Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 5027Assert.Equal(SyntaxKind.OpenBracketToken, ps.ParameterList.OpenBracketToken.Kind()); 5029Assert.Equal(SyntaxKind.CloseBracketToken, ps.ParameterList.CloseBracketToken.Kind()); 5045Assert.Equal(SyntaxKind.GetKeyword, ps.AccessorList.Accessors[0].Keyword.Kind()); 5052Assert.Equal(SyntaxKind.SetKeyword, ps.AccessorList.Accessors[1].Keyword.Kind()); 5074Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 5095Assert.Equal(SyntaxKind.OpenBracketToken, ps.ParameterList.OpenBracketToken.Kind()); 5097Assert.Equal(SyntaxKind.CloseBracketToken, ps.ParameterList.CloseBracketToken.Kind()); 5113Assert.Equal(SyntaxKind.GetKeyword, ps.AccessorList.Accessors[0].Keyword.Kind()); 5120Assert.Equal(SyntaxKind.SetKeyword, ps.AccessorList.Accessors[1].Keyword.Kind()); 5141Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 5162Assert.Equal(SyntaxKind.OpenBracketToken, ps.ParameterList.OpenBracketToken.Kind()); 5164Assert.Equal(SyntaxKind.CloseBracketToken, ps.ParameterList.CloseBracketToken.Kind()); 5189Assert.Equal(SyntaxKind.GetKeyword, ps.AccessorList.Accessors[0].Keyword.Kind()); 5196Assert.Equal(SyntaxKind.SetKeyword, ps.AccessorList.Accessors[1].Keyword.Kind()); 5217Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 5240Assert.Equal(SyntaxKind.OpenBracketToken, ps.ParameterList.OpenBracketToken.Kind()); 5242Assert.Equal(SyntaxKind.CloseBracketToken, ps.ParameterList.CloseBracketToken.Kind()); 5258Assert.Equal(SyntaxKind.GetKeyword, ps.AccessorList.Accessors[0].Keyword.Kind()); 5265Assert.Equal(SyntaxKind.SetKeyword, ps.AccessorList.Accessors[1].Keyword.Kind()); 5285Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 5302Assert.Equal(SyntaxKind.OperatorKeyword, ps.OperatorKeyword.Kind()); 5304Assert.Equal(op1, ps.OperatorToken.Kind()); 5365Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 5382Assert.Equal(SyntaxKind.OperatorKeyword, ps.OperatorKeyword.Kind()); 5384Assert.Equal(SyntaxKind.GreaterThanGreaterThanToken, ps.OperatorToken.Kind()); 5479Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 5496Assert.Equal(SyntaxKind.OperatorKeyword, ps.OperatorKeyword.Kind()); 5498Assert.Equal(op1, ps.OperatorToken.Kind()); 5542Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 5557Assert.Equal(SyntaxKind.ImplicitKeyword, ms.ImplicitOrExplicitKeyword.Kind()); 5559Assert.Equal(SyntaxKind.OperatorKeyword, ms.OperatorKeyword.Kind()); 5590Assert.Equal(SyntaxKind.ClassKeyword, cs.Keyword.Kind()); 5605Assert.Equal(SyntaxKind.ExplicitKeyword, ms.ImplicitOrExplicitKeyword.Kind()); 5607Assert.Equal(SyntaxKind.OperatorKeyword, ms.OperatorKeyword.Kind());
Parsing\ExpressionParsingTests.cs (37)
461Assert.Equal(kind, us.Token.Kind()); 488Assert.Equal(kind, token.Kind()); 493Assert.Equal(kind, token.Kind()); 516Assert.Equal(SyntaxKind.StringLiteralToken, us.Token.Kind()); 531Assert.Equal(SyntaxKind.StringLiteralToken, us.Token.Kind()); 546Assert.Equal(SyntaxKind.CharacterLiteralToken, us.Token.Kind()); 560Assert.Equal(SyntaxKind.NumericLiteralToken, us.Token.Kind()); 575Assert.Equal(kind, us.OperatorToken.Kind()); 606Assert.Equal(kind, us.OperatorToken.Kind()); 632Assert.Equal(kind, b.OperatorToken.Kind()); 678Assert.Equal(kind, a.OperatorToken.Kind()); 713Assert.Equal(kind, e.OperatorToken.Kind()); 798Assert.Equal(kind, keyword.Kind()); 885Assert.Equal(SyntaxKind.RefValueKeyword, fs.Keyword.Kind()); 907Assert.Equal(SyntaxKind.QuestionToken, ts.QuestionToken.Kind()); 908Assert.Equal(SyntaxKind.ColonToken, ts.ColonToken.Kind()); 986Assert.Equal(SyntaxKind.RefKeyword, cs.ArgumentList.Arguments[0].RefOrOutKeyword.Kind()); 1011Assert.Equal(SyntaxKind.OutKeyword, cs.ArgumentList.Arguments[0].RefOrOutKeyword.Kind()); 1082Assert.Equal(SyntaxKind.RefKeyword, ea.ArgumentList.Arguments[0].RefOrOutKeyword.Kind()); 1107Assert.Equal(SyntaxKind.OutKeyword, ea.ArgumentList.Arguments[0].RefOrOutKeyword.Kind()); 2243Assert.Equal(SyntaxKind.RefKeyword, ps.Modifiers[0].Kind()); 2305Assert.Equal(SyntaxKind.FromKeyword, fs.FromKeyword.Kind()); 2316Assert.Equal(SyntaxKind.SelectKeyword, ss.SelectKeyword.Kind()); 2389Assert.Equal(SyntaxKind.IntoKeyword, qs.Body.Continuation.IntoKeyword.Kind()); 2433Assert.Equal(SyntaxKind.WhereKeyword, ws.WhereKeyword.Kind()); 2517Assert.Equal(SyntaxKind.LetKeyword, ls.LetKeyword.Kind()); 2562Assert.Equal(SyntaxKind.OrderByKeyword, obs.OrderByKeyword.Kind()); 2567Assert.Equal(SyntaxKind.None, os.AscendingOrDescendingKeyword.Kind()); 2611Assert.Equal(SyntaxKind.None, os.AscendingOrDescendingKeyword.Kind()); 2616Assert.Equal(SyntaxKind.None, os.AscendingOrDescendingKeyword.Kind()); 2661Assert.Equal(SyntaxKind.AscendingKeyword, os.AscendingOrDescendingKeyword.Kind()); 2709Assert.Equal(SyntaxKind.DescendingKeyword, os.AscendingOrDescendingKeyword.Kind()); 2750Assert.Equal(SyntaxKind.GroupKeyword, gbs.GroupKeyword.Kind()); 2755Assert.Equal(SyntaxKind.ByKeyword, gbs.ByKeyword.Kind()); 2843Assert.Equal(SyntaxKind.JoinKeyword, js.JoinKeyword.Kind()); 2853Assert.Equal(SyntaxKind.OnKeyword, js.OnKeyword.Kind()); 2858Assert.Equal(SyntaxKind.EqualsKeyword, js.EqualsKeyword.Kind());
Parsing\NameParsingTests.cs (2)
137Assert.Equal(SyntaxKind.GlobalKeyword, an.Alias.Identifier.Kind()); 480Assert.Equal(kind, tok.Kind());
Parsing\ParserErrorMessageTests.cs (7)
3768Assert.Equal(SyntaxKind.InKeyword, methodDeclaration.ParameterList.Parameters.Single().Modifiers.Single().Kind()); 3771Assert.Equal(SyntaxKind.InKeyword, delegateDeclaration.ParameterList.Parameters.Single().Modifiers.Single().Kind()); 3774Assert.Equal(SyntaxKind.InKeyword, localFunctionStatement.ParameterList.Parameters.Single().Modifiers.Single().Kind()); 3777Assert.Equal(SyntaxKind.InKeyword, lambdaExpression.ParameterList.Parameters.Single().Modifiers.Single().Kind()); 3780Assert.Equal(SyntaxKind.InKeyword, anonymousMethodExpression.ParameterList.Parameters.Single().Modifiers.Single().Kind()); 3783Assert.Equal(SyntaxKind.InKeyword, indexerDeclaration.ParameterList.Parameters.Single().Modifiers.Single().Kind()); 3786Assert.Equal(SyntaxKind.InKeyword, operatorDeclaration.ParameterList.Parameters.Single().Modifiers.Single().Kind());
Parsing\ParsingErrorRecoveryTests.cs (48)
4589Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 4642Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 4669Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 4697Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 4724Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 4752Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 4781Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 4810Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 4840Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 4869Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 4897Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 4924Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 4951Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 4978Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 5006Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 5033Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 5061Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 5087Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 5117Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 5146Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 5176Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 5829Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 5869Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 5898Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 5927Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 5957Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 5986Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 6019Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 6046Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 6073Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 6100Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 6128Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 6155Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 6185Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 6216Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 6244Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 6292Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 6326Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 6358Assert.NotEqual(SyntaxKind.None, ds.Declaration.Variables[0].Initializer.EqualsToken.Kind()); 6467Assert.Equal(SyntaxKind.GetKeyword, acc.Keyword.Kind()); 6502Assert.Equal(SyntaxKind.GetKeyword, acc.Keyword.Kind()); 6509Assert.Equal(SyntaxKind.None, acc.SemicolonToken.Kind()); 6541Assert.Equal(SyntaxKind.GetKeyword, acc.Keyword.Kind()); 6548Assert.Equal(SyntaxKind.None, acc.SemicolonToken.Kind()); 6572Assert.Equal(SyntaxKind.GetKeyword, getDecl.Keyword.Kind()); 6580Assert.Equal(SyntaxKind.ReturnKeyword, getBodyStmts[0].GetFirstToken().Kind()); 6604Assert.Equal(SyntaxKind.GetKeyword, getDecl.Keyword.Kind()); 6609Assert.Equal(SyntaxKind.SetKeyword, setDecl.Keyword.Kind());
Parsing\ScriptParsingTests.cs (6)
9638Assert.Equal(SyntaxKind.EndOfFileToken, eof.Kind()); 9649Assert.Equal(SyntaxKind.EndOfFileToken, eof.Kind()); 9712Assert.Equal(SyntaxKind.EndOfFileToken, eof.Kind()); 9735Assert.Equal(SyntaxKind.HashToken, shebang.HashToken.Kind()); 9736Assert.Equal(SyntaxKind.ExclamationToken, shebang.ExclamationToken.Kind()); 9738Assert.Equal(SyntaxKind.EndOfDirectiveToken, endOfDirective.Kind());
Parsing\StatementParsingTests.cs (90)
170Assert.Equal(kind, us.OperatorToken.Kind()); 225Assert.Equal(SyntaxKind.IdentifierToken, ((IdentifierNameSyntax)ds.Declaration.Type).Identifier.Kind()); 259Assert.Equal(SyntaxKind.None, tt.Elements[1].Identifier.Kind()); 330Assert.Equal(SyntaxKind.IdentifierToken, ((IdentifierNameSyntax)ds.Declaration.Type).Identifier.Kind()); 652Assert.Equal(SyntaxKind.ConstKeyword, ds.Modifiers[0].Kind()); 684Assert.Equal(SyntaxKind.StaticKeyword, ds.Modifiers[0].Kind()); 716Assert.Equal(SyntaxKind.ReadOnlyKeyword, ds.Modifiers[0].Kind()); 748Assert.Equal(SyntaxKind.VolatileKeyword, ds.Modifiers[0].Kind()); 913Assert.Equal(SyntaxKind.IdentifierToken, ((IdentifierNameSyntax)fs.Declaration.Type).Identifier.Kind()); 980Assert.Equal(SyntaxKind.ColonToken, ls.ColonToken.Kind()); 1000Assert.Equal(SyntaxKind.BreakKeyword, b.BreakKeyword.Kind()); 1019Assert.Equal(SyntaxKind.ContinueKeyword, cs.ContinueKeyword.Kind()); 1038Assert.Equal(SyntaxKind.GotoKeyword, gs.GotoKeyword.Kind()); 1039Assert.Equal(SyntaxKind.None, gs.CaseOrDefaultKeyword.Kind()); 1060Assert.Equal(SyntaxKind.GotoKeyword, gs.GotoKeyword.Kind()); 1063Assert.Equal(SyntaxKind.CaseKeyword, gs.CaseOrDefaultKeyword.Kind()); 1084Assert.Equal(SyntaxKind.GotoKeyword, gs.GotoKeyword.Kind()); 1087Assert.Equal(SyntaxKind.DefaultKeyword, gs.CaseOrDefaultKeyword.Kind()); 1107Assert.Equal(SyntaxKind.ReturnKeyword, rs.ReturnKeyword.Kind()); 1127Assert.Equal(SyntaxKind.ReturnKeyword, rs.ReturnKeyword.Kind()); 1148Assert.Equal(SyntaxKind.YieldKeyword, ys.YieldKeyword.Kind()); 1151Assert.Equal(SyntaxKind.ReturnKeyword, ys.ReturnOrBreakKeyword.Kind()); 1172Assert.Equal(SyntaxKind.YieldKeyword, ys.YieldKeyword.Kind()); 1175Assert.Equal(SyntaxKind.BreakKeyword, ys.ReturnOrBreakKeyword.Kind()); 1274Assert.Equal(SyntaxKind.None, ts.Catches[0].Declaration.Identifier.Kind()); 1429Assert.Equal(SyntaxKind.CheckedKeyword, cs.Keyword.Kind()); 1446Assert.Equal(SyntaxKind.UncheckedKeyword, cs.Keyword.Kind()); 1463Assert.Equal(SyntaxKind.UnsafeKeyword, us.UnsafeKeyword.Kind()); 1480Assert.Equal(SyntaxKind.WhileKeyword, ws.WhileKeyword.Kind()); 1502Assert.Equal(SyntaxKind.DoKeyword, ds.DoKeyword.Kind()); 1505Assert.Equal(SyntaxKind.WhileKeyword, ds.WhileKeyword.Kind()); 1528Assert.Equal(SyntaxKind.ForKeyword, fs.ForKeyword.Kind()); 1554Assert.Equal(SyntaxKind.ForKeyword, fs.ForKeyword.Kind()); 1591Assert.Equal(SyntaxKind.ForKeyword, fs.ForKeyword.Kind()); 1598Assert.Equal(SyntaxKind.IdentifierToken, ((IdentifierNameSyntax)fs.Declaration.Type).Identifier.Kind()); 1630Assert.Equal(SyntaxKind.ForKeyword, fs.ForKeyword.Kind()); 1739Assert.Equal(SyntaxKind.ForKeyword, fs.ForKeyword.Kind()); 1768Assert.Equal(SyntaxKind.ForKeyword, fs.ForKeyword.Kind()); 1798Assert.Equal(SyntaxKind.ForKeyword, fs.ForKeyword.Kind()); 1828Assert.Equal(SyntaxKind.ForKeyword, fs.ForKeyword.Kind()); 1858Assert.Equal(SyntaxKind.ForKeyword, fs.ForKeyword.Kind()); 1889Assert.Equal(SyntaxKind.ForKeyword, fs.ForKeyword.Kind()); 1931Assert.Equal(SyntaxKind.ForEachKeyword, fs.ForEachKeyword.Kind()); 1940Assert.Equal(SyntaxKind.InKeyword, fs.InKeyword.Kind()); 1960Assert.Equal(SyntaxKind.ForEachKeyword, fs.ForEachKeyword.Kind()); 1973Assert.Equal(SyntaxKind.InKeyword, fs.InKeyword.Kind()); 1993Assert.Equal(SyntaxKind.ForEachKeyword, fs.ForEachKeyword.Kind()); 1999Assert.Equal(SyntaxKind.IdentifierToken, ((IdentifierNameSyntax)fs.Type).Identifier.Kind()); 2004Assert.Equal(SyntaxKind.InKeyword, fs.InKeyword.Kind()); 2024Assert.Equal(SyntaxKind.IfKeyword, ss.IfKeyword.Kind()); 2047Assert.Equal(SyntaxKind.IfKeyword, ss.IfKeyword.Kind()); 2056Assert.Equal(SyntaxKind.ElseKeyword, ss.Else.ElseKeyword.Kind()); 2073Assert.Equal(SyntaxKind.IfKeyword, ss.IfKeyword.Kind()); 2082Assert.Equal(SyntaxKind.ElseKeyword, ss.Else.ElseKeyword.Kind()); 2087Assert.Equal(SyntaxKind.IfKeyword, subIf.IfKeyword.Kind()); 2107Assert.Equal(SyntaxKind.LockKeyword, ls.LockKeyword.Kind()); 2130Assert.Equal(SyntaxKind.SwitchKeyword, ss.SwitchKeyword.Kind()); 2153Assert.Equal(SyntaxKind.SwitchKeyword, ss.SwitchKeyword.Kind()); 2163Assert.Equal(SyntaxKind.CaseKeyword, ss.Sections[0].Labels[0].Keyword.Kind()); 2188Assert.Equal(SyntaxKind.SwitchKeyword, ss.SwitchKeyword.Kind()); 2199Assert.Equal(SyntaxKind.CaseKeyword, ss.Sections[0].Labels[0].Keyword.Kind()); 2210Assert.Equal(SyntaxKind.CaseKeyword, ss.Sections[1].Labels[0].Keyword.Kind()); 2235Assert.Equal(SyntaxKind.SwitchKeyword, ss.SwitchKeyword.Kind()); 2246Assert.Equal(SyntaxKind.DefaultKeyword, ss.Sections[0].Labels[0].Keyword.Kind()); 2268Assert.Equal(SyntaxKind.SwitchKeyword, ss.SwitchKeyword.Kind()); 2279Assert.Equal(SyntaxKind.CaseKeyword, ss.Sections[0].Labels[0].Keyword.Kind()); 2285Assert.Equal(SyntaxKind.CaseKeyword, ss.Sections[0].Labels[1].Keyword.Kind()); 2310Assert.Equal(SyntaxKind.SwitchKeyword, ss.SwitchKeyword.Kind()); 2321Assert.Equal(SyntaxKind.CaseKeyword, ss.Sections[0].Labels[0].Keyword.Kind()); 2346Assert.Equal(SyntaxKind.UsingKeyword, us.UsingKeyword.Kind()); 2368Assert.Equal(SyntaxKind.UsingKeyword, us.UsingKeyword.Kind()); 2402Assert.Equal(SyntaxKind.UsingKeyword, us.UsingKeyword.Kind()); 2461Assert.Equal(SyntaxKind.UsingKeyword, us.UsingKeyword.Kind()); 2468Assert.Equal(SyntaxKind.IdentifierToken, ((IdentifierNameSyntax)us.Declaration.Type).Identifier.Kind()); 2497Assert.Equal(SyntaxKind.UsingKeyword, us.UsingKeyword.Kind()); 2503Assert.Equal(SyntaxKind.IdentifierToken, ((IdentifierNameSyntax)us.Declaration.Type).Identifier.Kind()); 2631Assert.Equal(SyntaxKind.UsingKeyword, us.UsingKeyword.Kind()); 2637Assert.Equal(SyntaxKind.IdentifierToken, ((IdentifierNameSyntax)us.Declaration.Type).Identifier.Kind()); 2801Assert.Equal(SyntaxKind.UsingKeyword, us.UsingKeyword.Kind()); 2845Assert.Equal(SyntaxKind.UsingKeyword, us.UsingKeyword.Kind()); 2926Assert.Equal(SyntaxKind.UsingKeyword, us.UsingKeyword.Kind()); 2948Assert.Equal(SyntaxKind.UsingKeyword, us.UsingKeyword.Kind()); 3009Assert.Equal(SyntaxKind.UsingKeyword, us.UsingKeyword.Kind()); 3031Assert.Equal(SyntaxKind.UsingKeyword, us.UsingKeyword.Kind()); 3081Assert.Equal(SyntaxKind.UsingKeyword, us.UsingKeyword.Kind()); 3103Assert.Equal(SyntaxKind.UsingKeyword, us.UsingKeyword.Kind()); 3353Assert.Equal(SyntaxKind.IdentifierToken, name.Identifier.Kind()); 3379Assert.Equal(SyntaxKind.ForEachKeyword, fs.ForEachKeyword.Kind()); 3388Assert.Equal(SyntaxKind.InKeyword, fs.InKeyword.Kind()); 3468Assert.Equal(SyntaxKind.WhenKeyword, filterClause.WhenKeyword.Kind());
Syntax\GreenNodeTests.cs (8)
46Assert.Equal(SyntaxKind.OpenParenToken, sw1.OpenParenToken.Kind()); 47Assert.Equal(SyntaxKind.CloseParenToken, sw1.CloseParenToken.Kind()); 49Assert.Equal(SyntaxKind.OpenParenToken, sw2.OpenParenToken.Kind()); 50Assert.Equal(SyntaxKind.CloseParenToken, sw2.CloseParenToken.Kind()); 58Assert.Equal(SyntaxKind.OpenParenToken, sw1.OpenParenToken.Kind()); 59Assert.Equal(SyntaxKind.CloseParenToken, sw1.CloseParenToken.Kind()); 61Assert.Equal(SyntaxKind.OpenParenToken, sw2.OpenParenToken.Kind()); 62Assert.Equal(SyntaxKind.CloseParenToken, sw2.CloseParenToken.Kind());
Syntax\RedNodeTests.cs (1)
19return SyntaxFactory.MissingToken(token.Kind());
Syntax\StructuredTriviaTests.cs (3)
78Assert.Equal(SyntaxKind.IdentifierToken, result.Kind()); 168Assert.Equal(SyntaxKind.StaticKeyword, trivia.Token.Kind()); 184Assert.Equal(SyntaxKind.StaticKeyword, trivia.Token.Kind());
Syntax\SyntaxAnnotationTests.cs (1)
783if (token.Kind() == SyntaxKind.None)
Syntax\SyntaxFactoryTests.cs (10)
36Assert.Equal(SyntaxKind.StaticKeyword, usingDirective.StaticKeyword.Kind()); 39Assert.Equal(SyntaxKind.SemicolonToken, usingDirective.SemicolonToken.Kind()); 69Assert.Equal(SyntaxKind.OpenBraceToken, n.OpenBraceToken.Kind()); 73Assert.Equal(SyntaxKind.CloseBraceToken, n.CloseBraceToken.Kind()); 75Assert.Equal(SyntaxKind.None, n.SemicolonToken.Kind()); 86Assert.Equal(SyntaxKind.ClassKeyword, c.Keyword.Kind()); 89Assert.Equal(SyntaxKind.OpenBraceToken, c.OpenBraceToken.Kind()); 93Assert.Equal(SyntaxKind.CloseBraceToken, c.CloseBraceToken.Kind()); 95Assert.Equal(SyntaxKind.None, c.SemicolonToken.Kind()); 218Assert.Equal(kind, token.Kind());
Syntax\SyntaxNodeTests.cs (58)
514Assert.Equal(SyntaxKind.UsingKeyword, tokens[0].Kind()); 515Assert.Equal(SyntaxKind.IdentifierToken, tokens[1].Kind()); 516Assert.Equal(SyntaxKind.SemicolonToken, tokens[2].Kind()); 517Assert.Equal(SyntaxKind.EndOfFileToken, tokens[3].Kind()); 527Assert.Equal(SyntaxKind.UsingKeyword, tokens[0].Kind()); 528Assert.Equal(SyntaxKind.IdentifierToken, tokens[1].Kind()); 529Assert.Equal(SyntaxKind.SemicolonToken, tokens[2].Kind()); 530Assert.Equal(SyntaxKind.EndOfFileToken, tokens[3].Kind()); 540Assert.Equal(SyntaxKind.ExternKeyword, tokens[0].Kind()); 541Assert.Equal(SyntaxKind.AliasKeyword, tokens[1].Kind()); 542Assert.Equal(SyntaxKind.IdentifierToken, tokens[2].Kind()); 543Assert.Equal(SyntaxKind.SemicolonToken, tokens[3].Kind()); 544Assert.Equal(SyntaxKind.UsingKeyword, tokens[4].Kind()); 545Assert.Equal(SyntaxKind.IdentifierToken, tokens[5].Kind()); 546Assert.Equal(SyntaxKind.SemicolonToken, tokens[6].Kind()); 547Assert.Equal(SyntaxKind.EndOfFileToken, tokens[7].Kind()); 557Assert.Equal(SyntaxKind.ExternKeyword, tokens[0].Kind()); 558Assert.Equal(SyntaxKind.AliasKeyword, tokens[1].Kind()); 559Assert.Equal(SyntaxKind.IdentifierToken, tokens[2].Kind()); 569Assert.Equal(SyntaxKind.ExternKeyword, tokens[0].Kind()); 570Assert.Equal(SyntaxKind.AliasKeyword, tokens[1].Kind()); 571Assert.Equal(SyntaxKind.IdentifierToken, tokens[2].Kind()); 581Assert.Equal(SyntaxKind.AliasKeyword, tokens[0].Kind()); 582Assert.Equal(SyntaxKind.IdentifierToken, tokens[1].Kind()); 583Assert.Equal(SyntaxKind.SemicolonToken, tokens[2].Kind()); 584Assert.Equal(SyntaxKind.UsingKeyword, tokens[3].Kind()); 594Assert.Equal(SyntaxKind.AliasKeyword, tokens[0].Kind()); 595Assert.Equal(SyntaxKind.IdentifierToken, tokens[1].Kind()); 596Assert.Equal(SyntaxKind.SemicolonToken, tokens[2].Kind()); 597Assert.Equal(SyntaxKind.UsingKeyword, tokens[3].Kind()); 652Assert.Equal(SyntaxKind.IdentifierToken, token.Kind()); 655Assert.Equal(SyntaxKind.IfKeyword, token.Kind()); 923Assert.Equal(SyntaxKind.PublicKeyword, first.Kind()); 931Assert.Equal(SyntaxKind.PublicKeyword, first.Kind()); 939Assert.Equal(SyntaxKind.CloseBraceToken, last.Kind()); 947Assert.Equal(SyntaxKind.EndOfFileToken, last.Kind()); 950Assert.Equal(SyntaxKind.CloseBraceToken, last.Kind()); 986while (token.Kind() != SyntaxKind.None) 1016while (token.Kind() != SyntaxKind.None) 1041while (token.Kind() != SyntaxKind.None) 1085while (token.Kind() != SyntaxKind.None) 1116while (token.Kind() != SyntaxKind.None) 1145while (token.Kind() != SyntaxKind.None) 1192while (token.Kind() != SyntaxKind.None) 1234while (token.Kind() != SyntaxKind.None) 2023Assert.True(expectedTokenKinds.SequenceEqual(actualTokens.Select(t => t.Kind()))); 2319var expr2 = expr.ReplaceToken(token, SyntaxFactory.Token(token.Kind())); 2332var token = tokens.First(t => t.Kind() == SyntaxKind.EndOfDocumentationCommentToken); 2334var expr2 = expr.ReplaceToken(token, SyntaxFactory.Token(SyntaxTriviaList.Create(SyntaxFactory.Whitespace("garbage")), token.Kind(), default(SyntaxTriviaList))); 2345var token = cu.DescendantTokens().Single(t => t.Kind() == SyntaxKind.EndOfFileToken); 2347var cu2 = cu.ReplaceToken(token, SyntaxFactory.Token(SyntaxTriviaList.Create(SyntaxFactory.Whitespace(" ")), token.Kind(), default(SyntaxTriviaList))); 3274Assert.Equal(SyntaxKind.CommaToken, ((SyntaxToken)list.GetSeparator(0)).Kind()); 3275Assert.Equal(SyntaxKind.CommaToken, ((SyntaxToken)list.GetSeparator(1)).Kind()); 3295Assert.Equal(SyntaxKind.CommaToken, (new SyntaxToken(internalParameters.GetSeparator(0))).Kind()); 3296Assert.Equal(SyntaxKind.CommaToken, (new SyntaxToken(internalParameters.GetSeparator(1))).Kind()); 3420Where(token => token.Kind() != SyntaxKind.EndOfFileToken). 3446Assert.Equal(SyntaxKind.StaticKeyword, newModifiers[0].Kind()); 3447Assert.Equal(SyntaxKind.UnsafeKeyword, newModifiers[1].Kind());
Syntax\SyntaxRewriterTests.cs (4)
143if (token.Kind() == SyntaxKind.CommaToken && first) 163(token.Kind() == SyntaxKind.CommaToken) ? default(SyntaxToken) : token); 568var rewriter = new RedRewriter(rewriteToken: tok => tok.Kind() == SyntaxKind.IdentifierToken ? tok.WithLeadingTrivia(trivia) : tok); 614var rewriter = new RedRewriter(rewriteToken: tok => tok.Kind() == SyntaxKind.IdentifierToken ? tok.WithLeadingTrivia(trivia) : tok);
Microsoft.CodeAnalysis.CSharp.Workspaces (362)
Classification\ClassificationHelpers.cs (11)
34else if (SyntaxFacts.IsKeywordKind(token.Kind()) || token.IsKind(SyntaxKind.DiscardDesignation)) 39else if (SyntaxFacts.IsPunctuation(token.Kind())) 43else if (token.Kind() == SyntaxKind.IdentifierToken) 53else if (token.Kind() == SyntaxKind.NumericLiteralToken) 63if (token.Parent is null || !IsControlKeywordKind(token.Kind())) 143return token.Kind() 167switch (token.Kind()) 351if (token.Kind().IsOperator()) 354switch (token.Kind()) 542var isKeyword = SyntaxFacts.IsKeywordKind(token.Kind()) 546var isIdentifier = token.Kind() == SyntaxKind.IdentifierToken;
Classification\Worker.cs (2)
129if (token.Kind() is 144if (token.Kind() == SyntaxKind.IdentifierToken &&
Classification\Worker_DocumentationComments.cs (2)
155if (token.Kind() == SyntaxKind.XmlEntityLiteralToken) 159else if (token.Kind() != SyntaxKind.XmlTextLiteralNewLineToken)
Classification\Worker_Preprocesser.cs (2)
236switch (node.Line.Kind()) 265if (token.Kind() != SyntaxKind.None)
CodeGeneration\CSharpSyntaxGenerator.cs (5)
826x.Kind() == SyntaxKind.AbstractKeyword 827|| x.Kind() == SyntaxKind.VirtualKeyword 828|| x.Kind() == SyntaxKind.PublicKeyword); 2214if (!rewrittenToken.IsMissing || !CSharp.SyntaxFacts.IsPunctuationOrKeyword(token.Kind())) 2219return SyntaxFactory.Token(token.Kind()).WithTriviaFrom(rewrittenToken);
FindSymbols\CSharpDeclaredSymbolInfoFactoryService.cs (2)
602switch (modifier.Kind()) 748var kind = predefinedTypeNode.Keyword.Kind();
Formatting\CSharpSyntaxFormattingService.cs (3)
277if (tokenBeforeCaret.Kind() is SyntaxKind.CloseBraceToken or 310return token.Kind() 344if (currentToken.Kind() == SyntaxKind.OpenBraceToken && currentTokenParentParent != null &&
Rename\CSharpRenameRewriterLanguageService.cs (2)
752token.GetPreviousToken().Kind() != SyntaxKind.DotToken && 753token.GetNextToken().Kind() != SyntaxKind.DotToken)
Simplification\CSharpSimplificationService.Expander.cs (4)
275node.RefOrOutKeyword.Kind() == SyntaxKind.None) 728if (candidateToken.Kind() is SyntaxKind.LessThanToken or SyntaxKind.GreaterThanToken) 1007if (oldToken.Kind() == SyntaxKind.LessThanToken) 1012if (oldToken.Kind() == SyntaxKind.GreaterThanToken)
Simplification\Reducers\CSharpEscapingReducer.cs (3)
60if (simpleLambda.AsyncKeyword.Kind() == SyntaxKind.AsyncKeyword) 68if (parenLamdba.AsyncKeyword.Kind() == SyntaxKind.AsyncKeyword) 106var result = token.Kind() == SyntaxKind.IdentifierToken ? CreateNewIdentifierTokenFromToken(token, escape: false) : token;
Simplification\Simplifiers\AbstractCSharpSimplifier.cs (1)
377TypeSyntax node = token.Kind() == SyntaxKind.IdentifierToken
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\CodeStyle\TypeStyle\TypeStyleHelper.cs (1)
225? SyntaxFacts.IsPredefinedType(predefinedType.Keyword.Kind())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (5)
36if (token.Kind() is SyntaxKind.MultiLineRawStringLiteralToken or SyntaxKind.Utf8MultiLineRawStringLiteralToken) 62switch (token.Kind()) 96return interpolatedString.StringStartToken.Kind() switch 140if (token.Kind() is SyntaxKind.Utf8SingleLineRawStringLiteralToken) 146if (token.Kind() is SyntaxKind.SingleLineRawStringLiteralToken or SyntaxKind.Utf8SingleLineRawStringLiteralToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ArgumentSyntaxExtensions.cs (4)
19return [SyntaxFactory.Token(argument.RefKindKeyword.Kind())]; 26=> argument?.RefKindKeyword.Kind() switch 82if (argument.RefOrOutKeyword.Kind() == SyntaxKind.OutKeyword && 88if (argument.RefOrOutKeyword.Kind() == SyntaxKind.RefKeyword &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\AssignmentExpressionSyntaxExtensions.cs (1)
17assignment.OperatorToken.Kind() == SyntaxKind.EqualsToken &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (2)
84return firstToken.Kind() != SyntaxKind.None 85&& firstToken.GetPreviousToken().Kind() == SyntaxKind.CloseParenToken;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\MemberDeclarationSyntaxExtensions.DeclarationFinder.cs (1)
32if (syntaxToken.Kind() == SyntaxKind.IdentifierToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
151switch (token.Kind())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.cs (1)
73if (prevToken.Kind() == SyntaxKind.None)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxNodeExtensions.SingleLineRewriter.cs (2)
60if (token.Kind() is SyntaxKind.StringLiteralToken or SyntaxKind.InterpolatedStringTextToken) 67token.Kind(),
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (16)
21=> kind = token.Kind(); 40=> token.Kind() == kind || token.HasMatchingText(kind); 46=> token.Kind() is SyntaxKind.OpenBraceToken or SyntaxKind.CommaToken && 65if (token.Kind() == SyntaxKind.IdentifierToken) 78var tokenKind = token.Kind(); 127switch (token.Kind()) 163if (previousToken.Kind() == SyntaxKind.None) 196=> token.Kind() == SyntaxKind.StringLiteralToken && !token.IsVerbatimStringLiteral(); 200switch (token.Kind()) 234if (genericIdentifier.GetNextToken(includeSkipped: true).Kind() == SyntaxKind.LessThanToken) 258Contract.ThrowIfFalse(genericIdentifier.Kind() == SyntaxKind.IdentifierToken); 262Contract.ThrowIfFalse(token.Kind() == SyntaxKind.LessThanToken); 271if (next.Kind() == SyntaxKind.None) 279if (token.Kind() == SyntaxKind.GreaterThanToken) 292switch (token.Kind()) 330if (SyntaxFacts.IsKeywordKind(token.Kind()))
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (7)
198var endsWithNewLine = trivia.GetStructure()!.GetLastToken(includeSkipped: true).Kind() == SyntaxKind.XmlTextLiteralNewLineToken; 320var kind = token.Kind(); 395if (token.Kind() is SyntaxKind.EndOfDirectiveToken or SyntaxKind.EndOfFileToken) 399if (token.Kind() is 416if (token.Kind() is 426if (token.Kind() is SyntaxKind.InterpolatedStringTextToken) 451if (token.Kind() == SyntaxKind.CharacterLiteralToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\DefaultOperationProvider.cs (1)
45var space = currentToken.Kind() == SyntaxKind.EndOfFileToken ? 0 : 1;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\FormattingHelpers.cs (33)
83=> token.Kind() == SyntaxKind.OpenParenToken && token.Parent.IsKind(SyntaxKind.ParameterList); 86=> token.Kind() == SyntaxKind.CloseParenToken && token.Parent.IsKind(SyntaxKind.ParameterList); 90return token.Kind() == SyntaxKind.OpenParenToken && 96return token.Kind() == SyntaxKind.CloseParenToken && 119=> token.Kind() == SyntaxKind.ColonToken && token.Parent.IsKind(SyntaxKind.BaseList); 122=> token.Kind() == SyntaxKind.CommaToken && (token.Parent.IsAnyArgumentList() || token.Parent?.Kind() is SyntaxKind.ParameterList or SyntaxKind.FunctionPointerParameterList); 125=> token.Kind() == SyntaxKind.OpenParenToken && token.Parent.IsKind(SyntaxKind.ParameterList) && token.Parent.Parent.IsKind(SyntaxKind.ParenthesizedLambdaExpression); 150token.Kind() == SyntaxKind.SemicolonToken && 157if (token.Kind() != SyntaxKind.SemicolonToken) 173if (token.Kind() != SyntaxKind.CloseBraceToken) 183if (token.Kind() != SyntaxKind.CloseBraceToken) 209return token.Kind() == SyntaxKind.CommaToken && 215return token.Kind() == SyntaxKind.CommaToken && 305=> token.IsDotInMemberAccess() || (token.Kind() == SyntaxKind.DotToken && token.Parent.IsKind(SyntaxKind.QualifiedName)); 314return token.Kind() == SyntaxKind.DotToken 320if (token.Kind() == SyntaxKind.GreaterThanToken) 328return token.Kind() == SyntaxKind.CommaToken && 334=> token.Kind() == SyntaxKind.ColonToken && token.Parent is CasePatternSwitchLabelSyntax; 337=> token.Kind() == SyntaxKind.ColonToken && token.Parent.IsKind(SyntaxKind.SwitchExpressionArm); 340=> token.Kind() == SyntaxKind.CommaToken && token.Parent.IsKind(SyntaxKind.SwitchExpression); 343=> token.Kind() == SyntaxKind.CommaToken && token.Parent.IsKind(SyntaxKind.PropertyPatternClause); 347return token.Kind() == SyntaxKind.IdentifierToken && 357return token.Kind() == SyntaxKind.ColonToken && 375return token.Kind() == SyntaxKind.InKeyword && 382return token.Kind() == SyntaxKind.FromKeyword && 467return (token1.Kind() == SyntaxKind.OpenParenToken && token2.Kind() == SyntaxKind.CloseParenToken) || 468(token1.Kind() == SyntaxKind.OpenBracketToken && token2.Kind() == SyntaxKind.CloseBracketToken); 473if (token.Kind() is not SyntaxKind.SemicolonToken and not SyntaxKind.CloseBraceToken) 512if (token.Kind() is not SyntaxKind.PlusToken and not SyntaxKind.MinusToken) 528return currentToken.Kind() == SyntaxKind.OpenParenToken && 543=> token.Kind() == SyntaxKind.CommaToken && token.Parent.IsKind(SyntaxKind.CollectionExpression);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\BaseFormattingRule.cs (14)
24if (startToken.Kind() == SyntaxKind.None || endToken.Kind() == SyntaxKind.None) 39if (startToken.Kind() == SyntaxKind.None || endToken.Kind() == SyntaxKind.None) 63if (startToken.Kind() == SyntaxKind.None || endToken.Kind() == SyntaxKind.None) 77if (startToken.Kind() == SyntaxKind.None || endToken.Kind() == SyntaxKind.None) 92if (startToken.Kind() == SyntaxKind.None || endToken.Kind() == SyntaxKind.None) 128if (startToken.Kind() == SyntaxKind.None || endToken.Kind() == SyntaxKind.None) 138if (anchorToken.Kind() == SyntaxKind.None || endToken.Kind() == SyntaxKind.None)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\ElasticTriviaFormattingRule.cs (22)
176if (previousToken.Kind() != SyntaxKind.SemicolonToken) 179if (currentToken.Kind() == SyntaxKind.EndOfFileToken) 182if (currentToken.Kind() == SyntaxKind.CloseBraceToken) 310if (currentToken.Kind() == SyntaxKind.None) 315switch (previousToken.Kind()) 329|| currentToken.Kind() == SyntaxKind.OpenBraceToken) ? 1 : 0; 362return currentToken.Kind() != SyntaxKind.IfKeyword ? 1 : 0; 373if ((currentToken.Kind() == SyntaxKind.FromKeyword && currentToken.Parent.IsKind(SyntaxKind.FromClause)) || 374(currentToken.Kind() == SyntaxKind.LetKeyword && currentToken.Parent.IsKind(SyntaxKind.LetClause)) || 375(currentToken.Kind() == SyntaxKind.WhereKeyword && currentToken.Parent.IsKind(SyntaxKind.WhereClause)) || 376(currentToken.Kind() == SyntaxKind.JoinKeyword && currentToken.Parent.IsKind(SyntaxKind.JoinClause)) || 377(currentToken.Kind() == SyntaxKind.JoinKeyword && currentToken.Parent.IsKind(SyntaxKind.JoinIntoClause)) || 378(currentToken.Kind() == SyntaxKind.OrderByKeyword && currentToken.Parent.IsKind(SyntaxKind.OrderByClause)) || 379(currentToken.Kind() == SyntaxKind.SelectKeyword && currentToken.Parent.IsKind(SyntaxKind.SelectClause)) || 380(currentToken.Kind() == SyntaxKind.GroupKeyword && currentToken.Parent.IsKind(SyntaxKind.GroupClause))) 385switch (currentToken.Kind()) 399parent.Target.Identifier.Kind() is SyntaxKind.AssemblyKeyword or SyntaxKind.ModuleKeyword && 425if (nextToken.Kind() == SyntaxKind.CloseBraceToken) 430nextToken.Kind() is SyntaxKind.CatchKeyword or 437nextToken.Kind() == SyntaxKind.WhileKeyword && 442else if (nextToken.Kind() == SyntaxKind.EndOfFileToken) 458else if (currentToken.Kind() == SyntaxKind.CloseBraceToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\EndOfFileTokenFormattingRule.cs (2)
17if (currentToken.Kind() == SyntaxKind.EndOfFileToken) 29if (currentToken.Kind() == SyntaxKind.EndOfFileToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\QueryExpressionFormattingRule.cs (1)
148switch (currentToken.Kind())
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\SpacingFormattingRule.cs (3)
47var previousKind = previousToken.Kind(); 48var currentKind = currentToken.Kind(); 85if ((previousToken.IsKeyword() || previousToken.Kind() is SyntaxKind.QuestionToken or SyntaxKind.AsteriskToken or SyntaxKind.CloseBracketToken or SyntaxKind.CloseParenToken or SyntaxKind.GreaterThanToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\StructuredTriviaFormattingRule.cs (5)
29if (previousToken.Kind() == SyntaxKind.HashToken && SyntaxFacts.IsPreprocessorKeyword(currentToken.Kind())) 34if (previousToken.Kind() == SyntaxKind.RegionKeyword && currentToken.Kind() == SyntaxKind.EndOfDirectiveToken) 39if (currentToken.Kind() == SyntaxKind.EndOfDirectiveToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\TokenBasedFormattingRule.cs (57)
48switch (currentToken.Kind()) 73if (previousToken.Kind() == SyntaxKind.CloseBraceToken && currentToken.Kind() == SyntaxKind.WhileKeyword) 79switch (previousToken.Kind()) 151if (previousToken.Kind() == SyntaxKind.ElseKeyword && currentToken.Kind() != SyntaxKind.IfKeyword) 170if (previousToken.Kind() == SyntaxKind.CloseParenToken && previousToken.Parent.IsEmbeddedStatementOwnerWithCloseParen()) 175if (previousToken.Kind() == SyntaxKind.DoKeyword && previousToken.Parent.IsKind(SyntaxKind.DoStatement)) 187if (previousToken.Kind() == SyntaxKind.SemicolonToken && 188(currentToken.Kind() == SyntaxKind.CaseKeyword || currentToken.Kind() == SyntaxKind.DefaultKeyword || currentToken.Kind() == SyntaxKind.ElseKeyword)) 194if (previousToken.Kind() == SyntaxKind.SemicolonToken) 201if (previousToken.Kind() == SyntaxKind.CloseBracketToken && previousToken.Parent is AttributeListSyntax) 260if (currentToken.Kind() == SyntaxKind.SemicolonToken) 263if (previousToken.Kind() == SyntaxKind.SemicolonToken) 269if (previousToken.Kind() == SyntaxKind.CloseParenToken && previousToken.Parent.IsEmbeddedStatementOwnerWithCloseParen()) 279if (previousToken.Kind() == SyntaxKind.OmittedArraySizeExpressionToken || 280previousToken.Kind() == SyntaxKind.OmittedTypeArgumentToken || 281currentToken.Kind() == SyntaxKind.OmittedArraySizeExpressionToken || 282currentToken.Kind() == SyntaxKind.OmittedTypeArgumentToken) 307if (currentToken.Kind() == SyntaxKind.OpenParenToken && 308previousToken.Kind() == SyntaxKind.ThisKeyword) 313if (previousToken.Kind() == SyntaxKind.NewKeyword) 325if (currentToken.Kind() == SyntaxKind.OpenParenToken) 327if (previousToken.Kind() == SyntaxKind.IdentifierToken || 328previousToken.Kind() == SyntaxKind.DefaultKeyword || 329previousToken.Kind() == SyntaxKind.BaseKeyword || 330previousToken.Kind() == SyntaxKind.ThisKeyword || 346if (previousToken.Kind() == SyntaxKind.CommaToken && currentToken.Kind() == SyntaxKind.OpenBracketToken && currentToken.Parent is AttributeListSyntax) 352if (previousToken.Kind() == SyntaxKind.CloseBracketToken && previousToken.Parent is AttributeListSyntax) 363switch (currentToken.Kind()) 410previousToken.Kind() == SyntaxKind.CloseParenToken) 419if (previousToken.Kind() == SyntaxKind.LessThanToken) 425if (previousToken.Kind() == SyntaxKind.GreaterThanToken && currentToken.Kind() == SyntaxKind.GreaterThanToken) 432if ((currentToken.Kind() == SyntaxKind.LessThanToken || currentToken.Kind() == SyntaxKind.GreaterThanToken) && 439if ((previousToken.Kind() == SyntaxKind.PlusPlusToken || previousToken.Kind() == SyntaxKind.MinusMinusToken) && 446if ((currentToken.Kind() == SyntaxKind.PlusPlusToken || currentToken.Kind() == SyntaxKind.MinusMinusToken) && 459if (currentToken.Kind() == SyntaxKind.QuestionToken && 473if (currentToken.Kind() == SyntaxKind.ExclamationToken && 480if (currentToken.Kind() == SyntaxKind.AsteriskToken && currentToken.Parent is PointerTypeSyntax) 486if (previousToken.Kind() == SyntaxKind.AsteriskToken && previousToken.Parent is PrefixUnaryExpressionSyntax) 492switch (previousToken.Kind()) 502var space = (previousToken.Kind() == currentToken.Kind()) ? 0 : 1; 514previousToken.Kind() != currentToken.Kind()) 520if (previousToken.Kind() == SyntaxKind.ExclamationToken 527if (previousToken.Kind() == SyntaxKind.TildeToken && (previousToken.Parent is PrefixUnaryExpressionSyntax || previousToken.Parent is DestructorDeclarationSyntax)) 533if (previousToken.Kind() == SyntaxKind.AmpersandToken && 540if (previousToken.Kind() == SyntaxKind.ColonColonToken || currentToken.Kind() == SyntaxKind.ColonColonToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\WrappingFormattingRule.cs (2)
183if (startToken.Kind() == SyntaxKind.None || endToken.Kind() == SyntaxKind.None)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Indentation\CSharpSmartTokenFormatter.cs (4)
49Contract.ThrowIfTrue(startToken.Kind() is SyntaxKind.None or SyntaxKind.EndOfFileToken); 50Contract.ThrowIfTrue(endToken.Kind() is SyntaxKind.None or SyntaxKind.EndOfFileToken); 80Contract.ThrowIfTrue(token.Kind() is SyntaxKind.None or SyntaxKind.EndOfFileToken); 84if (previousToken.Kind() == SyntaxKind.None)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (5)
290AssignmentExpressionSyntax _ when token.Kind() == SyntaxKind.EqualsToken => GetDeconstructionAssignmentMethods(semanticModel, node).As<ISymbol>(), 291ForEachVariableStatementSyntax _ when token.Kind() == SyntaxKind.InKeyword => GetDeconstructionForEachMethods(semanticModel, node).As<ISymbol>(), 314if (token.Kind() == SyntaxKind.CommaToken) 324if (ordering.AscendingOrDescendingKeyword.Kind() == SyntaxKind.None) 328else if (orderByClauseSyntax.Orderings[0].AscendingOrDescendingKeyword.Kind() == SyntaxKind.None)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpAccessibilityFacts.cs (3)
111accessibility = (token.Kind(), accessibility) switch 128modifiers |= token.Kind() switch 149isDefault |= token.Kind() == SyntaxKind.DefaultKeyword;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxFacts.cs (17)
98var kind = token.Kind(); 108=> SyntaxFacts.IsReservedKeyword(token.Kind()); 111=> SyntaxFacts.IsContextualKeyword(token.Kind()); 114=> SyntaxFacts.IsPreprocessorKeyword(token.Kind()); 137if (lineDirective.Line.Kind() == SyntaxKind.DefaultKeyword) 142else if (lineDirective.Line.Kind() == SyntaxKind.NumericLiteralToken && 281switch (token.Kind()) 325=> token.Kind() switch 477switch (token.Kind()) 504=> token.Kind() is SyntaxKind.StringLiteralToken or SyntaxKind.InterpolatedStringTextToken; 521if (token.Kind() == SyntaxKind.CommaToken && token.Parent.IsKind(SyntaxKind.OrderByClause)) 526if (token.Kind() is SyntaxKind.OpenBracketToken or SyntaxKind.CloseBracketToken 556simpleName.GetLastToken().GetNextToken().Kind() == SyntaxKind.LessThanToken; 607argument.RefOrOutKeyword.Kind() == SyntaxKind.None && 1200=> token.Kind() == SyntaxKind.NumericLiteralToken; 1243attributeList.Target?.Identifier.Kind() == attributeTarget; 1415if (token.Kind() == SyntaxKind.OverrideKeyword && token.Parent is MemberDeclarationSyntax member)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\FormattingRangeHelper.cs (12)
22Contract.ThrowIfTrue(endToken.Kind() == SyntaxKind.None); 40while (currentToken.Kind() != SyntaxKind.CloseBraceToken && previousToken.Kind() == SyntaxKind.OpenBraceToken) 43if (closeBrace.Kind() == SyntaxKind.None || !AreTwoTokensOnSameLine(previousToken, closeBrace)) 58switch (endToken.Kind()) 85if (endToken.Kind() == SyntaxKind.SkippedTokensTrivia) 289return previousToken.Kind() == SyntaxKind.None ? token : previousToken; 311if (previousToken.Kind() == SyntaxKind.None) 409return token.Kind() == SyntaxKind.ColonToken && 416if (previousToken.Kind() is not SyntaxKind.SemicolonToken and not SyntaxKind.CloseBraceToken) 421if (currentToken.Kind() == SyntaxKind.CloseBraceToken) 438if (token.Kind() == SyntaxKind.CloseBraceToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Utilities\TokenComparer.cs (2)
24x.GetPreviousToken(includeSkipped: true).Kind() is SyntaxKind.UsingKeyword or SyntaxKind.StaticKeyword && 25y.GetPreviousToken(includeSkipped: true).Kind() is SyntaxKind.UsingKeyword or SyntaxKind.StaticKeyword)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
195=> declaration.ChildTokens().Where(t => t.Kind() is SyntaxKind.OpenBraceToken or SyntaxKind.CloseBraceToken && t.IsMissing).Any();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpDeclarationComparer.cs (5)
215if (x.ImplicitOrExplicitKeyword.Kind() != y.ImplicitOrExplicitKeyword.Kind()) 217return x.ImplicitOrExplicitKeyword.Kind() == SyntaxKind.ImplicitKeyword ? -1 : 1; 403s_operatorPrecedenceMap.TryGetValue(x.Kind(), out var xPrecedence); 404s_operatorPrecedenceMap.TryGetValue(y.Kind(), out var yPrecedence);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTokenExtensions.cs (27)
19token.Kind() is SyntaxKind.UsingKeyword or 113switch (token.Kind()) 207if (token.Kind() == SyntaxKind.CloseBraceToken) 217if (token.Kind() == SyntaxKind.SemicolonToken) 250if (token.Kind() == SyntaxKind.CloseBracketToken) 272if (token.Kind() == SyntaxKind.CloseParenToken) 300if (token.Kind() == SyntaxKind.IdentifierToken && 301token.GetPreviousToken(includeSkipped: true).Kind() == SyntaxKind.IntoKeyword) 326if (targetToken.Kind() is SyntaxKind.IfKeyword or 333if (targetToken.Kind() == SyntaxKind.OpenParenToken && 363if (targetToken.Kind() is not (SyntaxKind.IdentifierToken or SyntaxKind.CloseParenToken or SyntaxKind.CloseBracketToken)) 395if (targetToken.Kind() == SyntaxKind.OpenBraceToken && 401if (targetToken.Kind() == SyntaxKind.ColonToken) 409if (targetToken.Kind() is SyntaxKind.SemicolonToken or 430return targetToken.Kind() is SyntaxKind.CommaToken or SyntaxKind.OpenParenToken && 449if (targetToken.Kind() == SyntaxKind.ColonToken && 465if (targetToken.Kind() is SyntaxKind.OpenParenToken or 493if (targetToken.Kind() == SyntaxKind.OperatorKeyword && 570while (targetToken.Kind() is SyntaxKind.InternalKeyword or 581if (targetToken.Kind() == SyntaxKind.OpenBraceToken && 589if (targetToken.Kind() == SyntaxKind.CloseBraceToken && 597if (targetToken.Kind() == SyntaxKind.SemicolonToken && 604if (targetToken.Kind() == SyntaxKind.CloseBracketToken && 637if (targetToken.Kind() == SyntaxKind.LessThanToken && 643if (targetToken.Kind() == SyntaxKind.CommaToken && 649if (targetToken.Kind() == SyntaxKind.CloseBracketToken && 662if (token.Kind() == SyntaxKind.CommaToken && token.Parent is BaseArgumentListSyntax)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\ContextQuery\SyntaxTreeExtensions.cs (45)
358if (token.Kind() == SyntaxKind.CloseBracketToken && token.Parent is AttributeListSyntax) 419(nextToken.Kind() == SyntaxKind.GlobalKeyword && nextToken.GetAncestor<UsingDirectiveSyntax>()?.GlobalKeyword == nextToken)) 648if (token.GetNextToken(includeSkipped: true).Kind() != SyntaxKind.EqualsToken && 692if (token.Kind() 937switch (token.Kind()) 956targetToken.Kind() is SyntaxKind.ColonToken or SyntaxKind.CommaToken; 972if (token.Kind() is not SyntaxKind.LessThanToken and not SyntaxKind.CommaToken) 1107if (token.Kind() is SyntaxKind.RefKeyword or SyntaxKind.InKeyword or SyntaxKind.ReadOnlyKeyword or SyntaxKind.OutKeyword or SyntaxKind.ThisKeyword or SyntaxKind.ParamsKeyword or SyntaxKind.ScopedKeyword) 1110previousModifier = token.Kind(); 1156if (token.Kind() is SyntaxKind.OpenBracketToken or SyntaxKind.CommaToken) 1186token.GetPreviousToken(includeSkipped: true).Kind() is SyntaxKind.ImplicitKeyword or SyntaxKind.ExplicitKeyword) 1202if (token.Kind() is SyntaxKind.OpenParenToken or SyntaxKind.OpenBracketToken or SyntaxKind.CommaToken && 1228if (token.Kind() is SyntaxKind.OpenParenToken or SyntaxKind.CommaToken) 1261if (token.Kind() is SyntaxKind.OpenParenToken or SyntaxKind.CommaToken) 1287if (token.Kind() is SyntaxKind.RefKeyword or SyntaxKind.InKeyword or SyntaxKind.OutKeyword) 1384if (leftToken.Kind() is SyntaxKind.CaseKeyword or SyntaxKind.IsKeyword) 1391if (leftToken.Kind() is SyntaxKind.OpenBraceToken or SyntaxKind.CommaToken && leftToken.Parent.IsKind(SyntaxKind.SwitchExpression)) 1398if (leftToken.Kind() is SyntaxKind.OpenParenToken or SyntaxKind.CommaToken && leftToken.Parent.IsKind(SyntaxKind.PositionalPatternClause)) 1405if (leftToken.Kind() is SyntaxKind.OpenBracketToken or SyntaxKind.CommaToken && leftToken.Parent.IsKind(SyntaxKind.ListPattern)) 1447if (leftToken.Kind() is SyntaxKind.GreaterThanToken or SyntaxKind.GreaterThanEqualsToken or SyntaxKind.LessThanToken or SyntaxKind.LessThanEqualsToken && 1484return leftToken.Kind() is not (SyntaxKind.OrKeyword 1568if (possibleCommaOrParen.Kind() is not (SyntaxKind.OpenParenToken or SyntaxKind.CommaToken)) 1691if (leftToken.Kind() is SyntaxKind.OpenParenToken or SyntaxKind.CommaToken && 1795if (token.Kind() is SyntaxKind.RefKeyword or SyntaxKind.ReadOnlyKeyword) 1832if (previous.Kind() is SyntaxKind.ForKeyword or SyntaxKind.ForEachKeyword or SyntaxKind.UsingKeyword) 1919if (token.Kind() is SyntaxKind.IsKeyword or SyntaxKind.AsKeyword) 2111token.Kind() is SyntaxKind.CommaToken or SyntaxKind.OpenParenToken) 2196if (token.Kind() 2228if (token.Kind() 2343if (previousToken.Kind() is SyntaxKind.AsteriskToken or SyntaxKind.QuestionToken && 2366if (token.Kind() is SyntaxKind.OpenBracketToken or SyntaxKind.CommaToken && 2411if (token.Kind() is SyntaxKind.OpenParenToken or SyntaxKind.CommaToken && 2422if (token.Kind() is SyntaxKind.OpenParenToken or SyntaxKind.OpenBracketToken or SyntaxKind.CommaToken && 2432if (token.Kind() is SyntaxKind.OpenParenToken or SyntaxKind.CommaToken) 2445if (token.Kind() is SyntaxKind.RefKeyword or SyntaxKind.InKeyword or SyntaxKind.OutKeyword) 2480if (token.Kind() is SyntaxKind.OpenBraceToken or SyntaxKind.CommaToken) 2560if (token.Kind() is SyntaxKind.OnKeyword or SyntaxKind.EqualsKeyword && 2575if (token.Kind() is SyntaxKind.OrderByKeyword or SyntaxKind.CommaToken && 2590if (token.Kind() is SyntaxKind.GroupKeyword or SyntaxKind.ByKeyword && 2601if (token.GetPreviousToken(includeSkipped: true).Kind() != SyntaxKind.OpenBracketToken) 2689if (token.Kind() is SyntaxKind.OpenBraceToken or SyntaxKind.CommaToken && 2698if (token.Kind() is SyntaxKind.OpenBracketToken or SyntaxKind.CommaToken && 2707if (token.Kind() is SyntaxKind.OpenBracketToken or SyntaxKind.DotDotToken or SyntaxKind.CommaToken && 2716if (token.Kind() is SyntaxKind.DotDotToken && 2872if (token.Kind() is SyntaxKind.IdentifierToken &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SyntaxTokenListExtensions.cs (1)
13=> tokenList.SkipWhile(t => kinds.Contains(t.Kind()));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Indentation\CSharpIndentationService.cs (3)
90if (previousToken.Kind() == SyntaxKind.None || previousToken.IsMissing) 110return token.Kind() is SyntaxKind.None or SyntaxKind.EndOfDirectiveToken or SyntaxKind.EndOfFileToken; 142constructorInitializer.ArgumentList.OpenParenToken.Kind() != SyntaxKind.None &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Indentation\CSharpIndentationService.Indenter.cs (4)
77Contract.ThrowIfTrue(token.Kind() == SyntaxKind.None); 123if (token.Kind() is SyntaxKind.InterpolatedMultiLineRawStringStartToken or SyntaxKind.InterpolatedStringTextToken 178token.Kind() is SyntaxKind.InterpolatedVerbatimStringStartToken or SyntaxKind.InterpolatedStringTextToken || 236switch (token.Kind())
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpSyntaxFactsService.cs (2)
85if (braces.openBrace.Kind() == SyntaxKind.None && 86braces.closeBrace.Kind() == SyntaxKind.None)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\LanguageServices\CSharpTypeInferenceService.TypeInferrer.cs (13)
423if (previousToken.Kind() == SyntaxKind.NewKeyword && 424previousToken.GetPreviousToken().Kind() is SyntaxKind.EqualsToken or SyntaxKind.OpenParenToken or SyntaxKind.CommaToken) 498if (previousToken != argumentList.OpenParenToken && previousToken.Kind() != SyntaxKind.CommaToken) 528if (previousToken != attributeArgumentList.OpenParenToken && previousToken.Kind() != SyntaxKind.CommaToken) 802if (previousToken.HasValue && previousToken.Value.GetPreviousToken().Kind() == SyntaxKind.EqualsToken) 877if (previousToken != bracketedArgumentList.OpenBracketToken && previousToken.Kind() != SyntaxKind.CommaToken) 940switch (operatorToken.Kind()) 959if (operatorToken.Kind() is SyntaxKind.AmpersandAmpersandToken or 995if (operatorToken.Kind() is SyntaxKind.AmpersandToken or 1011if (operatorToken.Kind() == SyntaxKind.PlusToken) 1024switch (operatorToken.Kind()) 1609var isAsync = anonymousFunction.AsyncKeyword.Kind() != SyntaxKind.None; 2086if (token.Kind() is SyntaxKind.OpenBraceToken or SyntaxKind.CommaToken)
Microsoft.CodeAnalysis.UnitTests (1)
CommonSyntaxTests.cs (1)
200Assert.Equal(CSharp.SyntaxKind.None, CSharp.CSharpExtensions.Kind(token));
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
CodeCleanup\CodeCleanupTests.cs (1)
354root = root.ReplaceToken(nextToken, CSharp.SyntaxFactory.Token(nextToken.LeadingTrivia, CSharp.CSharpExtensions.Kind(nextToken), nextToken.TrailingTrivia));
Microsoft.Extensions.Logging.Generators (1)
src\libraries\Common\src\Roslyn\CSharpSyntaxHelper.cs (1)
93if (global != usingDirective.GlobalKeyword.Kind() is SyntaxKind.GlobalKeyword)
Microsoft.Interop.SourceGeneration (1)
SyntaxExtensions.cs (1)
89if (tokenList[i].Kind() is SyntaxKind.PublicKeyword or SyntaxKind.InternalKeyword or SyntaxKind.ProtectedKeyword or SyntaxKind.PrivateKeyword)
Microsoft.VisualStudio.LanguageServices.CSharp (19)
CodeModel\CSharpCodeModelService.cs (3)
835return (conversionOperator.ImplicitOrExplicitKeyword.Kind() == SyntaxKind.ImplicitKeyword ? "implicit " : "explicit ") 3199if (startToken.Kind() == SyntaxKind.OpenBraceToken) 3205if (endToken.Kind() == SyntaxKind.CloseBraceToken)
CodeModel\CSharpCodeModelService.NodeNameGenerator.cs (2)
211AppendOperatorName(builder, operatorDeclaration.OperatorToken.Kind()); 217AppendOperatorName(builder, conversionOperatorDeclaration.ImplicitOrExplicitKeyword.Kind());
CodeModel\EndRegionFormattingRule.cs (2)
23if (previousToken.Kind() == SyntaxKind.EndOfDirectiveToken) 26return previousPreviousToken.Kind() == SyntaxKind.EndRegionKeyword;
CodeModel\ParameterFlagsExtensions.cs (1)
20switch (modifier.Kind())
LanguageService\CSharpHelpContextService.cs (7)
113if (token.Kind() 137if (token.Kind() 146if (token.Kind() is SyntaxKind.SingleLineRawStringLiteralToken or SyntaxKind.MultiLineRawStringLiteralToken) 307if (token.Kind() is SyntaxKind.LessThanToken or SyntaxKind.GreaterThanToken) 328if (token.Kind() is SyntaxKind.LessThanToken or SyntaxKind.GreaterThanToken && 381switch (token.Kind()) 423switch (token.Kind())
Utilities\BlankLineInGeneratedMethodFormattingRule.cs (2)
24if (previousToken.Kind() == SyntaxKind.OpenBraceToken && 25currentToken.Kind() == SyntaxKind.CloseBraceToken)
Venus\CSharpVenusBraceMatchingService.cs (2)
27if (token.Kind() == SyntaxKind.CloseBraceToken) 32return openBrace.Kind() == SyntaxKind.OpenBraceToken;