1 write to Kind
Microsoft.CodeAnalysis.Razor.Compiler (1)
Language\Syntax\GreenNode.cs (1)
22Kind = kind;
256 references to Kind
Microsoft.AspNetCore.Razor.Language.UnitTests (6)
Legacy\TokenizerLookaheadTest.cs (1)
120return s.Kind == SyntaxKind.DoubleHyphen;
Syntax\SyntaxTokenCacheTest.cs (5)
23Assert.Equal(SyntaxKind.Whitespace, token.Kind); 54Assert.Equal(SyntaxKind.Whitespace, token1.Kind); 57Assert.Equal(SyntaxKind.Keyword, token2.Kind); 73Assert.Equal(SyntaxKind.Keyword, token1.Kind); 76Assert.Equal(SyntaxKind.Keyword, token2.Kind);
Microsoft.CodeAnalysis.Razor.Compiler (250)
Language\Legacy\CSharpCodeParser.cs (37)
551if (CurrentToken.Kind == SyntaxKind.LeftParenthesis || 552CurrentToken.Kind == SyntaxKind.LeftBracket) 566right = Language.FlipBracket(CurrentToken.Kind); 589if (next.Kind == SyntaxKind.Dot) 598else if (next.Kind == SyntaxKind.LeftBracket) 622if (next.Kind == SyntaxKind.Dot) 631if (nextNext.Kind == SyntaxKind.Identifier || nextNext.Kind == SyntaxKind.Keyword) 649else if (next.Kind == SyntaxKind.QuestionMark) 656else if (next.Kind == SyntaxKind.LeftBracket || next.Kind == SyntaxKind.LeftParenthesis) 786var lastWhitespace = tokens is [.., { Kind: SyntaxKind.Whitespace } whitespace] ? whitespace : null; 807var kind = CurrentToken.Kind; 858(CurrentToken.Kind == SyntaxKind.LessThan || CurrentToken.Kind == SyntaxKind.Transition)) 994token.Kind is not SyntaxKind.Semicolon and 1026switch (nextToken.Kind) 1057if (Lookahead(2) is not { Kind: SyntaxKind.Identifier or SyntaxKind.Keyword }) 1073Debug.Assert(transition.Kind == SyntaxKind.Transition); 1306Debug.Assert(CurrentToken.Kind == SyntaxKind.Identifier || CurrentToken.Kind == SyntaxKind.Keyword); 1422TokenBuilder[0] is SyntaxToken { Kind: SyntaxKind.StringLiteral } token) 1971var type = token.Kind; 2084Debug.Assert(CurrentToken.Kind == SyntaxKind.Keyword && result.HasValue); 2101Debug.Assert(CurrentToken.Kind == SyntaxKind.Keyword && result.HasValue); 2267while (EnsureCurrent() && CurrentToken.Kind != SyntaxKind.Colon) 2269switch (CurrentToken.Kind) 2629token.Kind != SyntaxKind.CSharpComment && 2630token.Kind != SyntaxKind.Whitespace && 2631token.Kind != SyntaxKind.NewLine) 2779ReadWhile(static token => token.Kind == SyntaxKind.Whitespace, ref whitespace.AsRef()); 2922var left = CurrentToken.Kind; 2965if (NextIs(SyntaxKind.Transition) && Lookahead(2) is { Kind: SyntaxKind.Identifier or SyntaxKind.Keyword }) 3065Debug.Assert(CurrentToken.Kind == SyntaxKind.Transition); 3068Debug.Assert(CurrentToken.Kind is SyntaxKind.Identifier or SyntaxKind.Keyword); 3080Debug.Assert(CurrentToken.Kind == SyntaxKind.Keyword && 3107if (result is not CSharpSyntaxKind.None and { } value && token.Kind == SyntaxKind.Keyword)
Language\Legacy\DirectiveCSharpTokenizer.cs (2)
19if (result.Result != null && !_visitedFirstTokenStart && IsValidTokenType(result.Result.Kind)) 23else if (result.Result != null && _visitedFirstTokenStart && result.Result.Kind == SyntaxKind.NewLine)
Language\Legacy\DirectiveHtmlTokenizer.cs (1)
20if (result.Result != null && IsValidTokenType(result.Result.Kind))
Language\Legacy\HtmlMarkupParser.cs (65)
367static f => (f.Kind == SyntaxKind.Whitespace) || (f.Kind == SyntaxKind.NewLine), 416if (CurrentToken.Kind == SyntaxKind.Text && CurrentToken.Content.Length > 0 && CurrentToken.Content[0] == ':') 432else if (CurrentToken.Kind == SyntaxKind.OpenAngle) 456ParseMarkupNodes(builder, ParseMode.Text, token => token.Kind == SyntaxKind.Whitespace || token.Kind == SyntaxKind.NewLine); 461} while (!EndOfFile && CurrentToken.Kind != SyntaxKind.NewLine); 467if (!EndOfFile && CurrentToken.Kind == SyntaxKind.NewLine) 1055switch (CurrentToken.Kind) 1060var openQuoteKind = CurrentToken.Kind; 1062ParseMarkupNodes(miscAttributeContentBuilder, ParseMode.Text, token => token.Kind == openQuoteKind); 1114static token => token.Kind == SyntaxKind.Whitespace || token.Kind == SyntaxKind.NewLine, 1234token.Kind != SyntaxKind.Whitespace && 1235token.Kind != SyntaxKind.NewLine && 1236token.Kind != SyntaxKind.Equals && 1237token.Kind != SyntaxKind.CloseAngle && 1238token.Kind != SyntaxKind.OpenAngle && 1239(token.Kind != SyntaxKind.Transition || !self.Context.Options.AllowCSharpInMarkupAttributeArea) && 1240(token.Kind != SyntaxKind.ForwardSlash || !self.NextIs(SyntaxKind.CloseAngle)), 1254AcceptWhile(static token => token.Kind == SyntaxKind.Whitespace || token.Kind == SyntaxKind.NewLine); 1262static token => token.Kind == SyntaxKind.Whitespace || token.Kind == SyntaxKind.NewLine, 1269quote = CurrentToken.Kind; 1370static token => token.Kind == SyntaxKind.Whitespace || token.Kind == SyntaxKind.NewLine, 1443token.Kind != SyntaxKind.Whitespace && 1444token.Kind != SyntaxKind.NewLine && 1445token.Kind != SyntaxKind.Transition && 1464? token.Kind == quote // If quoted, just wait for the quote 1473return token.Kind == SyntaxKind.DoubleQuote || 1474token.Kind == SyntaxKind.SingleQuote || 1475token.Kind == SyntaxKind.OpenAngle || 1476token.Kind == SyntaxKind.Equals || 1477(token.Kind == SyntaxKind.ForwardSlash && NextIs(SyntaxKind.CloseAngle)) || 1478token.Kind == SyntaxKind.CloseAngle || 1479token.Kind == SyntaxKind.Whitespace || 1480token.Kind == SyntaxKind.NewLine; 1492ParseMarkupNodes(builder, ParseMode.Text, token => token.Kind == SyntaxKind.OpenAngle); 1606Debug.Assert(CurrentToken.Kind == SyntaxKind.Text && string.Equals(CurrentToken.Content, "cdata", StringComparison.OrdinalIgnoreCase)); 1672ParseMarkupNodes(htmlCommentBuilder, ParseMode.Text, t => t.Kind == SyntaxKind.DoubleHyphen); 1866ParseMarkupNodes(builder, ParseMode.Text, t => t.Kind == endSequence[0]); 1881if (EnsureCurrent() && (CurrentToken.Kind == SyntaxKind.Whitespace || CurrentToken.Kind == SyntaxKind.NewLine)) 1886while (EnsureCurrent() && (CurrentToken.Kind == SyntaxKind.Whitespace || CurrentToken.Kind == SyntaxKind.NewLine)) 1940else if (Lookahead(2)?.Kind == SyntaxKind.LeftBracket && 1943Lookahead(4)?.Kind == SyntaxKind.LeftBracket) 1998potentialBang.Kind == SyntaxKind.Bang) 2003afterBang.Kind == SyntaxKind.Text && 2037if (EndOfFile || CurrentToken.Kind != SyntaxKind.DoubleHyphen) 2052if (token.Kind == SyntaxKind.DoubleHyphen) 2069else if (NextIs(ns => ns.Kind == SyntaxKind.Bang && NextIs(SyntaxKind.CloseAngle))) 2076else if (token.Kind == SyntaxKind.OpenAngle) 2079if (NextIs(ns => ns.Kind == SyntaxKind.Bang && NextIs(SyntaxKind.DoubleHyphen))) 2122token.Kind == SyntaxKind.Text || 2123token.Kind == SyntaxKind.OpenAngle); 2266return token.Kind == SyntaxKind.Text && token.Content == "-"; 2280var tokenType = token.Kind; 2292return token.Kind == SyntaxKind.CloseAngle || 2293token.Kind == SyntaxKind.ForwardSlash || 2294token.Kind == SyntaxKind.OpenAngle || 2295token.Kind == SyntaxKind.SingleQuote || 2296token.Kind == SyntaxKind.DoubleQuote;
Language\Legacy\ImplicitExpressionEditHandler.cs (1)
196if (newToken.Kind == SyntaxKind.Identifier)
Language\Legacy\LanguageCharacteristics.cs (2)
85return token != null && (token.Kind == GetKnownTokenType(type)); 95right = CreateToken(token.Content.Substring(splitAt), token.Kind, token.GetDiagnostics());
Language\Legacy\TokenizerBackedParser.cs (29)
29return token.Kind == SyntaxKind.Whitespace; 34return IsSpacingToken(token) || token.Kind == SyntaxKind.NewLine; 39return IsSpacingToken(token) || token.Kind == SyntaxKind.CSharpComment; 44return IsSpacingTokenIncludingNewLines(token) || token.Kind is SyntaxKind.CSharpComment or SyntaxKind.CSharpDirective or SyntaxKind.CSharpDisabledText; 184Debug.Assert(!EndOfFile && CurrentToken.Kind == expectedType); 229result = (type == CurrentToken.Kind); 241return NextIs(token => token != null && types.Any(t => t == token.Kind)); 262return PreviousToken != null && PreviousToken.Kind == type; 267return !EndOfFile && CurrentToken != null && CurrentToken.Kind == type; 276token.Kind == SyntaxKind.Whitespace || (includeNewLines && token.Kind == SyntaxKind.NewLine), 440Debug.Assert(!EndOfFile && CurrentToken != null && kind == CurrentToken.Kind); 460AcceptWhile(static (token, type) => type == token.Kind, type); 466AcceptWhile(static (token, arg) => arg.type1 == token.Kind || arg.type2 == token.Kind, (type1, type2)); 471AcceptWhile(static (token, arg) => arg.type1 == token.Kind || arg.type2 == token.Kind || arg.type3 == token.Kind, (type1, type2, type3)); 476AcceptWhile(static (token, types) => types.Any(token.Kind, static (expected, kind) => expected == kind), types); 481AcceptWhile(static (token, type) => type != token.Kind, type); 487AcceptWhile(static (token, arg) => arg.type1 != token.Kind && arg.type2 != token.Kind, (type1, type2)); 492AcceptWhile(static (token, arg) => arg.type1 != token.Kind && arg.type2 != token.Kind && arg.type3 != token.Kind, (type1, type2, type3)); 497AcceptWhile(static (token, types) => types.All(token.Kind, static (expected, kind) => expected != kind), types); 526if (token.Kind == SyntaxKind.NewLine) 530else if (token.Kind != SyntaxKind.Whitespace) 548if (CurrentToken == null || CurrentToken.Kind != kind)
Language\Syntax\Generated\Syntax.xml.Internal.Generated.cs (101)
80=> new RazorDocumentSyntax(Kind, _document, _endOfFile, diagnostics); 160=> new RazorCommentBlockSyntax(Kind, _startCommentTransition, _startCommentStar, _comment, _endCommentStar, _endCommentTransition, diagnostics); 222=> new RazorMetaCodeSyntax(Kind, _metaCode, _chunkGenerator, _editHandler, diagnostics); 276=> new GenericBlockSyntax(Kind, _children, diagnostics); 338=> new UnclassifiedTextLiteralSyntax(Kind, _literalTokens, _chunkGenerator, _editHandler, diagnostics); 405=> new MarkupBlockSyntax(Kind, _children, diagnostics); 467=> new MarkupTransitionSyntax(Kind, _transitionTokens, _chunkGenerator, _editHandler, diagnostics); 529=> new MarkupTextLiteralSyntax(Kind, _literalTokens, _chunkGenerator, _editHandler, diagnostics); 591=> new MarkupEphemeralTextLiteralSyntax(Kind, _literalTokens, _chunkGenerator, _editHandler, diagnostics); 645=> new MarkupCommentBlockSyntax(Kind, _children, diagnostics); 710=> new MarkupMinimizedAttributeBlockSyntax(Kind, _namePrefix, _name, diagnostics); 834=> new MarkupAttributeBlockSyntax(Kind, _namePrefix, _name, _nameSuffix, _equalsToken, _valuePrefix, _value, _valueSuffix, diagnostics); 888=> new MarkupMiscAttributeContentSyntax(Kind, _children, diagnostics); 959=> new MarkupLiteralAttributeValueSyntax(Kind, _prefix, _value, diagnostics); 1024=> new MarkupDynamicAttributeValueSyntax(Kind, _prefix, _value, diagnostics); 1183=> new MarkupElementSyntax(Kind, _markupStartTag, _body, _markupEndTag, diagnostics); 1300=> new MarkupStartTagSyntax(Kind, _openAngle, _bang, _name, _attributes, _forwardSlash, _closeAngle, _isMarkupTransition, _chunkGenerator, _editHandler, diagnostics); 1411=> new MarkupEndTagSyntax(Kind, _openAngle, _forwardSlash, _bang, _name, _miscAttributeContent, _closeAngle, _isMarkupTransition, _chunkGenerator, _editHandler, diagnostics); 1499=> new MarkupTagHelperElementSyntax(Kind, _tagHelperStartTag, _body, _tagHelperEndTag, _tagHelperInfo, diagnostics); 1612=> new MarkupTagHelperStartTagSyntax(Kind, _openAngle, _bang, _name, _attributes, _forwardSlash, _closeAngle, _chunkGenerator, _editHandler, diagnostics); 1719=> new MarkupTagHelperEndTagSyntax(Kind, _openAngle, _forwardSlash, _bang, _name, _miscAttributeContent, _closeAngle, _chunkGenerator, _editHandler, diagnostics); 1841=> new MarkupTagHelperAttributeSyntax(Kind, _namePrefix, _name, _nameSuffix, _equalsToken, _valuePrefix, _value, _valueSuffix, _tagHelperAttributeInfo, diagnostics); 1910=> new MarkupMinimizedTagHelperAttributeSyntax(Kind, _namePrefix, _name, _tagHelperAttributeInfo, diagnostics); 1964=> new MarkupTagHelperAttributeValueSyntax(Kind, _children, diagnostics); 2119=> new MarkupTagHelperDirectiveAttributeSyntax(Kind, _namePrefix, _transition, _name, _colon, _parameterName, _nameSuffix, _equalsToken, _valuePrefix, _value, _valueSuffix, _tagHelperAttributeInfo, diagnostics); 2221=> new MarkupMinimizedTagHelperDirectiveAttributeSyntax(Kind, _namePrefix, _transition, _name, _colon, _parameterName, _tagHelperAttributeInfo, diagnostics); 2288=> new CSharpCodeBlockSyntax(Kind, _children, diagnostics); 2344=> new CSharpTransitionSyntax(Kind, _transition, _chunkGenerator, _editHandler, diagnostics); 2406=> new CSharpStatementLiteralSyntax(Kind, _literalTokens, _chunkGenerator, _editHandler, diagnostics); 2468=> new CSharpExpressionLiteralSyntax(Kind, _literalTokens, _chunkGenerator, _editHandler, diagnostics); 2530=> new CSharpEphemeralTextLiteralSyntax(Kind, _literalTokens, _chunkGenerator, _editHandler, diagnostics); 2584=> new CSharpTemplateBlockSyntax(Kind, _children, diagnostics); 2660=> new CSharpStatementSyntax(Kind, _transition, _body, diagnostics); 2726=> new CSharpStatementBodySyntax(Kind, _openBrace, _csharpCode, _closeBrace, diagnostics); 2785=> new CSharpExplicitExpressionSyntax(Kind, _transition, _body, diagnostics); 2851=> new CSharpExplicitExpressionBodySyntax(Kind, _openParen, _csharpCode, _closeParen, diagnostics); 2910=> new CSharpImplicitExpressionSyntax(Kind, _transition, _body, diagnostics); 2958=> new CSharpImplicitExpressionBodySyntax(Kind, _csharpCode, diagnostics); 3034=> new RazorDirectiveSyntax(Kind, _transition, _body, _directiveDescriptor, diagnostics); 3097=> new RazorUsingDirectiveSyntax(Kind, _transition, _body, _directiveDescriptor, diagnostics); 3162=> new RazorDirectiveBodySyntax(Kind, _keyword, _csharpCode, diagnostics); 3387if (endOfFile.Kind != SyntaxKind.EndOfFile) 3388ThrowHelper.ThrowArgumentException(nameof(endOfFile), $"Invalid SyntaxKind. Expected 'SyntaxKind.EndOfFile', but it was {endOfFile.Kind}"); 3398if (startCommentTransition.Kind != SyntaxKind.RazorCommentTransition) 3399ThrowHelper.ThrowArgumentException(nameof(startCommentTransition), $"Invalid SyntaxKind. Expected 'SyntaxKind.RazorCommentTransition', but it was {startCommentTransition.Kind}"); 3401if (startCommentStar.Kind != SyntaxKind.RazorCommentStar) 3402ThrowHelper.ThrowArgumentException(nameof(startCommentStar), $"Invalid SyntaxKind. Expected 'SyntaxKind.RazorCommentStar', but it was {startCommentStar.Kind}"); 3404if (comment.Kind != SyntaxKind.RazorCommentLiteral) 3405ThrowHelper.ThrowArgumentException(nameof(comment), $"Invalid SyntaxKind. Expected 'SyntaxKind.RazorCommentLiteral', but it was {comment.Kind}"); 3407if (endCommentStar.Kind != SyntaxKind.RazorCommentStar) 3408ThrowHelper.ThrowArgumentException(nameof(endCommentStar), $"Invalid SyntaxKind. Expected 'SyntaxKind.RazorCommentStar', but it was {endCommentStar.Kind}"); 3410if (endCommentTransition.Kind != SyntaxKind.RazorCommentTransition) 3411ThrowHelper.ThrowArgumentException(nameof(endCommentTransition), $"Invalid SyntaxKind. Expected 'SyntaxKind.RazorCommentTransition', but it was {endCommentTransition.Kind}"); 3485if (equalsToken.Kind != SyntaxKind.Equals) 3486ThrowHelper.ThrowArgumentException(nameof(equalsToken), $"Invalid SyntaxKind. Expected 'SyntaxKind.Equals', but it was {equalsToken.Kind}"); 3524if (openAngle.Kind != SyntaxKind.OpenAngle) 3525ThrowHelper.ThrowArgumentException(nameof(openAngle), $"Invalid SyntaxKind. Expected 'SyntaxKind.OpenAngle', but it was {openAngle.Kind}"); 3526if (bang is not null && bang.Kind is not (SyntaxKind.Bang or SyntaxKind.None)) 3527ThrowHelper.ThrowArgumentException(nameof(bang), $"Invalid SyntaxKind. Expected 'SyntaxKind.Bang' or 'SyntaxKind.None', but it was {bang.Kind}"); 3529if (name.Kind != SyntaxKind.Text) 3530ThrowHelper.ThrowArgumentException(nameof(name), $"Invalid SyntaxKind. Expected 'SyntaxKind.Text', but it was {name.Kind}"); 3531if (forwardSlash is not null && forwardSlash.Kind is not (SyntaxKind.ForwardSlash or SyntaxKind.None)) 3532ThrowHelper.ThrowArgumentException(nameof(forwardSlash), $"Invalid SyntaxKind. Expected 'SyntaxKind.ForwardSlash' or 'SyntaxKind.None', but it was {forwardSlash.Kind}"); 3534if (closeAngle.Kind != SyntaxKind.CloseAngle) 3535ThrowHelper.ThrowArgumentException(nameof(closeAngle), $"Invalid SyntaxKind. Expected 'SyntaxKind.CloseAngle', but it was {closeAngle.Kind}"); 3543if (openAngle.Kind != SyntaxKind.OpenAngle) 3544ThrowHelper.ThrowArgumentException(nameof(openAngle), $"Invalid SyntaxKind. Expected 'SyntaxKind.OpenAngle', but it was {openAngle.Kind}"); 3546if (forwardSlash.Kind != SyntaxKind.ForwardSlash) 3547ThrowHelper.ThrowArgumentException(nameof(forwardSlash), $"Invalid SyntaxKind. Expected 'SyntaxKind.ForwardSlash', but it was {forwardSlash.Kind}"); 3548if (bang is not null && bang.Kind is not (SyntaxKind.Bang or SyntaxKind.None)) 3549ThrowHelper.ThrowArgumentException(nameof(bang), $"Invalid SyntaxKind. Expected 'SyntaxKind.Bang' or 'SyntaxKind.None', but it was {bang.Kind}"); 3551if (name.Kind != SyntaxKind.Text) 3552ThrowHelper.ThrowArgumentException(nameof(name), $"Invalid SyntaxKind. Expected 'SyntaxKind.Text', but it was {name.Kind}"); 3554if (closeAngle.Kind != SyntaxKind.CloseAngle) 3555ThrowHelper.ThrowArgumentException(nameof(closeAngle), $"Invalid SyntaxKind. Expected 'SyntaxKind.CloseAngle', but it was {closeAngle.Kind}"); 3568if (openAngle.Kind != SyntaxKind.OpenAngle) 3569ThrowHelper.ThrowArgumentException(nameof(openAngle), $"Invalid SyntaxKind. Expected 'SyntaxKind.OpenAngle', but it was {openAngle.Kind}"); 3570if (bang is not null && bang.Kind is not (SyntaxKind.Bang or SyntaxKind.None)) 3571ThrowHelper.ThrowArgumentException(nameof(bang), $"Invalid SyntaxKind. Expected 'SyntaxKind.Bang' or 'SyntaxKind.None', but it was {bang.Kind}"); 3573if (name.Kind != SyntaxKind.Text) 3574ThrowHelper.ThrowArgumentException(nameof(name), $"Invalid SyntaxKind. Expected 'SyntaxKind.Text', but it was {name.Kind}"); 3575if (forwardSlash is not null && forwardSlash.Kind is not (SyntaxKind.ForwardSlash or SyntaxKind.None)) 3576ThrowHelper.ThrowArgumentException(nameof(forwardSlash), $"Invalid SyntaxKind. Expected 'SyntaxKind.ForwardSlash' or 'SyntaxKind.None', but it was {forwardSlash.Kind}"); 3578if (closeAngle.Kind != SyntaxKind.CloseAngle) 3579ThrowHelper.ThrowArgumentException(nameof(closeAngle), $"Invalid SyntaxKind. Expected 'SyntaxKind.CloseAngle', but it was {closeAngle.Kind}"); 3587if (openAngle.Kind != SyntaxKind.OpenAngle) 3588ThrowHelper.ThrowArgumentException(nameof(openAngle), $"Invalid SyntaxKind. Expected 'SyntaxKind.OpenAngle', but it was {openAngle.Kind}"); 3590if (forwardSlash.Kind != SyntaxKind.ForwardSlash) 3591ThrowHelper.ThrowArgumentException(nameof(forwardSlash), $"Invalid SyntaxKind. Expected 'SyntaxKind.ForwardSlash', but it was {forwardSlash.Kind}"); 3592if (bang is not null && bang.Kind is not (SyntaxKind.Bang or SyntaxKind.None)) 3593ThrowHelper.ThrowArgumentException(nameof(bang), $"Invalid SyntaxKind. Expected 'SyntaxKind.Bang' or 'SyntaxKind.None', but it was {bang.Kind}"); 3595if (name.Kind != SyntaxKind.Text) 3596ThrowHelper.ThrowArgumentException(nameof(name), $"Invalid SyntaxKind. Expected 'SyntaxKind.Text', but it was {name.Kind}"); 3598if (closeAngle.Kind != SyntaxKind.CloseAngle) 3599ThrowHelper.ThrowArgumentException(nameof(closeAngle), $"Invalid SyntaxKind. Expected 'SyntaxKind.CloseAngle', but it was {closeAngle.Kind}"); 3608if (equalsToken.Kind != SyntaxKind.Equals) 3609ThrowHelper.ThrowArgumentException(nameof(equalsToken), $"Invalid SyntaxKind. Expected 'SyntaxKind.Equals', but it was {equalsToken.Kind}"); 3636if (equalsToken.Kind != SyntaxKind.Equals) 3637ThrowHelper.ThrowArgumentException(nameof(equalsToken), $"Invalid SyntaxKind. Expected 'SyntaxKind.Equals', but it was {equalsToken.Kind}"); 3661if (transition.Kind != SyntaxKind.Transition) 3662ThrowHelper.ThrowArgumentException(nameof(transition), $"Invalid SyntaxKind. Expected 'SyntaxKind.Transition', but it was {transition.Kind}");
Language\Syntax\GreenNode.cs (5)
179=> $"{GetType().Name}<{Kind}>"; 247if (node1.Kind != node2.Kind) 262if (node1.Kind != node2.Kind)
Language\Syntax\InternalSyntax\SyntaxListBuilder.cs (1)
158if (_nodes[i].Value.Kind == kind)
Language\Syntax\InternalSyntax\SyntaxListOfT.cs (1)
81if ((element.Kind == kind))
Language\Syntax\InternalSyntax\SyntaxToken.cs (1)
30return new SyntaxToken(Kind, Content, diagnostics);
Language\Syntax\InternalSyntax\SyntaxTokenCache.cs (1)
31if (token != null && token.Kind == kind && token.Content == content)
Language\Syntax\SyntaxNode.cs (1)
23public SyntaxKind Kind => Green.Kind;
Language\Syntax\SyntaxNodeOrToken.cs (1)
58public SyntaxKind Kind => _token?.Kind ?? _nodeOrParent?.Kind ?? 0;
Language\Syntax\SyntaxToken.cs (1)
50public SyntaxKind Kind => Node?.Kind ?? 0;