SyntaxFacts Class
Answers questions about TOML kinds that do not need a tree.
public static class SyntaxFactsMethods
| Name | Description |
|---|---|
| GetText(SyntaxKind) | Gets the text a kind is always spelled with, or an empty string when it varies. |
| GetValueKind(SyntaxKind) | Gets the kind of the value node that wraps a token, or SyntaxKind.None when no value node does. |
| IsAnyToken(SyntaxKind) | |
| IsBareKey(string) | Determines whether text can be written as a key without quotes. |
| IsDateTimeToken(SyntaxKind) | Determines whether a kind is one of the tokens that spell a date, a time, or both. |
| IsEntry(SyntaxKind) | |
| IsKeyToken(SyntaxKind) | Determines whether a kind is one of the tokens a key can be made of. |
| IsPunctuation(SyntaxKind) | |
| IsStringToken(SyntaxKind) | Determines whether a kind is one of the tokens that spell a string. |
| IsTrivia(SyntaxKind) | |
| IsValue(SyntaxKind) | Determines whether a kind is one of the nodes that can appear where a value is expected. |
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)GetValueKind(SyntaxKind)
SyntaxFacts.csGets the kind of the value node that wraps a token, or SyntaxKind.None when no value node does.
public static SyntaxKind GetValueKind(SyntaxKind tokenKind)IsAnyToken(SyntaxKind)
SyntaxFacts.cspublic static bool IsAnyToken(SyntaxKind kind)No documentation is available.
IsBareKey(string)
SyntaxFacts.csDetermines whether text can be written as a key without quotes.
IsDateTimeToken(SyntaxKind)
SyntaxFacts.csDetermines whether a kind is one of the tokens that spell a date, a time, or both.
public static bool IsDateTimeToken(SyntaxKind kind)IsEntry(SyntaxKind)
SyntaxFacts.cspublic static bool IsEntry(SyntaxKind kind)No documentation is available.
IsKeyToken(SyntaxKind)
SyntaxFacts.csDetermines whether a kind is one of the tokens a key can be made of.
public static bool IsKeyToken(SyntaxKind kind)IsPunctuation(SyntaxKind)
SyntaxFacts.cspublic static bool IsPunctuation(SyntaxKind kind)No documentation is available.
IsStringToken(SyntaxKind)
SyntaxFacts.csDetermines whether a kind is one of the tokens that spell a string.
public static bool IsStringToken(SyntaxKind kind)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)