27 references to TryAccept
Microsoft.CodeAnalysis.Razor.Compiler (27)
Language\Legacy\CSharpCodeParser.cs (25)
1145
TryAccept
(SyntaxKind.RightBrace);
1725
TryAccept
(SyntaxKind.RightBracket);
1833
TryAccept
(SyntaxKind.Semicolon);
2065
if (!
TryAccept
(SyntaxKind.RightBrace))
2211
TryAccept
(SyntaxKind.RightParenthesis);
2293
TryAccept
(SyntaxKind.Colon);
2464
if (TryParseCondition(builder) &&
TryAccept
(SyntaxKind.Semicolon))
2624
hasExplicitSemicolon =
TryAccept
(SyntaxKind.Semicolon);
2666
if (
TryAccept
(SyntaxKind.LeftParenthesis))
2668
while (!
TryAccept
(SyntaxKind.RightParenthesis) && !EndOfFile)
2670
TryAccept
(SyntaxKind.Whitespace);
2677
TryAccept
(SyntaxKind.Whitespace);
2678
TryAccept
(SyntaxKind.Identifier);
2679
TryAccept
(SyntaxKind.Whitespace);
2680
TryAccept
(SyntaxKind.Comma);
2689
TryAccept
(SyntaxKind.QuestionMark); // Nullable
2693
else if (
TryAccept
(SyntaxKind.Identifier) ||
TryAccept
(SyntaxKind.Keyword))
2695
if (
TryAccept
(SyntaxKind.DoubleColon))
2697
if (!
TryAccept
(SyntaxKind.Identifier))
2699
TryAccept
(SyntaxKind.Keyword);
2706
if (
TryAccept
(SyntaxKind.Dot))
2717
TryAccept
(SyntaxKind.QuestionMark); // Nullable
2728
if (!
TryAccept
(SyntaxKind.RightBracket))
2745
if (!
TryAccept
(SyntaxKind.GreaterThan))
Language\Legacy\HtmlMarkupParser.cs (2)
381
TryAccept
(SyntaxKind.NewLine);
1331
TryAccept
(quote);