Class SyntaxFacts
Inheritance
System.Object
SyntaxFacts
Assembly: DotLang.dll
Syntax
public static class SyntaxFacts
Methods
|
Improve this Doc
View Source
GetKind(String)
Returns a SyntaxKind for text that can be parsed or None
if text
cannot be parsed.
Declaration
public static SyntaxKind GetKind(string text)
Parameters
Type |
Name |
Description |
System.String |
text |
|
Returns
|
Improve this Doc
View Source
GetText(SyntaxKind)
Returns a text representation of a SyntaxKind for kinds that
have a static representation (character literal tokens and keywords), or
an empty string for kinds that cannot be statically represented.
Declaration
public static string GetText(this SyntaxKind kind)
Parameters
Returns
Type |
Description |
System.String |
|
|
Improve this Doc
View Source
IsEdge(SyntaxKind)
Declaration
public static bool IsEdge(this SyntaxKind kind)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsEdge(SyntaxToken)
Declaration
public static bool IsEdge(this SyntaxToken token)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsIdentifier(SyntaxKind)
Declaration
public static bool IsIdentifier(this SyntaxKind kind)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsIdentifier(SyntaxToken)
Declaration
public static bool IsIdentifier(this SyntaxToken token)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsIdentifierChar(Char, Boolean)
Determines if a character is a valid identifier character for
an IdentifierToken.
Declaration
public static bool IsIdentifierChar(char c, bool firstChar)
Parameters
Type |
Name |
Description |
System.Char |
c |
The character to validate.
|
System.Boolean |
firstChar |
Whether or not c is the first character
in the potential IdentifierToken.
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsTerminalDelimiterChar(Char)
Determines if c
is a suitable terminal delimeter
such that no explicit ;
needs to be inserte dbetween tokens.
Declaration
public static bool IsTerminalDelimiterChar(char c)
Parameters
Type |
Name |
Description |
System.Char |
c |
|
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsTrivia(SyntaxKind)
Declaration
public static bool IsTrivia(this SyntaxKind kind)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsTrivia(SyntaxToken)
Declaration
public static bool IsTrivia(this SyntaxToken token)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsValid(SyntaxKind)
Declaration
public static bool IsValid(this SyntaxKind kind)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsValid(SyntaxToken)
Declaration
public static bool IsValid(this SyntaxToken token)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
ToIdentifierToken(String)
Declaration
public static SyntaxToken ToIdentifierToken(string id)
Parameters
Type |
Name |
Description |
System.String |
id |
|
Returns