SyntaxFacts Class
Answers questions about JSON kinds that do not need a tree.
public static class SyntaxFactsMethods
| Name | Description |
|---|---|
| GetKeywordKind(string) | Gets the keyword text spells, or SyntaxKind.None when it spells none. |
| GetLiteralExpression(SyntaxKind) | Gets the node kind that wraps a keyword token. |
| GetText(SyntaxKind) | Gets the text a kind is always spelled with, or an empty string when it varies. |
| IsAnyToken(SyntaxKind) | |
| IsKeyword(SyntaxKind) | |
| IsLiteralExpression(SyntaxKind) | |
| IsPunctuation(SyntaxKind) | |
| IsTrivia(SyntaxKind) | |
| IsValue(SyntaxKind) | Determines whether a kind is one of the nodes that can appear where a value is expected. |
GetKeywordKind(string)
SyntaxFacts.csGets the keyword text spells, or SyntaxKind.None when it spells none.
public static SyntaxKind GetKeywordKind(string text)GetLiteralExpression(SyntaxKind)
SyntaxFacts.csGets the node kind that wraps a keyword token.
public static SyntaxKind GetLiteralExpression(SyntaxKind tokenKind)GetText(SyntaxKind)
SyntaxFacts.csGets the text a kind is always spelled with, or an empty string when it varies.
public static string GetText(SyntaxKind kind)IsAnyToken(SyntaxKind)
SyntaxFacts.cspublic static bool IsAnyToken(SyntaxKind kind)No documentation is available.
IsKeyword(SyntaxKind)
SyntaxFacts.cspublic static bool IsKeyword(SyntaxKind kind)No documentation is available.
IsLiteralExpression(SyntaxKind)
SyntaxFacts.cspublic static bool IsLiteralExpression(SyntaxKind kind)No documentation is available.
IsPunctuation(SyntaxKind)
SyntaxFacts.cspublic static bool IsPunctuation(SyntaxKind kind)No documentation is available.
IsTrivia(SyntaxKind)
SyntaxFacts.cspublic static bool IsTrivia(SyntaxKind kind)No documentation is available.
IsValue(SyntaxKind)
SyntaxFacts.csDetermines whether a kind is one of the nodes that can appear where a value is expected.
public static bool IsValue(SyntaxKind kind)