Class SyntaxFacts
A static class containing facts about Lua's Syntax.
Inheritance
System.Object
SyntaxFacts
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Loretta.CodeAnalysis.Lua.dll
Syntax
public static class SyntaxFacts
Properties
|
Improve this Doc
View Source
EqualityComparer
Declaration
public static IEqualityComparer<SyntaxKind> EqualityComparer { get; }
Property Value
Methods
|
Improve this Doc
View Source
GetBinaryExpression(SyntaxKind)
Returns the expression kind for a given unary operator or None if not a unary operator.
Declaration
public static Option<SyntaxKind> GetBinaryExpression(SyntaxKind kind)
Parameters
Returns
Type |
Description |
Tsu.Option<SyntaxKind> |
A positive number indicating the binary operator precedence or 0 if the kind is not a binary operator.
|
|
Improve this Doc
View Source
GetBinaryExpressionKinds()
Returns all SyntaxKinds that are in the BinaryExpression category.
Declaration
public static IEnumerable<SyntaxKind> GetBinaryExpressionKinds()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<SyntaxKind> |
|
|
Improve this Doc
View Source
GetBinaryOperatorKinds()
Returns all SyntaxKinds that can be considered binary operators.
Declaration
public static IEnumerable<SyntaxKind> GetBinaryOperatorKinds()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<SyntaxKind> |
|
|
Improve this Doc
View Source
GetBinaryOperatorPrecedence(SyntaxKind)
Returns the precedence for a given binary operator. Returns 0 if kind is not a binary operator.
Declaration
public static int GetBinaryOperatorPrecedence(SyntaxKind kind)
Parameters
Returns
Type |
Description |
System.Int32 |
A positive number indicating the binary operator precedence or 0 if the kind is not a binary operator.
|
|
Improve this Doc
View Source
GetCompoundAssignmentOperator(SyntaxKind)
Declaration
public static Option<SyntaxKind> GetCompoundAssignmentOperator(SyntaxKind kind)
Parameters
Returns
|
Improve this Doc
View Source
GetCompoundAssignmentOperatorTokenKinds()
Returns all SyntaxKinds that are in the CompoundAssignmentOperatorToken category.
Declaration
public static IEnumerable<SyntaxKind> GetCompoundAssignmentOperatorTokenKinds()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<SyntaxKind> |
|
|
Improve this Doc
View Source
GetCompoundAssignmentStatement(SyntaxKind)
Declaration
public static Option<SyntaxKind> GetCompoundAssignmentStatement(SyntaxKind kind)
Parameters
Returns
|
Improve this Doc
View Source
GetCompoundAssignmentStatementKinds()
Returns all SyntaxKinds that are in the CompoundAssignmentStatement category.
Declaration
public static IEnumerable<SyntaxKind> GetCompoundAssignmentStatementKinds()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<SyntaxKind> |
|
|
Improve this Doc
View Source
GetConstantValue(SyntaxKind)
Obtains the constant value of the token kind.
Declaration
public static Option<object> GetConstantValue(SyntaxKind kind)
Parameters
Returns
Type |
Description |
Tsu.Option<System.Object> |
|
|
Improve this Doc
View Source
GetFunctionExpressionOrDeclarationKinds()
Returns all SyntaxKinds that are in the FunctionExpressionOrDeclaration category.
Declaration
public static IEnumerable<SyntaxKind> GetFunctionExpressionOrDeclarationKinds()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<SyntaxKind> |
|
|
Improve this Doc
View Source
GetKeywordKind(ReadOnlySpan<Char>)
Declaration
public static SyntaxKind GetKeywordKind(ReadOnlySpan<char> span)
Parameters
Type |
Name |
Description |
System.ReadOnlySpan<System.Char> |
span |
|
Returns
|
Improve this Doc
View Source
GetKeywordKind(String)
Declaration
public static SyntaxKind GetKeywordKind(string text)
Parameters
Type |
Name |
Description |
System.String |
text |
|
Returns
|
Improve this Doc
View Source
GetLiteralExpression(SyntaxKind)
Declaration
public static Option<SyntaxKind> GetLiteralExpression(SyntaxKind kind)
Parameters
Returns
|
Improve this Doc
View Source
GetLiteralTokenKinds()
Returns all SyntaxKinds that are in the LiteralToken category.
Declaration
public static IEnumerable<SyntaxKind> GetLiteralTokenKinds()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<SyntaxKind> |
|
|
Improve this Doc
View Source
GetOperatorTokenKind(SyntaxKind)
Declaration
public static Option<SyntaxKind> GetOperatorTokenKind(SyntaxKind kind)
Parameters
Returns
|
Improve this Doc
View Source
GetText(SyntaxKind)
Gets the predefined text that corresponds to the provided syntax kind.
Declaration
public static string GetText(SyntaxKind kind)
Parameters
Type |
Name |
Description |
SyntaxKind |
kind |
The kind to obtain the text for.
|
Returns
Type |
Description |
System.String |
The text corresponding to the provided kind or System.String.Empty if none.
|
|
Improve this Doc
View Source
GetUnaryExpression(SyntaxKind)
Returns the expression kind for a given unary operator or None if not a unary operator.
Declaration
public static Option<SyntaxKind> GetUnaryExpression(SyntaxKind kind)
Parameters
Returns
Type |
Description |
Tsu.Option<SyntaxKind> |
A positive number indicating the binary operator precedence or 0 if the kind is not a binary operator.
|
|
Improve this Doc
View Source
GetUnaryExpressionKinds()
Returns all SyntaxKinds that are in the UnaryExpression category.
Declaration
public static IEnumerable<SyntaxKind> GetUnaryExpressionKinds()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<SyntaxKind> |
|
|
Improve this Doc
View Source
GetUnaryOperatorKinds()
Returns all SyntaxKinds that can be considered unary operators.
Declaration
public static IEnumerable<SyntaxKind> GetUnaryOperatorKinds()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<SyntaxKind> |
|
|
Improve this Doc
View Source
GetUnaryOperatorPrecedence(SyntaxKind)
Returns the precedence for a given unary operator or 0 if not a unary operator.
Declaration
public static int GetUnaryOperatorPrecedence(SyntaxKind kind)
Parameters
Returns
Type |
Description |
System.Int32 |
A positive number indicating the binary operator precedence or 0 if the kind is not a binary operator.
|
|
Improve this Doc
View Source
GetVariableExpressionKinds()
Returns all SyntaxKinds that are in the VariableExpression category.
Declaration
public static IEnumerable<SyntaxKind> GetVariableExpressionKinds()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<SyntaxKind> |
|
|
Improve this Doc
View Source
IsBinaryExpression(SyntaxKind)
Checks whether the provided SyntaxKind is a binaryexpression's.
Declaration
public static bool IsBinaryExpression(SyntaxKind kind)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsBinaryOperatorToken(SyntaxKind)
Checks whether the provided SyntaxKind is a binaryoperatortoken's.
Declaration
public static bool IsBinaryOperatorToken(SyntaxKind kind)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
Declaration
public static bool IsComment(SyntaxKind kind)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsCompoundAssignmentOperatorToken(SyntaxKind)
Checks whether the provided SyntaxKind is a compoundassignmentoperatortoken's.
Declaration
public static bool IsCompoundAssignmentOperatorToken(SyntaxKind kind)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsCompoundAssignmentStatement(SyntaxKind)
Checks whether the provided SyntaxKind is a compoundassignmentstatement's.
Declaration
public static bool IsCompoundAssignmentStatement(SyntaxKind kind)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsContextualKeyword(SyntaxKind, LuaSyntaxOptions)
Checks whether a given kind is a contextual keyword.
Declaration
public static bool IsContextualKeyword(SyntaxKind kind, LuaSyntaxOptions syntaxOptions)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsFunctionExpressionOrDeclaration(SyntaxKind)
Checks whether the provided SyntaxKind is a functionexpressionordeclaration's.
Declaration
public static bool IsFunctionExpressionOrDeclaration(SyntaxKind kind)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsKeyword(SyntaxKind)
Checks whether the provided SyntaxKind is a keyword's.
Declaration
public static bool IsKeyword(SyntaxKind kind)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsLiteralToken(SyntaxKind)
Checks whether the provided SyntaxKind is a literaltoken's.
Declaration
public static bool IsLiteralToken(SyntaxKind kind)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsOperatorToken(SyntaxKind)
Checks whether the provided SyntaxKind is a operatortoken's.
Declaration
public static bool IsOperatorToken(SyntaxKind kind)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsReservedKeyword(SyntaxKind, LuaSyntaxOptions)
Checks whether a given kind is a reserved keyword.
Declaration
public static bool IsReservedKeyword(SyntaxKind actual, LuaSyntaxOptions syntaxOptions)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsRightAssociative(SyntaxKind)
Checks whether a given SyntaxKind is a right associative operator's.
Declaration
public static bool IsRightAssociative(SyntaxKind kind)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsToken(SyntaxKind)
Checks whether the provided SyntaxKind is a token's.
Declaration
public static bool IsToken(SyntaxKind kind)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsTrivia(SyntaxKind)
Checks whether the provided SyntaxKind is a trivia's.
Declaration
public static bool IsTrivia(SyntaxKind kind)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsUnaryExpression(SyntaxKind)
Checks whether the provided SyntaxKind is a unaryexpression's.
Declaration
public static bool IsUnaryExpression(SyntaxKind kind)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsUnaryOperatorToken(SyntaxKind)
Checks whether the provided SyntaxKind is a unaryoperatortoken's.
Declaration
public static bool IsUnaryOperatorToken(SyntaxKind kind)
Parameters
Returns
Type |
Description |
System.Boolean |
|
|
Improve this Doc
View Source
IsVariableExpression(SyntaxKind)
Checks whether the provided SyntaxKind is a variableexpression's.
Declaration
public static bool IsVariableExpression(SyntaxKind kind)
Parameters
Returns
Type |
Description |
System.Boolean |
|