Class SyntaxFactory
A class containing factory methods for constructing syntax nodes, tokens and trivia.
Inheritance
System.Object
SyntaxFactory
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: cs.temp.dll.dll
Syntax
public static class SyntaxFactory
Properties
CarriageReturn
A trivia with kind EndOfLineTrivia containing a single carriage return character.
Declaration
public static SyntaxTrivia CarriageReturn { get; }
Property Value
CarriageReturnLineFeed
A trivia with kind EndOfLineTrivia containing both the carriage return and line feed characters.
Declaration
public static SyntaxTrivia CarriageReturnLineFeed { get; }
Property Value
ElasticCarriageReturn
An elastic trivia with kind EndOfLineTrivia containing a single carriage return character. Elastic trivia
are used to denote trivia that was not produced by parsing source text, and are usually not preserved during
formatting.
Declaration
public static SyntaxTrivia ElasticCarriageReturn { get; }
Property Value
ElasticCarriageReturnLineFeed
An elastic trivia with kind EndOfLineTrivia containing both the carriage return and line feed characters.
Elastic trivia are used to denote trivia that was not produced by parsing source text, and are usually not
preserved during formatting.
Declaration
public static SyntaxTrivia ElasticCarriageReturnLineFeed { get; }
Property Value
ElasticLineFeed
An elastic trivia with kind EndOfLineTrivia containing a single line feed character. Elastic trivia are used
to denote trivia that was not produced by parsing source text, and are usually not preserved during
formatting.
Declaration
public static SyntaxTrivia ElasticLineFeed { get; }
Property Value
ElasticMarker
An elastic trivia with kind WhitespaceTrivia containing no characters. Elastic marker trivia are included
automatically by factory methods when trivia is not specified. Syntax formatting will replace elastic
markers with appropriate trivia.
Declaration
public static SyntaxTrivia ElasticMarker { get; }
Property Value
ElasticSpace
An elastic trivia with kind WhitespaceTrivia containing a single space character. Elastic trivia are used to
denote trivia that was not produced by parsing source text, and are usually not preserved during formatting.
Declaration
public static SyntaxTrivia ElasticSpace { get; }
Property Value
ElasticTab
An elastic trivia with kind WhitespaceTrivia containing a single tab character. Elastic trivia are used to
denote trivia that was not produced by parsing source text, and are usually not preserved during formatting.
Declaration
public static SyntaxTrivia ElasticTab { get; }
Property Value
LineFeed
A trivia with kind EndOfLineTrivia containing a single line feed character.
Declaration
public static SyntaxTrivia LineFeed { get; }
Property Value
Space
A trivia with kind WhitespaceTrivia containing a single space character.
Declaration
public static SyntaxTrivia Space { get; }
Property Value
Tab
A trivia with kind WhitespaceTrivia containing a single tab character.
Declaration
public static SyntaxTrivia Tab { get; }
Property Value
Methods
AnonymousFunctionExpression(ParameterListSyntax, StatementListSyntax)
Creates a new AnonymousFunctionExpressionSyntax instance.
Declaration
public static AnonymousFunctionExpressionSyntax AnonymousFunctionExpression(ParameterListSyntax parameters, StatementListSyntax body)
Parameters
Returns
AnonymousFunctionExpression(TypeParameterListSyntax, ParameterListSyntax, TypeBindingSyntax, StatementListSyntax)
Creates a new AnonymousFunctionExpressionSyntax instance.
Declaration
public static AnonymousFunctionExpressionSyntax AnonymousFunctionExpression(TypeParameterListSyntax typeParameterList, ParameterListSyntax parameters, TypeBindingSyntax typeBinding, StatementListSyntax body)
Parameters
Returns
AnonymousFunctionExpression(SyntaxToken, TypeParameterListSyntax, ParameterListSyntax, TypeBindingSyntax, StatementListSyntax, SyntaxToken)
Declaration
public static AnonymousFunctionExpressionSyntax AnonymousFunctionExpression(SyntaxToken functionKeyword, TypeParameterListSyntax typeParameterList, ParameterListSyntax parameters, TypeBindingSyntax typeBinding, StatementListSyntax body, SyntaxToken endKeyword)
Parameters
Returns
AreEquivalent(SyntaxNode, SyntaxNode, Boolean)
Determines if two syntax nodes are the same, disregarding trivia differences.
Declaration
public static bool AreEquivalent(SyntaxNode oldNode, SyntaxNode newNode, bool topLevel)
Parameters
Type |
Name |
Description |
SyntaxNode |
oldNode |
The old node.
|
SyntaxNode |
newNode |
The new node.
|
System.Boolean |
topLevel |
If true then the nodes are equivalent if the contained nodes and tokens declaring
metadata visible symbolic information are equivalent, ignoring any differences of nodes inside method bodies
or initializer expressions, otherwise all nodes and tokens must be equivalent.
|
Returns
Type |
Description |
System.Boolean |
|
AreEquivalent(SyntaxNode, SyntaxNode, Nullable<Func<SyntaxKind, Boolean>>)
Determines if two syntax nodes are the same, disregarding trivia differences.
Declaration
public static bool AreEquivalent(SyntaxNode oldNode, SyntaxNode newNode, Func<SyntaxKind, bool>? ignoreChildNode = null)
Parameters
Type |
Name |
Description |
SyntaxNode |
oldNode |
The old node.
|
SyntaxNode |
newNode |
The new node.
|
System.Nullable<Func<SyntaxKind, System.Boolean>> |
ignoreChildNode |
If specified called for every child syntax node (not token) that is visited during the comparison.
If it returns true the child is recursively visited, otherwise the child and its subtree is disregarded.
|
Returns
Type |
Description |
System.Boolean |
|
AreEquivalent(SyntaxToken, SyntaxToken)
Determines if two syntax tokens are the same, disregarding trivia differences.
Declaration
public static bool AreEquivalent(SyntaxToken oldToken, SyntaxToken newToken)
Parameters
Returns
Type |
Description |
System.Boolean |
|
AreEquivalent(SyntaxTokenList, SyntaxTokenList)
Determines if two lists of tokens are the same, disregarding trivia differences.
Declaration
public static bool AreEquivalent(SyntaxTokenList oldList, SyntaxTokenList newList)
Parameters
Returns
Type |
Description |
System.Boolean |
|
AreEquivalent(SyntaxTree, SyntaxTree, Boolean)
Determines if two trees are the same, disregarding trivia differences.
Declaration
public static bool AreEquivalent(SyntaxTree oldTree, SyntaxTree newTree, bool topLevel)
Parameters
Type |
Name |
Description |
SyntaxTree |
oldTree |
The original tree.
|
SyntaxTree |
newTree |
The new tree.
|
System.Boolean |
topLevel |
If true then the trees are equivalent if the contained nodes and tokens declaring
metadata visible symbolic information are equivalent, ignoring any differences of nodes inside method bodies
or initializer expressions, otherwise all nodes and tokens must be equivalent.
|
Returns
Type |
Description |
System.Boolean |
|
AreEquivalent<TNode>(SeparatedSyntaxList<TNode>, SeparatedSyntaxList<TNode>, Boolean)
Determines if two lists of syntax nodes are the same, disregarding trivia differences.
Declaration
public static bool AreEquivalent<TNode>(SeparatedSyntaxList<TNode> oldList, SeparatedSyntaxList<TNode> newList, bool topLevel)
where TNode : SyntaxNode
Parameters
Type |
Name |
Description |
SeparatedSyntaxList<TNode> |
oldList |
The old list.
|
SeparatedSyntaxList<TNode> |
newList |
The new list.
|
System.Boolean |
topLevel |
If true then the nodes are equivalent if the contained nodes and tokens declaring
metadata visible symbolic information are equivalent, ignoring any differences of nodes inside method bodies
or initializer expressions, otherwise all nodes and tokens must be equivalent.
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
AreEquivalent<TNode>(SeparatedSyntaxList<TNode>, SeparatedSyntaxList<TNode>, Nullable<Func<SyntaxKind, Boolean>>)
Determines if two lists of syntax nodes are the same, disregarding trivia differences.
Declaration
public static bool AreEquivalent<TNode>(SeparatedSyntaxList<TNode> oldList, SeparatedSyntaxList<TNode> newList, Func<SyntaxKind, bool>? ignoreChildNode = null)
where TNode : SyntaxNode
Parameters
Type |
Name |
Description |
SeparatedSyntaxList<TNode> |
oldList |
The old list.
|
SeparatedSyntaxList<TNode> |
newList |
The new list.
|
System.Nullable<Func<SyntaxKind, System.Boolean>> |
ignoreChildNode |
If specified called for every child syntax node (not token) that is visited during the comparison.
If it returns true the child is recursively visited, otherwise the child and its subtree is disregarded.
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
AreEquivalent<TNode>(SyntaxList<TNode>, SyntaxList<TNode>, Boolean)
Determines if two lists of syntax nodes are the same, disregarding trivia differences.
Declaration
public static bool AreEquivalent<TNode>(SyntaxList<TNode> oldList, SyntaxList<TNode> newList, bool topLevel)
where TNode : LuaSyntaxNode
Parameters
Type |
Name |
Description |
SyntaxList<TNode> |
oldList |
The old list.
|
SyntaxList<TNode> |
newList |
The new list.
|
System.Boolean |
topLevel |
If true then the nodes are equivalent if the contained nodes and tokens declaring
metadata visible symbolic information are equivalent, ignoring any differences of nodes inside method bodies
or initializer expressions, otherwise all nodes and tokens must be equivalent.
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
AreEquivalent<TNode>(SyntaxList<TNode>, SyntaxList<TNode>, Nullable<Func<SyntaxKind, Boolean>>)
Determines if two lists of syntax nodes are the same, disregarding trivia differences.
Declaration
public static bool AreEquivalent<TNode>(SyntaxList<TNode> oldList, SyntaxList<TNode> newList, Func<SyntaxKind, bool>? ignoreChildNode = null)
where TNode : SyntaxNode
Parameters
Type |
Name |
Description |
SyntaxList<TNode> |
oldList |
The old list.
|
SyntaxList<TNode> |
newList |
The new list.
|
System.Nullable<Func<SyntaxKind, System.Boolean>> |
ignoreChildNode |
If specified called for every child syntax node (not token) that is visited during the comparison.
If it returns true the child is recursively visited, otherwise the child and its subtree is disregarded.
|
Returns
Type |
Description |
System.Boolean |
|
Type Parameters
ArrayType(TypeSyntax)
Creates a new ArrayTypeSyntax instance.
Declaration
public static ArrayTypeSyntax ArrayType(TypeSyntax type)
Parameters
Returns
ArrayType(SyntaxToken, TypeSyntax, SyntaxToken)
Declaration
public static ArrayTypeSyntax ArrayType(SyntaxToken openBraceToken, TypeSyntax type, SyntaxToken closeBraceToken)
Parameters
Returns
AssignmentStatement(SeparatedSyntaxList<PrefixExpressionSyntax>, EqualsValuesClauseSyntax)
Creates a new AssignmentStatementSyntax instance.
Declaration
public static AssignmentStatementSyntax AssignmentStatement(SeparatedSyntaxList<PrefixExpressionSyntax> variables, EqualsValuesClauseSyntax equalsValues)
Parameters
Returns
AssignmentStatement(SeparatedSyntaxList<PrefixExpressionSyntax>, EqualsValuesClauseSyntax, SyntaxToken)
Declaration
public static AssignmentStatementSyntax AssignmentStatement(SeparatedSyntaxList<PrefixExpressionSyntax> variables, EqualsValuesClauseSyntax equalsValues, SyntaxToken semicolonToken)
Parameters
Returns
AssignmentStatement(SeparatedSyntaxList<PrefixExpressionSyntax>, SeparatedSyntaxList<ExpressionSyntax>)
Declaration
public static AssignmentStatementSyntax AssignmentStatement(SeparatedSyntaxList<PrefixExpressionSyntax> variables, SeparatedSyntaxList<ExpressionSyntax> values)
Parameters
Returns
Type |
Description |
AssignmentStatementSyntax |
|
BadToken(SyntaxTriviaList, String, SyntaxTriviaList)
Creates a token with kind BadToken.
Declaration
public static SyntaxToken BadToken(SyntaxTriviaList leading, string text, SyntaxTriviaList trailing)
Parameters
Type |
Name |
Description |
SyntaxTriviaList |
leading |
A list of trivia immediately preceding the token.
|
System.String |
text |
The raw text of the bad token.
|
SyntaxTriviaList |
trailing |
A list of trivia immediately following the token.
|
Returns
BinaryExpression(SyntaxKind, ExpressionSyntax, SyntaxToken, ExpressionSyntax)
Declaration
public static BinaryExpressionSyntax BinaryExpression(SyntaxKind kind, ExpressionSyntax left, SyntaxToken operatorToken, ExpressionSyntax right)
Parameters
Returns
BreakStatement()
Creates a new BreakStatementSyntax instance.
Declaration
public static BreakStatementSyntax BreakStatement()
Returns
BreakStatement(SyntaxToken, SyntaxToken)
Declaration
public static BreakStatementSyntax BreakStatement(SyntaxToken breakKeyword, SyntaxToken semicolonToken)
Parameters
Returns
Creates a trivia with kind either SingleLineCommentTrivia or MultiLineCommentTrivia containing the specified
text.
Declaration
public static SyntaxTrivia Comment(string text)
Parameters
Type |
Name |
Description |
System.String |
text |
The entire text of the comment including the leading '--' or '//' token for single line
comments or stop or start tokens for multiline comments.
|
Returns
CompilationUnit(StatementListSyntax)
Creates a new CompilationUnitSyntax instance.
Declaration
public static CompilationUnitSyntax CompilationUnit(StatementListSyntax statements)
Parameters
Returns
CompilationUnit(StatementListSyntax, SyntaxToken)
Declaration
public static CompilationUnitSyntax CompilationUnit(StatementListSyntax statements, SyntaxToken endOfFileToken)
Parameters
Returns
CompositeTypeName(TypeNameSyntax, SyntaxToken)
Creates a new CompositeTypeNameSyntax instance.
Declaration
public static CompositeTypeNameSyntax CompositeTypeName(TypeNameSyntax base, SyntaxToken identifierToken)
Parameters
Returns
CompositeTypeName(TypeNameSyntax, SyntaxToken, TypeArgumentListSyntax)
Creates a new CompositeTypeNameSyntax instance.
Declaration
public static CompositeTypeNameSyntax CompositeTypeName(TypeNameSyntax base, SyntaxToken identifierToken, TypeArgumentListSyntax typeArgumentList)
Parameters
Returns
CompositeTypeName(TypeNameSyntax, SyntaxToken, SyntaxToken, TypeArgumentListSyntax)
Declaration
public static CompositeTypeNameSyntax CompositeTypeName(TypeNameSyntax base, SyntaxToken dotToken, SyntaxToken identifierToken, TypeArgumentListSyntax typeArgumentList)
Parameters
Returns
CompositeTypeName(TypeNameSyntax, String)
Creates a new CompositeTypeNameSyntax instance.
Declaration
public static CompositeTypeNameSyntax CompositeTypeName(TypeNameSyntax base, string identifierToken)
Parameters
Type |
Name |
Description |
TypeNameSyntax |
base |
|
System.String |
identifierToken |
|
Returns
CompoundAssignmentStatement(SyntaxKind, PrefixExpressionSyntax, ExpressionSyntax)
Creates a new CompoundAssignmentStatementSyntax instance.
Declaration
public static CompoundAssignmentStatementSyntax CompoundAssignmentStatement(SyntaxKind kind, PrefixExpressionSyntax variable, ExpressionSyntax expression)
Parameters
Returns
CompoundAssignmentStatement(SyntaxKind, PrefixExpressionSyntax, SyntaxToken, ExpressionSyntax, SyntaxToken)
Declaration
public static CompoundAssignmentStatementSyntax CompoundAssignmentStatement(SyntaxKind kind, PrefixExpressionSyntax variable, SyntaxToken assignmentOperatorToken, ExpressionSyntax expression, SyntaxToken semicolonToken)
Parameters
Returns
ContinueStatement()
Creates a new ContinueStatementSyntax instance.
Declaration
public static ContinueStatementSyntax ContinueStatement()
Returns
ContinueStatement(SyntaxToken, SyntaxToken)
Declaration
public static ContinueStatementSyntax ContinueStatement(SyntaxToken continueKeyword, SyntaxToken semicolonToken)
Parameters
Returns
DoStatement(StatementListSyntax)
Creates a new DoStatementSyntax instance.
Declaration
public static DoStatementSyntax DoStatement(StatementListSyntax body)
Parameters
Returns
DoStatement(SyntaxToken, StatementListSyntax, SyntaxToken, SyntaxToken)
Declaration
public static DoStatementSyntax DoStatement(SyntaxToken doKeyword, StatementListSyntax body, SyntaxToken endKeyword, SyntaxToken semicolonToken)
Parameters
Returns
ElasticEndOfLine(String)
Creates a trivia with kind EndOfLineTrivia containing the specified text. Elastic trivia are used to
denote trivia that was not produced by parsing source text, and are usually not preserved during formatting.
Declaration
public static SyntaxTrivia ElasticEndOfLine(string text)
Parameters
Type |
Name |
Description |
System.String |
text |
The text of the end of line. Any text can be specified here, however only carriage return and
line feed characters are recognized by the parser as end of line.
|
Returns
ElasticWhitespace(String)
Creates a trivia with kind WhitespaceTrivia containing the specified text. Elastic trivia are used to
denote trivia that was not produced by parsing source text, and are usually not preserved during formatting.
Declaration
public static SyntaxTrivia ElasticWhitespace(string text)
Parameters
Type |
Name |
Description |
System.String |
text |
The text of the whitespace. Any text can be specified here, however only specific
whitespace characters are recognized by the parser.
|
Returns
ElementAccessExpression(PrefixExpressionSyntax, ExpressionSyntax)
Creates a new ElementAccessExpressionSyntax instance.
Declaration
public static ElementAccessExpressionSyntax ElementAccessExpression(PrefixExpressionSyntax expression, ExpressionSyntax keyExpression)
Parameters
Returns
ElementAccessExpression(PrefixExpressionSyntax, SyntaxToken, ExpressionSyntax, SyntaxToken)
Declaration
public static ElementAccessExpressionSyntax ElementAccessExpression(PrefixExpressionSyntax expression, SyntaxToken openBracketToken, ExpressionSyntax keyExpression, SyntaxToken closeBracketToken)
Parameters
Returns
ElseClause(StatementListSyntax)
Creates a new ElseClauseSyntax instance.
Declaration
public static ElseClauseSyntax ElseClause(StatementListSyntax elseBody)
Parameters
Returns
ElseClause(SyntaxToken, StatementListSyntax)
Declaration
public static ElseClauseSyntax ElseClause(SyntaxToken elseKeyword, StatementListSyntax elseBody)
Parameters
Returns
ElseIfClause(ExpressionSyntax, StatementListSyntax)
Creates a new ElseIfClauseSyntax instance.
Declaration
public static ElseIfClauseSyntax ElseIfClause(ExpressionSyntax condition, StatementListSyntax body)
Parameters
Returns
ElseIfClause(SyntaxToken, ExpressionSyntax, SyntaxToken, StatementListSyntax)
Declaration
public static ElseIfClauseSyntax ElseIfClause(SyntaxToken elseIfKeyword, ExpressionSyntax condition, SyntaxToken thenKeyword, StatementListSyntax body)
Parameters
Returns
ElseIfExpressionClause(ExpressionSyntax, ExpressionSyntax)
Creates a new ElseIfExpressionClauseSyntax instance.
Declaration
public static ElseIfExpressionClauseSyntax ElseIfExpressionClause(ExpressionSyntax condition, ExpressionSyntax value)
Parameters
Returns
ElseIfExpressionClause(SyntaxToken, ExpressionSyntax, SyntaxToken, ExpressionSyntax)
Declaration
public static ElseIfExpressionClauseSyntax ElseIfExpressionClause(SyntaxToken elseIfKeyword, ExpressionSyntax condition, SyntaxToken thenKeyword, ExpressionSyntax value)
Parameters
Returns
EmptyStatement()
Creates a new EmptyStatementSyntax instance.
Declaration
public static EmptyStatementSyntax EmptyStatement()
Returns
EmptyStatement(SyntaxToken)
Declaration
public static EmptyStatementSyntax EmptyStatement(SyntaxToken semicolonToken)
Parameters
Returns
EndOfLine(String)
Creates a trivia with kind EndOfLineTrivia containing the specified text.
Declaration
public static SyntaxTrivia EndOfLine(string text)
Parameters
Type |
Name |
Description |
System.String |
text |
The text of the end of line. Any text can be specified here, however only carriage return and
line feed characters are recognized by the parser as end of line.
|
Returns
EqualsType(TypeSyntax)
Creates a new EqualsTypeSyntax instance.
Declaration
public static EqualsTypeSyntax EqualsType(TypeSyntax type)
Parameters
Returns
EqualsType(SyntaxToken, TypeSyntax)
Declaration
public static EqualsTypeSyntax EqualsType(SyntaxToken equalsToken, TypeSyntax type)
Parameters
Returns
EqualsValuesClause(SeparatedSyntaxList<ExpressionSyntax>)
Creates a new EqualsValuesClauseSyntax instance.
Declaration
public static EqualsValuesClauseSyntax EqualsValuesClause(SeparatedSyntaxList<ExpressionSyntax> values)
Parameters
Returns
EqualsValuesClause(SyntaxToken, SeparatedSyntaxList<ExpressionSyntax>)
Declaration
public static EqualsValuesClauseSyntax EqualsValuesClause(SyntaxToken equalsToken, SeparatedSyntaxList<ExpressionSyntax> values)
Parameters
Returns
ExpressionKeyedTableField(ExpressionSyntax, ExpressionSyntax)
Creates a new ExpressionKeyedTableFieldSyntax instance.
Declaration
public static ExpressionKeyedTableFieldSyntax ExpressionKeyedTableField(ExpressionSyntax key, ExpressionSyntax value)
Parameters
Returns
ExpressionKeyedTableField(SyntaxToken, ExpressionSyntax, SyntaxToken, SyntaxToken, ExpressionSyntax)
Declaration
public static ExpressionKeyedTableFieldSyntax ExpressionKeyedTableField(SyntaxToken openBracketToken, ExpressionSyntax key, SyntaxToken closeBracketToken, SyntaxToken equalsToken, ExpressionSyntax value)
Parameters
Returns
ExpressionListFunctionArgument(SeparatedSyntaxList<ExpressionSyntax>)
Creates a new ExpressionListFunctionArgumentSyntax instance.
Declaration
public static ExpressionListFunctionArgumentSyntax ExpressionListFunctionArgument(SeparatedSyntaxList<ExpressionSyntax> expressions = default(SeparatedSyntaxList<ExpressionSyntax>))
Parameters
Returns
ExpressionListFunctionArgument(SyntaxToken, SeparatedSyntaxList<ExpressionSyntax>, SyntaxToken)
Declaration
public static ExpressionListFunctionArgumentSyntax ExpressionListFunctionArgument(SyntaxToken openParenthesisToken, SeparatedSyntaxList<ExpressionSyntax> expressions, SyntaxToken closeParenthesisToken)
Parameters
Returns
ExpressionStatement(ExpressionSyntax)
Creates a new ExpressionStatementSyntax instance.
Declaration
public static ExpressionStatementSyntax ExpressionStatement(ExpressionSyntax expression)
Parameters
Returns
ExpressionStatement(ExpressionSyntax, SyntaxToken)
Declaration
public static ExpressionStatementSyntax ExpressionStatement(ExpressionSyntax expression, SyntaxToken semicolonToken)
Parameters
Returns
FunctionCallExpression(PrefixExpressionSyntax, FunctionArgumentSyntax)
Declaration
public static FunctionCallExpressionSyntax FunctionCallExpression(PrefixExpressionSyntax expression, FunctionArgumentSyntax argument)
Parameters
Returns
FunctionDeclarationStatement(FunctionNameSyntax, ParameterListSyntax, StatementListSyntax)
Creates a new FunctionDeclarationStatementSyntax instance.
Declaration
public static FunctionDeclarationStatementSyntax FunctionDeclarationStatement(FunctionNameSyntax name, ParameterListSyntax parameters, StatementListSyntax body)
Parameters
Returns
FunctionDeclarationStatement(FunctionNameSyntax, TypeParameterListSyntax, ParameterListSyntax, TypeBindingSyntax, StatementListSyntax)
Creates a new FunctionDeclarationStatementSyntax instance.
Declaration
public static FunctionDeclarationStatementSyntax FunctionDeclarationStatement(FunctionNameSyntax name, TypeParameterListSyntax typeParameterList, ParameterListSyntax parameters, TypeBindingSyntax typeBinding, StatementListSyntax body)
Parameters
Returns
FunctionDeclarationStatement(SyntaxToken, FunctionNameSyntax, TypeParameterListSyntax, ParameterListSyntax, TypeBindingSyntax, StatementListSyntax, SyntaxToken, SyntaxToken)
Declaration
public static FunctionDeclarationStatementSyntax FunctionDeclarationStatement(SyntaxToken functionKeyword, FunctionNameSyntax name, TypeParameterListSyntax typeParameterList, ParameterListSyntax parameters, TypeBindingSyntax typeBinding, StatementListSyntax body, SyntaxToken endKeyword, SyntaxToken semicolonToken)
Parameters
Returns
FunctionType(TypeParameterListSyntax, SeparatedSyntaxList<FunctionTypeParameterSyntax>, TypeSyntax)
Creates a new FunctionTypeSyntax instance.
Declaration
public static FunctionTypeSyntax FunctionType(TypeParameterListSyntax typeParameterList, SeparatedSyntaxList<FunctionTypeParameterSyntax> parameters, TypeSyntax returnType)
Parameters
Returns
FunctionType(TypeParameterListSyntax, SyntaxToken, SeparatedSyntaxList<FunctionTypeParameterSyntax>, SyntaxToken, SyntaxToken, TypeSyntax)
Declaration
public static FunctionTypeSyntax FunctionType(TypeParameterListSyntax typeParameterList, SyntaxToken openParenthesisToken, SeparatedSyntaxList<FunctionTypeParameterSyntax> parameters, SyntaxToken closeParenthesisToken, SyntaxToken minusGreaterThanToken, TypeSyntax returnType)
Parameters
Returns
FunctionType(TypeSyntax)
Creates a new FunctionTypeSyntax instance.
Declaration
public static FunctionTypeSyntax FunctionType(TypeSyntax returnType)
Parameters
Returns
FunctionTypeParameter(TypeSyntax)
Creates a new FunctionTypeParameterSyntax instance.
Declaration
public static FunctionTypeParameterSyntax FunctionTypeParameter(TypeSyntax type)
Parameters
Returns
FunctionTypeParameter(SyntaxToken, TypeSyntax)
Creates a new FunctionTypeParameterSyntax instance.
Declaration
public static FunctionTypeParameterSyntax FunctionTypeParameter(SyntaxToken identifier, TypeSyntax type)
Parameters
Returns
FunctionTypeParameter(SyntaxToken, SyntaxToken, TypeSyntax)
Declaration
public static FunctionTypeParameterSyntax FunctionTypeParameter(SyntaxToken identifier, SyntaxToken colonToken, TypeSyntax type)
Parameters
Returns
GenericForStatement(SeparatedSyntaxList<TypedIdentifierNameSyntax>, SeparatedSyntaxList<ExpressionSyntax>, StatementListSyntax)
Creates a new GenericForStatementSyntax instance.
Declaration
public static GenericForStatementSyntax GenericForStatement(SeparatedSyntaxList<TypedIdentifierNameSyntax> identifiers, SeparatedSyntaxList<ExpressionSyntax> expressions, StatementListSyntax body)
Parameters
Returns
GenericForStatement(SyntaxToken, SeparatedSyntaxList<TypedIdentifierNameSyntax>, SyntaxToken, SeparatedSyntaxList<ExpressionSyntax>, SyntaxToken, StatementListSyntax, SyntaxToken, SyntaxToken)
Declaration
public static GenericForStatementSyntax GenericForStatement(SyntaxToken forKeyword, SeparatedSyntaxList<TypedIdentifierNameSyntax> identifiers, SyntaxToken inKeyword, SeparatedSyntaxList<ExpressionSyntax> expressions, SyntaxToken doKeyword, StatementListSyntax body, SyntaxToken endKeyword, SyntaxToken semicolonToken)
Parameters
Returns
GenericTypePack(SyntaxToken)
Creates a new GenericTypePackSyntax instance.
Declaration
public static GenericTypePackSyntax GenericTypePack(SyntaxToken identifier)
Parameters
Returns
GenericTypePack(SyntaxToken, SyntaxToken)
Declaration
public static GenericTypePackSyntax GenericTypePack(SyntaxToken identifier, SyntaxToken dotDotDotToken)
Parameters
Returns
GenericTypePack(String)
Creates a new GenericTypePackSyntax instance.
Declaration
public static GenericTypePackSyntax GenericTypePack(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
Returns
GotoLabelStatement(SyntaxToken)
Creates a new GotoLabelStatementSyntax instance.
Declaration
public static GotoLabelStatementSyntax GotoLabelStatement(SyntaxToken identifier)
Parameters
Returns
GotoLabelStatement(SyntaxToken, SyntaxToken, SyntaxToken, SyntaxToken)
Declaration
public static GotoLabelStatementSyntax GotoLabelStatement(SyntaxToken leftDelimiterToken, SyntaxToken identifier, SyntaxToken rightDelimiterToken, SyntaxToken semicolonToken)
Parameters
Returns
GotoLabelStatement(String)
Creates a new GotoLabelStatementSyntax instance.
Declaration
public static GotoLabelStatementSyntax GotoLabelStatement(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
Returns
GotoStatement(SyntaxToken)
Creates a new GotoStatementSyntax instance.
Declaration
public static GotoStatementSyntax GotoStatement(SyntaxToken labelName)
Parameters
Returns
GotoStatement(SyntaxToken, SyntaxToken, SyntaxToken)
Declaration
public static GotoStatementSyntax GotoStatement(SyntaxToken gotoKeyword, SyntaxToken labelName, SyntaxToken semicolonToken)
Parameters
Returns
GotoStatement(String)
Creates a new GotoStatementSyntax instance.
Declaration
public static GotoStatementSyntax GotoStatement(string labelName)
Parameters
Type |
Name |
Description |
System.String |
labelName |
|
Returns
HashLiteral(SyntaxTriviaList, String, UInt32, SyntaxTriviaList)
Creates a FiveM hash string literal token with kind HashStringLiteralToken from the text
and corresponding string value.
Declaration
public static SyntaxToken HashLiteral(SyntaxTriviaList leading, string text, uint value, SyntaxTriviaList trailing)
Parameters
Type |
Name |
Description |
SyntaxTriviaList |
leading |
A list of trivia immediately preceding the token.
|
System.String |
text |
The raw text of the literal, including quotes and escape sequences.
|
System.UInt32 |
value |
The hash value to be represented by the returned token.
|
SyntaxTriviaList |
trailing |
A list of trivia immediately following the token.
|
Returns
HashLiteral(String)
Creates a FiveM hash string literal token with kind HashStringLiteralToken and
formats the provided string as a Lua string and calculates the hash from it.
Declaration
public static SyntaxToken HashLiteral(string stringValue)
Parameters
Type |
Name |
Description |
System.String |
stringValue |
The actual value of the string without any escapes.
|
Returns
HashLiteral(String, UInt32)
Creates a FiveM hash string literal token with kind HashStringLiteralToken from the text
and corresponding string value.
Declaration
public static SyntaxToken HashLiteral(string text, uint value)
Parameters
Type |
Name |
Description |
System.String |
text |
The raw text of the literal, including quotes and escape sequences.
|
System.UInt32 |
value |
The hash value to be represented by the returned token.
|
Returns
Identifier(SyntaxTriviaList, SyntaxKind, String, SyntaxTriviaList)
Creates a token with kind IdentifierToken containing the specified text.
Declaration
public static SyntaxToken Identifier(SyntaxTriviaList leading, SyntaxKind contextualKind, string text, SyntaxTriviaList trailing)
Parameters
Type |
Name |
Description |
SyntaxTriviaList |
leading |
A list of trivia immediately preceding the token.
|
SyntaxKind |
contextualKind |
An alternative SyntaxKind that can be inferred for this token in special
contexts. These are usually keywords.
|
System.String |
text |
The raw text of the identifier name, including any escapes or leading '@'
character.
|
SyntaxTriviaList |
trailing |
A list of trivia immediately following the token.
|
Returns
Identifier(SyntaxTriviaList, String, SyntaxTriviaList)
Creates a token with kind IdentifierToken containing the specified text.
Declaration
public static SyntaxToken Identifier(SyntaxTriviaList leading, string text, SyntaxTriviaList trailing)
Parameters
Type |
Name |
Description |
SyntaxTriviaList |
leading |
A list of trivia immediately preceding the token.
|
System.String |
text |
The text of the identifier name.
|
SyntaxTriviaList |
trailing |
A list of trivia immediately following the token.
|
Returns
Identifier(String)
Creates a token with kind IdentifierToken containing the specified text.
The text of the identifier name.
Declaration
public static SyntaxToken Identifier(string text)
Parameters
Type |
Name |
Description |
System.String |
text |
|
Returns
IdentifierKeyedTableField(SyntaxToken, ExpressionSyntax)
Creates a new IdentifierKeyedTableFieldSyntax instance.
Declaration
public static IdentifierKeyedTableFieldSyntax IdentifierKeyedTableField(SyntaxToken identifier, ExpressionSyntax value)
Parameters
Returns
IdentifierKeyedTableField(SyntaxToken, SyntaxToken, ExpressionSyntax)
Declaration
public static IdentifierKeyedTableFieldSyntax IdentifierKeyedTableField(SyntaxToken identifier, SyntaxToken equalsToken, ExpressionSyntax value)
Parameters
Returns
IdentifierKeyedTableField(String, ExpressionSyntax)
Creates a new IdentifierKeyedTableFieldSyntax instance.
Declaration
public static IdentifierKeyedTableFieldSyntax IdentifierKeyedTableField(string identifier, ExpressionSyntax value)
Parameters
Returns
IdentifierName(SyntaxToken)
Declaration
public static IdentifierNameSyntax IdentifierName(SyntaxToken identifier)
Parameters
Returns
IdentifierName(String)
Declaration
public static IdentifierNameSyntax IdentifierName(string name)
Parameters
Type |
Name |
Description |
System.String |
name |
The identifier name.
|
Returns
Type |
Description |
IdentifierNameSyntax |
|
IfExpression(ExpressionSyntax, ExpressionSyntax, ExpressionSyntax)
Creates a new IfExpressionSyntax instance.
Declaration
public static IfExpressionSyntax IfExpression(ExpressionSyntax condition, ExpressionSyntax trueValue, ExpressionSyntax falseValue)
Parameters
Returns
IfExpression(ExpressionSyntax, ExpressionSyntax, SyntaxList<ElseIfExpressionClauseSyntax>, ExpressionSyntax)
Creates a new IfExpressionSyntax instance.
Declaration
public static IfExpressionSyntax IfExpression(ExpressionSyntax condition, ExpressionSyntax trueValue, SyntaxList<ElseIfExpressionClauseSyntax> elseIfClauses, ExpressionSyntax falseValue)
Parameters
Returns
IfExpression(SyntaxToken, ExpressionSyntax, SyntaxToken, ExpressionSyntax, SyntaxList<ElseIfExpressionClauseSyntax>, SyntaxToken, ExpressionSyntax)
Declaration
public static IfExpressionSyntax IfExpression(SyntaxToken ifKeyword, ExpressionSyntax condition, SyntaxToken thenKeyword, ExpressionSyntax trueValue, SyntaxList<ElseIfExpressionClauseSyntax> elseIfClauses, SyntaxToken elseKeyword, ExpressionSyntax falseValue)
Parameters
Returns
IfStatement(ExpressionSyntax, StatementListSyntax)
Creates a new IfStatementSyntax instance.
Declaration
public static IfStatementSyntax IfStatement(ExpressionSyntax condition, StatementListSyntax body)
Parameters
Returns
IfStatement(ExpressionSyntax, StatementListSyntax, SyntaxList<ElseIfClauseSyntax>, ElseClauseSyntax)
Creates a new IfStatementSyntax instance.
Declaration
public static IfStatementSyntax IfStatement(ExpressionSyntax condition, StatementListSyntax body, SyntaxList<ElseIfClauseSyntax> elseIfClauses, ElseClauseSyntax elseClause)
Parameters
Returns
IfStatement(SyntaxToken, ExpressionSyntax, SyntaxToken, StatementListSyntax, SyntaxList<ElseIfClauseSyntax>, ElseClauseSyntax, SyntaxToken, SyntaxToken)
Declaration
public static IfStatementSyntax IfStatement(SyntaxToken ifKeyword, ExpressionSyntax condition, SyntaxToken thenKeyword, StatementListSyntax body, SyntaxList<ElseIfClauseSyntax> elseIfClauses, ElseClauseSyntax elseClause, SyntaxToken endKeyword, SyntaxToken semicolonToken)
Parameters
Returns
InterpolatedStringExpression(SyntaxList<InterpolatedStringContentSyntax>)
Creates a new InterpolatedStringExpressionSyntax instance.
Declaration
public static InterpolatedStringExpressionSyntax InterpolatedStringExpression(SyntaxList<InterpolatedStringContentSyntax> contents = default(SyntaxList<InterpolatedStringContentSyntax>))
Parameters
Returns
InterpolatedStringExpression(SyntaxToken, SyntaxList<InterpolatedStringContentSyntax>, SyntaxToken)
Declaration
public static InterpolatedStringExpressionSyntax InterpolatedStringExpression(SyntaxToken stringStartToken, SyntaxList<InterpolatedStringContentSyntax> contents, SyntaxToken stringEndToken)
Parameters
Returns
InterpolatedStringText()
Creates a new InterpolatedStringTextSyntax instance.
Declaration
public static InterpolatedStringTextSyntax InterpolatedStringText()
Returns
InterpolatedStringText(SyntaxToken)
Declaration
public static InterpolatedStringTextSyntax InterpolatedStringText(SyntaxToken textToken)
Parameters
Returns
Interpolation(ExpressionSyntax)
Creates a new InterpolationSyntax instance.
Declaration
public static InterpolationSyntax Interpolation(ExpressionSyntax expression)
Parameters
Returns
Interpolation(SyntaxToken, ExpressionSyntax, SyntaxToken)
Declaration
public static InterpolationSyntax Interpolation(SyntaxToken openBraceToken, ExpressionSyntax expression, SyntaxToken closeBraceToken)
Parameters
Returns
IntersectionType(TypeSyntax, TypeSyntax)
Creates a new IntersectionTypeSyntax instance.
Declaration
public static IntersectionTypeSyntax IntersectionType(TypeSyntax left, TypeSyntax right)
Parameters
Returns
IntersectionType(TypeSyntax, SyntaxToken, TypeSyntax)
Declaration
public static IntersectionTypeSyntax IntersectionType(TypeSyntax left, SyntaxToken ampersandToken, TypeSyntax right)
Parameters
Returns
List<TNode>()
Creates an empty list of syntax nodes.
Declaration
public static SyntaxList<TNode> List<TNode>()
where TNode : SyntaxNode
Returns
Type Parameters
Name |
Description |
TNode |
The specific type of the element nodes.
|
List<TNode>(IEnumerable<TNode>)
Creates a list of syntax nodes.
Declaration
public static SyntaxList<TNode> List<TNode>(IEnumerable<TNode> nodes)
where TNode : SyntaxNode
Parameters
Type |
Name |
Description |
IEnumerable<TNode> |
nodes |
A sequence of element nodes.
|
Returns
Type Parameters
Name |
Description |
TNode |
The specific type of the element nodes.
|
Literal(Complex)
Creates a token with kind NumericLiteralToken from a complex value.
Declaration
public static SyntaxToken Literal(Complex value)
Parameters
Type |
Name |
Description |
Complex |
value |
The complex value to be represented by the returned token.
|
Returns
Literal(SyntaxTriviaList, String, Complex, SyntaxTriviaList)
Creates a token with kind NumericLiteralToken from the text and corresponding complex value.
Declaration
public static SyntaxToken Literal(SyntaxTriviaList leading, string text, Complex value, SyntaxTriviaList trailing)
Parameters
Type |
Name |
Description |
SyntaxTriviaList |
leading |
A list of trivia immediately preceding the token.
|
System.String |
text |
The raw text of the literal.
|
Complex |
value |
The complex value to be represented by the returned token.
|
SyntaxTriviaList |
trailing |
A list of trivia immediately following the token.
|
Returns
Literal(SyntaxTriviaList, String, Double, SyntaxTriviaList)
Creates a token with kind NumericLiteralToken from the text and corresponding 8-byte floating point value.
Declaration
public static SyntaxToken Literal(SyntaxTriviaList leading, string text, double value, SyntaxTriviaList trailing)
Parameters
Type |
Name |
Description |
SyntaxTriviaList |
leading |
A list of trivia immediately preceding the token.
|
System.String |
text |
The raw text of the literal.
|
System.Double |
value |
The 8-byte floating point value to be represented by the returned token.
|
SyntaxTriviaList |
trailing |
A list of trivia immediately following the token.
|
Returns
Literal(SyntaxTriviaList, String, Int64, SyntaxTriviaList)
Creates a token with kind NumericLiteralToken from the text and corresponding 8-byte signed integer value.
Declaration
public static SyntaxToken Literal(SyntaxTriviaList leading, string text, long value, SyntaxTriviaList trailing)
Parameters
Type |
Name |
Description |
SyntaxTriviaList |
leading |
A list of trivia immediately preceding the token.
|
System.String |
text |
The raw text of the literal.
|
System.Int64 |
value |
The 8-byte signed integer value to be represented by the returned token.
|
SyntaxTriviaList |
trailing |
A list of trivia immediately following the token.
|
Returns
Literal(SyntaxTriviaList, String, String, SyntaxTriviaList)
Creates a token with kind StringLiteralToken from the text and corresponding string value.
Declaration
public static SyntaxToken Literal(SyntaxTriviaList leading, string text, string value, SyntaxTriviaList trailing)
Parameters
Type |
Name |
Description |
SyntaxTriviaList |
leading |
A list of trivia immediately preceding the token.
|
System.String |
text |
The raw text of the literal, including quotes and escape sequences.
|
System.String |
value |
The string value to be represented by the returned token.
|
SyntaxTriviaList |
trailing |
A list of trivia immediately following the token.
|
Returns
Literal(SyntaxTriviaList, String, UInt64, SyntaxTriviaList)
Creates a token with kind NumericLiteralToken from the text and corresponding 8-byte floating point value.
Declaration
public static SyntaxToken Literal(SyntaxTriviaList leading, string text, ulong value, SyntaxTriviaList trailing)
Parameters
Type |
Name |
Description |
SyntaxTriviaList |
leading |
A list of trivia immediately preceding the token.
|
System.String |
text |
The raw text of the literal.
|
System.UInt64 |
value |
The 8-byte unsigned integer value to be represented by the returned token.
|
SyntaxTriviaList |
trailing |
A list of trivia immediately following the token.
|
Returns
Literal(Double)
Creates a token with kind NumericLiteralToken from an 8-byte floating point value.
Declaration
public static SyntaxToken Literal(double value)
Parameters
Type |
Name |
Description |
System.Double |
value |
The 8-byte floating point value to be represented by the returned token.
|
Returns
Literal(Int64)
Creates a token with kind NumericLiteralToken from an 8-byte integer value.
Declaration
public static SyntaxToken Literal(long value)
Parameters
Type |
Name |
Description |
System.Int64 |
value |
The 8-byte signed integer value to be represented by the returned token.
|
Returns
Literal(String)
Creates a token with kind StringLiteralToken from a string value.
Declaration
public static SyntaxToken Literal(string value)
Parameters
Type |
Name |
Description |
System.String |
value |
The string value to be represented by the returned token.
|
Returns
Literal(String, Complex)
Creates a token with kind NumericLiteralToken from the text and corresponding complex value.
Declaration
public static SyntaxToken Literal(string text, Complex value)
Parameters
Type |
Name |
Description |
System.String |
text |
The raw text of the literal.
|
Complex |
value |
The complex value to be represented by the returned token.
|
Returns
Literal(String, Double)
Creates a token with kind NumericLiteralToken from the text and corresponding 8-byte floating point value.
Declaration
public static SyntaxToken Literal(string text, double value)
Parameters
Type |
Name |
Description |
System.String |
text |
The raw text of the literal.
|
System.Double |
value |
The 8-byte floating point value to be represented by the returned token.
|
Returns
Literal(String, Int64)
Creates a token with kind NumericLiteralToken from the text and corresponding 8-byte signed integer value.
Declaration
public static SyntaxToken Literal(string text, long value)
Parameters
Type |
Name |
Description |
System.String |
text |
The raw text of the literal.
|
System.Int64 |
value |
The 8-byte signed integer value to be represented by the returned token.
|
Returns
Literal(String, String)
Creates a token with kind StringLiteralToken from the text and corresponding string value.
Declaration
public static SyntaxToken Literal(string text, string value)
Parameters
Type |
Name |
Description |
System.String |
text |
The raw text of the literal, including quotes and escape sequences.
|
System.String |
value |
The string value to be represented by the returned token.
|
Returns
Literal(String, UInt64)
Creates a token with kind NumericLiteralToken from the text and corresponding 8-byte signed integer value.
Declaration
public static SyntaxToken Literal(string text, ulong value)
Parameters
Type |
Name |
Description |
System.String |
text |
The raw text of the literal.
|
System.UInt64 |
value |
The 8-byte unsigned integer value to be represented by the returned token.
|
Returns
Literal(UInt64)
Creates a token with kind NumericLiteralToken from an 8-byte integer value.
Declaration
public static SyntaxToken Literal(ulong value)
Parameters
Type |
Name |
Description |
System.UInt64 |
value |
The 8-byte unsigned integer value to be represented by the returned token.
|
Returns
LiteralExpression(SyntaxKind)
Creates a new LiteralExpressionSyntax instance.
Declaration
public static LiteralExpressionSyntax LiteralExpression(SyntaxKind kind)
Parameters
Returns
LiteralExpression(SyntaxKind, SyntaxToken)
Declaration
public static LiteralExpressionSyntax LiteralExpression(SyntaxKind kind, SyntaxToken token)
Parameters
Returns
LiteralType(SyntaxKind)
Creates a new LiteralTypeSyntax instance.
Declaration
public static LiteralTypeSyntax LiteralType(SyntaxKind kind)
Parameters
Returns
LiteralType(SyntaxKind, SyntaxToken)
Declaration
public static LiteralTypeSyntax LiteralType(SyntaxKind kind, SyntaxToken token)
Parameters
Returns
LocalDeclarationName(IdentifierNameSyntax, Nullable<VariableAttributeSyntax>)
Declaration
public static LocalDeclarationNameSyntax LocalDeclarationName(IdentifierNameSyntax identifierName, VariableAttributeSyntax? attribute)
Parameters
Type |
Name |
Description |
IdentifierNameSyntax |
identifierName |
|
System.Nullable<VariableAttributeSyntax> |
attribute |
|
Returns
Type |
Description |
LocalDeclarationNameSyntax |
|
LocalDeclarationName(IdentifierNameSyntax)
Creates a new LocalDeclarationNameSyntax instance.
Declaration
public static LocalDeclarationNameSyntax LocalDeclarationName(IdentifierNameSyntax identifierName)
Parameters
Returns
LocalDeclarationName(IdentifierNameSyntax, VariableAttributeSyntax, TypeBindingSyntax)
Declaration
public static LocalDeclarationNameSyntax LocalDeclarationName(IdentifierNameSyntax identifierName, VariableAttributeSyntax attribute, TypeBindingSyntax typeBinding)
Parameters
Returns
LocalDeclarationName(String)
Creates a new LocalDeclarationNameSyntax instance.
Declaration
public static LocalDeclarationNameSyntax LocalDeclarationName(string identifierName)
Parameters
Type |
Name |
Description |
System.String |
identifierName |
|
Returns
LocalDeclarationName(String, Nullable<VariableAttributeSyntax>)
Declaration
public static LocalDeclarationNameSyntax LocalDeclarationName(string name, VariableAttributeSyntax? attribute)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.Nullable<VariableAttributeSyntax> |
attribute |
|
Returns
Type |
Description |
LocalDeclarationNameSyntax |
|
LocalFunctionDeclarationStatement(IdentifierNameSyntax, ParameterListSyntax, StatementListSyntax)
Creates a new LocalFunctionDeclarationStatementSyntax instance.
Declaration
public static LocalFunctionDeclarationStatementSyntax LocalFunctionDeclarationStatement(IdentifierNameSyntax name, ParameterListSyntax parameters, StatementListSyntax body)
Parameters
Returns
LocalFunctionDeclarationStatement(IdentifierNameSyntax, TypeParameterListSyntax, ParameterListSyntax, TypeBindingSyntax, StatementListSyntax)
Creates a new LocalFunctionDeclarationStatementSyntax instance.
Declaration
public static LocalFunctionDeclarationStatementSyntax LocalFunctionDeclarationStatement(IdentifierNameSyntax name, TypeParameterListSyntax typeParameterList, ParameterListSyntax parameters, TypeBindingSyntax typeBinding, StatementListSyntax body)
Parameters
Returns
LocalFunctionDeclarationStatement(SyntaxToken, SyntaxToken, IdentifierNameSyntax, ParameterListSyntax, StatementListSyntax, SyntaxToken, SyntaxToken)
Declaration
public static LocalFunctionDeclarationStatementSyntax LocalFunctionDeclarationStatement(SyntaxToken localKeyword, SyntaxToken functionKeyword, IdentifierNameSyntax name, ParameterListSyntax parameters, StatementListSyntax body, SyntaxToken endKeyword, SyntaxToken semicolonToken)
Parameters
Returns
Type |
Description |
LocalFunctionDeclarationStatementSyntax |
|
LocalFunctionDeclarationStatement(SyntaxToken, SyntaxToken, IdentifierNameSyntax, TypeParameterListSyntax, ParameterListSyntax, TypeBindingSyntax, StatementListSyntax, SyntaxToken, SyntaxToken)
Declaration
public static LocalFunctionDeclarationStatementSyntax LocalFunctionDeclarationStatement(SyntaxToken localKeyword, SyntaxToken functionKeyword, IdentifierNameSyntax name, TypeParameterListSyntax typeParameterList, ParameterListSyntax parameters, TypeBindingSyntax typeBinding, StatementListSyntax body, SyntaxToken endKeyword, SyntaxToken semicolonToken)
Parameters
Returns
LocalFunctionDeclarationStatement(String, ParameterListSyntax, StatementListSyntax)
Creates a new LocalFunctionDeclarationStatementSyntax instance.
Declaration
public static LocalFunctionDeclarationStatementSyntax LocalFunctionDeclarationStatement(string name, ParameterListSyntax parameters, StatementListSyntax body)
Parameters
Returns
LocalVariableDeclarationStatement(SeparatedSyntaxList<LocalDeclarationNameSyntax>, SeparatedSyntaxList<ExpressionSyntax>)
Declaration
public static LocalVariableDeclarationStatementSyntax LocalVariableDeclarationStatement(SeparatedSyntaxList<LocalDeclarationNameSyntax> names, SeparatedSyntaxList<ExpressionSyntax> values)
Parameters
Returns
Type |
Description |
LocalVariableDeclarationStatementSyntax |
|
LocalVariableDeclarationStatement(SeparatedSyntaxList<LocalDeclarationNameSyntax>)
Creates a new LocalVariableDeclarationStatementSyntax instance.
Declaration
public static LocalVariableDeclarationStatementSyntax LocalVariableDeclarationStatement(SeparatedSyntaxList<LocalDeclarationNameSyntax> names)
Parameters
Returns
LocalVariableDeclarationStatement(SeparatedSyntaxList<LocalDeclarationNameSyntax>, EqualsValuesClauseSyntax)
Creates a new LocalVariableDeclarationStatementSyntax instance.
Declaration
public static LocalVariableDeclarationStatementSyntax LocalVariableDeclarationStatement(SeparatedSyntaxList<LocalDeclarationNameSyntax> names, EqualsValuesClauseSyntax equalsValues)
Parameters
Returns
LocalVariableDeclarationStatement(SyntaxToken, SeparatedSyntaxList<LocalDeclarationNameSyntax>, EqualsValuesClauseSyntax, SyntaxToken)
Declaration
public static LocalVariableDeclarationStatementSyntax LocalVariableDeclarationStatement(SyntaxToken localKeyword, SeparatedSyntaxList<LocalDeclarationNameSyntax> names, EqualsValuesClauseSyntax equalsValues, SyntaxToken semicolonToken)
Parameters
Returns
MemberAccessExpression(PrefixExpressionSyntax, SyntaxToken)
Creates a new MemberAccessExpressionSyntax instance.
Declaration
public static MemberAccessExpressionSyntax MemberAccessExpression(PrefixExpressionSyntax expression, SyntaxToken memberName)
Parameters
Returns
MemberAccessExpression(PrefixExpressionSyntax, SyntaxToken, SyntaxToken)
Declaration
public static MemberAccessExpressionSyntax MemberAccessExpression(PrefixExpressionSyntax expression, SyntaxToken dotSeparator, SyntaxToken memberName)
Parameters
Returns
MemberAccessExpression(PrefixExpressionSyntax, String)
Creates a new MemberAccessExpressionSyntax instance.
Declaration
public static MemberAccessExpressionSyntax MemberAccessExpression(PrefixExpressionSyntax expression, string memberName)
Parameters
Returns
MemberFunctionName(FunctionNameSyntax, SyntaxToken)
Creates a new MemberFunctionNameSyntax instance.
Declaration
public static MemberFunctionNameSyntax MemberFunctionName(FunctionNameSyntax baseName, SyntaxToken name)
Parameters
Returns
MemberFunctionName(FunctionNameSyntax, SyntaxToken, SyntaxToken)
Declaration
public static MemberFunctionNameSyntax MemberFunctionName(FunctionNameSyntax baseName, SyntaxToken dotToken, SyntaxToken name)
Parameters
Returns
MemberFunctionName(FunctionNameSyntax, String)
Creates a new MemberFunctionNameSyntax instance.
Declaration
public static MemberFunctionNameSyntax MemberFunctionName(FunctionNameSyntax baseName, string name)
Parameters
Returns
MethodCallExpression(PrefixExpressionSyntax, SyntaxToken, FunctionArgumentSyntax)
Creates a new MethodCallExpressionSyntax instance.
Declaration
public static MethodCallExpressionSyntax MethodCallExpression(PrefixExpressionSyntax expression, SyntaxToken identifier, FunctionArgumentSyntax argument)
Parameters
Returns
MethodCallExpression(PrefixExpressionSyntax, SyntaxToken, SyntaxToken, FunctionArgumentSyntax)
Declaration
public static MethodCallExpressionSyntax MethodCallExpression(PrefixExpressionSyntax expression, SyntaxToken colonToken, SyntaxToken identifier, FunctionArgumentSyntax argument)
Parameters
Returns
MethodCallExpression(PrefixExpressionSyntax, String, FunctionArgumentSyntax)
Creates a new MethodCallExpressionSyntax instance.
Declaration
public static MethodCallExpressionSyntax MethodCallExpression(PrefixExpressionSyntax expression, string identifier, FunctionArgumentSyntax argument)
Parameters
Returns
MethodFunctionName(FunctionNameSyntax, SyntaxToken)
Creates a new MethodFunctionNameSyntax instance.
Declaration
public static MethodFunctionNameSyntax MethodFunctionName(FunctionNameSyntax baseName, SyntaxToken name)
Parameters
Returns
MethodFunctionName(FunctionNameSyntax, SyntaxToken, SyntaxToken)
Declaration
public static MethodFunctionNameSyntax MethodFunctionName(FunctionNameSyntax baseName, SyntaxToken colonToken, SyntaxToken name)
Parameters
Returns
MethodFunctionName(FunctionNameSyntax, String)
Creates a new MethodFunctionNameSyntax instance.
Declaration
public static MethodFunctionNameSyntax MethodFunctionName(FunctionNameSyntax baseName, string name)
Parameters
Returns
MissingToken(SyntaxKind)
Creates a missing token corresponding to syntax kind. A missing token is produced by the parser when an
expected token is not found. A missing token has no text and normally has associated diagnostics.
Declaration
public static SyntaxToken MissingToken(SyntaxKind kind)
Parameters
Type |
Name |
Description |
SyntaxKind |
kind |
A syntax kind value for a token. These have the suffix Token or Keyword.
|
Returns
MissingToken(SyntaxTriviaList, SyntaxKind, SyntaxTriviaList)
Creates a missing token corresponding to syntax kind. A missing token is produced by the parser when an
expected token is not found. A missing token has no text and normally has associated diagnostics.
Declaration
public static SyntaxToken MissingToken(SyntaxTriviaList leading, SyntaxKind kind, SyntaxTriviaList trailing)
Parameters
Type |
Name |
Description |
SyntaxTriviaList |
leading |
A list of trivia immediately preceding the token.
|
SyntaxKind |
kind |
A syntax kind value for a token. These have the suffix Token or Keyword.
|
SyntaxTriviaList |
trailing |
A list of trivia immediately following the token.
|
Returns
NamedParameter(SyntaxToken)
Creates a new NamedParameterSyntax instance.
Declaration
public static NamedParameterSyntax NamedParameter(SyntaxToken identifier)
Parameters
Returns
NamedParameter(SyntaxToken, TypeBindingSyntax)
Declaration
public static NamedParameterSyntax NamedParameter(SyntaxToken identifier, TypeBindingSyntax typeBinding)
Parameters
Returns
NamedParameter(String)
Creates a new NamedParameterSyntax instance.
Declaration
public static NamedParameterSyntax NamedParameter(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
Returns
NilableType(TypeSyntax)
Creates a new NilableTypeSyntax instance.
Declaration
public static NilableTypeSyntax NilableType(TypeSyntax type)
Parameters
Returns
NilableType(TypeSyntax, SyntaxToken)
Declaration
public static NilableTypeSyntax NilableType(TypeSyntax type, SyntaxToken questionToken)
Parameters
Returns
NodeOrTokenList()
Declaration
public static SyntaxNodeOrTokenList NodeOrTokenList()
Returns
NodeOrTokenList(IEnumerable<SyntaxNodeOrToken>)
Declaration
public static SyntaxNodeOrTokenList NodeOrTokenList(IEnumerable<SyntaxNodeOrToken> nodesAndTokens)
Parameters
Type |
Name |
Description |
IEnumerable<SyntaxNodeOrToken> |
nodesAndTokens |
The sequence of nodes and tokens
|
Returns
NodeOrTokenList(SyntaxNodeOrToken[])
Declaration
public static SyntaxNodeOrTokenList NodeOrTokenList(params SyntaxNodeOrToken[] nodesAndTokens)
Parameters
Returns
NumericForStatement(IdentifierNameSyntax, ExpressionSyntax, ExpressionSyntax, Nullable<ExpressionSyntax>, StatementListSyntax)
Declaration
public static NumericForStatementSyntax NumericForStatement(IdentifierNameSyntax identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue, ExpressionSyntax? stepValue, StatementListSyntax body)
Parameters
Type |
Name |
Description |
IdentifierNameSyntax |
identifier |
|
ExpressionSyntax |
initialValue |
|
ExpressionSyntax |
finalValue |
|
System.Nullable<ExpressionSyntax> |
stepValue |
|
StatementListSyntax |
body |
|
Returns
Type |
Description |
NumericForStatementSyntax |
|
NumericForStatement(TypedIdentifierNameSyntax, ExpressionSyntax, ExpressionSyntax, ExpressionSyntax, StatementListSyntax)
Creates a new NumericForStatementSyntax instance.
Declaration
public static NumericForStatementSyntax NumericForStatement(TypedIdentifierNameSyntax identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue, ExpressionSyntax stepValue, StatementListSyntax body)
Parameters
Returns
NumericForStatement(TypedIdentifierNameSyntax, ExpressionSyntax, ExpressionSyntax, StatementListSyntax)
Creates a new NumericForStatementSyntax instance.
Declaration
public static NumericForStatementSyntax NumericForStatement(TypedIdentifierNameSyntax identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue, StatementListSyntax body)
Parameters
Returns
NumericForStatement(SyntaxToken, IdentifierNameSyntax, SyntaxToken, ExpressionSyntax, SyntaxToken, ExpressionSyntax, SyntaxToken, Nullable<ExpressionSyntax>, SyntaxToken, StatementListSyntax, SyntaxToken, SyntaxToken)
Declaration
public static NumericForStatementSyntax NumericForStatement(SyntaxToken forKeyword, IdentifierNameSyntax identifier, SyntaxToken equalsToken, ExpressionSyntax initialValue, SyntaxToken finalValueCommaToken, ExpressionSyntax finalValue, SyntaxToken stepValueCommaToken, ExpressionSyntax? stepValue, SyntaxToken doKeyword, StatementListSyntax body, SyntaxToken endKeyword, SyntaxToken semicolonToken)
Parameters
Returns
Type |
Description |
NumericForStatementSyntax |
|
NumericForStatement(SyntaxToken, TypedIdentifierNameSyntax, SyntaxToken, ExpressionSyntax, SyntaxToken, ExpressionSyntax, SyntaxToken, ExpressionSyntax, SyntaxToken, StatementListSyntax, SyntaxToken, SyntaxToken)
Declaration
public static NumericForStatementSyntax NumericForStatement(SyntaxToken forKeyword, TypedIdentifierNameSyntax identifier, SyntaxToken equalsToken, ExpressionSyntax initialValue, SyntaxToken finalValueCommaToken, ExpressionSyntax finalValue, SyntaxToken stepValueCommaToken, ExpressionSyntax stepValue, SyntaxToken doKeyword, StatementListSyntax body, SyntaxToken endKeyword, SyntaxToken semicolonToken)
Parameters
Returns
NumericForStatement(String, ExpressionSyntax, ExpressionSyntax, Nullable<ExpressionSyntax>, StatementListSyntax)
Declaration
public static NumericForStatementSyntax NumericForStatement(string identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue, ExpressionSyntax? stepValue, StatementListSyntax body)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
ExpressionSyntax |
initialValue |
|
ExpressionSyntax |
finalValue |
|
System.Nullable<ExpressionSyntax> |
stepValue |
|
StatementListSyntax |
body |
|
Returns
Type |
Description |
NumericForStatementSyntax |
|
NumericForStatement(String, ExpressionSyntax, ExpressionSyntax, StatementListSyntax)
Creates a new NumericForStatementSyntax instance.
Declaration
public static NumericForStatementSyntax NumericForStatement(string identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue, StatementListSyntax body)
Parameters
Returns
ParameterList(SeparatedSyntaxList<ParameterSyntax>)
Creates a new ParameterListSyntax instance.
Declaration
public static ParameterListSyntax ParameterList(SeparatedSyntaxList<ParameterSyntax> parameters = default(SeparatedSyntaxList<ParameterSyntax>))
Parameters
Returns
ParameterList(SyntaxToken, SeparatedSyntaxList<ParameterSyntax>, SyntaxToken)
Declaration
public static ParameterListSyntax ParameterList(SyntaxToken openParenthesisToken, SeparatedSyntaxList<ParameterSyntax> parameters, SyntaxToken closeParenthesisToken)
Parameters
Returns
ParenthesizedExpression(ExpressionSyntax)
Creates a new ParenthesizedExpressionSyntax instance.
Declaration
public static ParenthesizedExpressionSyntax ParenthesizedExpression(ExpressionSyntax expression)
Parameters
Returns
ParenthesizedExpression(SyntaxToken, ExpressionSyntax, SyntaxToken)
Declaration
public static ParenthesizedExpressionSyntax ParenthesizedExpression(SyntaxToken openParenthesisToken, ExpressionSyntax expression, SyntaxToken closeParenthesisToken)
Parameters
Returns
ParenthesizedType(TypeSyntax)
Creates a new ParenthesizedTypeSyntax instance.
Declaration
public static ParenthesizedTypeSyntax ParenthesizedType(TypeSyntax type)
Parameters
Returns
ParenthesizedType(SyntaxToken, TypeSyntax, SyntaxToken)
Declaration
public static ParenthesizedTypeSyntax ParenthesizedType(SyntaxToken openParenthesisToken, TypeSyntax type, SyntaxToken closeParenthesisToken)
Parameters
Returns
ParseCompilationUnit(SourceText, LuaParseOptions)
Declaration
public static CompilationUnitSyntax ParseCompilationUnit(SourceText text, LuaParseOptions options = null)
Parameters
Type |
Name |
Description |
SourceText |
text |
The text of the compilation unit.
|
LuaParseOptions |
options |
The optional parse options to use. If no options are specified default options are
used.
|
Returns
Type |
Description |
CompilationUnitSyntax |
|
ParseCompilationUnit(String, Int32, LuaParseOptions)
Declaration
public static CompilationUnitSyntax ParseCompilationUnit(string text, int offset = 0, LuaParseOptions options = null)
Parameters
Type |
Name |
Description |
System.String |
text |
The text of the compilation unit.
|
System.Int32 |
offset |
Optional offset into text.
|
LuaParseOptions |
options |
The optional parse options to use. If no options are specified default options are
used.
|
Returns
Type |
Description |
CompilationUnitSyntax |
|
ParseExpression(SourceText, LuaParseOptions, Boolean)
Parse an ExpressionSyntax node using the lowest precedence grammar rule for expressions.
Declaration
public static ExpressionSyntax ParseExpression(SourceText text, LuaParseOptions options = null, bool consumeFullText = true)
Parameters
Type |
Name |
Description |
SourceText |
text |
The text of the expression.
|
LuaParseOptions |
options |
The optional parse options to use. If no options are specified default options are
used.
|
System.Boolean |
consumeFullText |
True if extra tokens in the input should be treated as an error
|
Returns
Type |
Description |
ExpressionSyntax |
|
ParseExpression(String, Int32, LuaParseOptions, Boolean)
Parse an ExpressionSyntax node using the lowest precedence grammar rule for expressions.
Declaration
public static ExpressionSyntax ParseExpression(string text, int offset = 0, LuaParseOptions options = null, bool consumeFullText = true)
Parameters
Type |
Name |
Description |
System.String |
text |
The text of the expression.
|
System.Int32 |
offset |
Optional offset into text.
|
LuaParseOptions |
options |
The optional parse options to use. If no options are specified default options are
used.
|
System.Boolean |
consumeFullText |
True if extra tokens in the input should be treated as an error
|
Returns
Type |
Description |
ExpressionSyntax |
|
ParseLeadingTrivia(SourceText, LuaParseOptions)
Parse a list of trivia rules for leading trivia.
Declaration
public static SyntaxTriviaList ParseLeadingTrivia(SourceText text, LuaParseOptions options)
Parameters
Returns
ParseLeadingTrivia(String, LuaParseOptions, Int32)
Parse a list of trivia rules for leading trivia.
Declaration
public static SyntaxTriviaList ParseLeadingTrivia(string text, LuaParseOptions options, int offset = 0)
Parameters
Type |
Name |
Description |
System.String |
text |
|
LuaParseOptions |
options |
|
System.Int32 |
offset |
|
Returns
ParseStatement(SourceText, LuaParseOptions, Boolean)
Parse a StatementSyntaxNode using grammar rule for statements.
Declaration
public static StatementSyntax ParseStatement(SourceText text, LuaParseOptions options = null, bool consumeFullText = true)
Parameters
Type |
Name |
Description |
SourceText |
text |
The text of the statement.
|
LuaParseOptions |
options |
The optional parse options to use. If no options are specified default options are
used.
|
System.Boolean |
consumeFullText |
True if extra tokens in the input should be treated as an error
|
Returns
Type |
Description |
StatementSyntax |
|
ParseStatement(String, Int32, LuaParseOptions, Boolean)
Parse a StatementSyntaxNode using grammar rule for statements.
Declaration
public static StatementSyntax ParseStatement(string text, int offset = 0, LuaParseOptions options = null, bool consumeFullText = true)
Parameters
Type |
Name |
Description |
System.String |
text |
The text of the statement.
|
System.Int32 |
offset |
Optional offset into text.
|
LuaParseOptions |
options |
The optional parse options to use. If no options are specified default options are
used.
|
System.Boolean |
consumeFullText |
True if extra tokens in the input should be treated as an error
|
Returns
Type |
Description |
StatementSyntax |
|
ParseSyntaxTree(SourceText, ParseOptions, String, CancellationToken)
Produces a syntax tree by parsing the source text.
Declaration
public static SyntaxTree ParseSyntaxTree(SourceText text, ParseOptions options = null, string path = "", CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
SourceText |
text |
|
ParseOptions |
options |
|
System.String |
path |
|
CancellationToken |
cancellationToken |
|
Returns
ParseSyntaxTree(String, ParseOptions, String, Nullable<Encoding>, CancellationToken)
Produces a syntax tree by parsing the source text.
Declaration
public static SyntaxTree ParseSyntaxTree(string text, ParseOptions options = null, string path = "", Encoding? encoding = null, CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
System.String |
text |
|
ParseOptions |
options |
|
System.String |
path |
|
System.Nullable<Encoding> |
encoding |
|
CancellationToken |
cancellationToken |
|
Returns
ParseToken(SourceText, LuaParseOptions)
Parse a Lua language token.
Declaration
public static SyntaxToken ParseToken(SourceText text, LuaParseOptions options = null)
Parameters
Type |
Name |
Description |
SourceText |
text |
The text of the token including leading and trailing trivia.
|
LuaParseOptions |
options |
Parse options.
|
Returns
ParseToken(String, Int32, LuaParseOptions)
Parse a Lua language token.
Declaration
public static SyntaxToken ParseToken(string text, int offset = 0, LuaParseOptions options = null)
Parameters
Type |
Name |
Description |
System.String |
text |
The text of the token including leading and trailing trivia.
|
System.Int32 |
offset |
Optional offset into text.
|
LuaParseOptions |
options |
Parse options.
|
Returns
ParseTokens(SourceText, Int32, LuaParseOptions)
Parse a sequence of Lua language tokens.
Declaration
public static IEnumerable<SyntaxToken> ParseTokens(SourceText text, int initialTokenPosition = 0, LuaParseOptions options = null)
Parameters
Type |
Name |
Description |
SourceText |
text |
The text of all the tokens.
|
System.Int32 |
initialTokenPosition |
An integer to use as the starting position of the first token.
|
LuaParseOptions |
options |
Parse options.
|
Returns
ParseTokens(String, Int32, Int32, LuaParseOptions)
Parse a sequence of Lua language tokens.
Declaration
public static IEnumerable<SyntaxToken> ParseTokens(string text, int offset = 0, int initialTokenPosition = 0, LuaParseOptions options = null)
Parameters
Type |
Name |
Description |
System.String |
text |
The text of all the tokens.
|
System.Int32 |
offset |
Optional offset into text.
|
System.Int32 |
initialTokenPosition |
An integer to use as the starting position of the first token.
|
LuaParseOptions |
options |
Parse options.
|
Returns
ParseTrailingTrivia(SourceText, LuaParseOptions)
Parse a list of trivia using the parsing rules for trailing trivia.
Declaration
public static SyntaxTriviaList ParseTrailingTrivia(SourceText text, LuaParseOptions options)
Parameters
Returns
ParseTrailingTrivia(String, LuaParseOptions, Int32)
Parse a list of trivia using the parsing rules for trailing trivia.
Declaration
public static SyntaxTriviaList ParseTrailingTrivia(string text, LuaParseOptions options, int offset = 0)
Parameters
Type |
Name |
Description |
System.String |
text |
|
LuaParseOptions |
options |
|
System.Int32 |
offset |
|
Returns
ParseType(SourceText, LuaParseOptions, Boolean)
Parse a using the grammar rule for types.
Declaration
public static TypeSyntax ParseType(SourceText text, LuaParseOptions options = null, bool consumeFullText = true)
Parameters
Type |
Name |
Description |
SourceText |
text |
The text of the type.
|
LuaParseOptions |
options |
The optional parse options to use.
If no options are specified default options are used.
|
System.Boolean |
consumeFullText |
Whether all text should be consumed and an error generated if it's not.
|
Returns
Type |
Description |
TypeSyntax |
|
ParseType(String, Int32, LuaParseOptions, Boolean)
Parse a using the grammar rule for types.
Declaration
public static TypeSyntax ParseType(string text, int offset = 0, LuaParseOptions options = null, bool consumeFullText = true)
Parameters
Type |
Name |
Description |
System.String |
text |
The text of the type.
|
System.Int32 |
offset |
Optional offset into text.
|
LuaParseOptions |
options |
The optional parse options to use.
If no options are specified default options are used.
|
System.Boolean |
consumeFullText |
Whether all text should be consumed and an error generated if it's not.
|
Returns
Type |
Description |
TypeSyntax |
|
RepeatUntilStatement(StatementListSyntax, ExpressionSyntax)
Creates a new RepeatUntilStatementSyntax instance.
Declaration
public static RepeatUntilStatementSyntax RepeatUntilStatement(StatementListSyntax body, ExpressionSyntax condition)
Parameters
Returns
RepeatUntilStatement(SyntaxToken, StatementListSyntax, SyntaxToken, ExpressionSyntax, SyntaxToken)
Declaration
public static RepeatUntilStatementSyntax RepeatUntilStatement(SyntaxToken repeatKeyword, StatementListSyntax body, SyntaxToken untilKeyword, ExpressionSyntax condition, SyntaxToken semicolonToken)
Parameters
Returns
ReturnStatement(SeparatedSyntaxList<ExpressionSyntax>)
Creates a new ReturnStatementSyntax instance.
Declaration
public static ReturnStatementSyntax ReturnStatement(SeparatedSyntaxList<ExpressionSyntax> expressions = default(SeparatedSyntaxList<ExpressionSyntax>))
Parameters
Returns
ReturnStatement(SyntaxToken, SeparatedSyntaxList<ExpressionSyntax>, SyntaxToken)
Declaration
public static ReturnStatementSyntax ReturnStatement(SyntaxToken returnKeyword, SeparatedSyntaxList<ExpressionSyntax> expressions, SyntaxToken semicolonToken)
Parameters
Returns
SeparatedList<TNode>()
Creates an empty separated list.
Declaration
public static SeparatedSyntaxList<TNode> SeparatedList<TNode>()
where TNode : SyntaxNode
Returns
Type Parameters
Name |
Description |
TNode |
The specific type of the element nodes.
|
SeparatedList<TNode>(IEnumerable<TNode>, IEnumerable<SyntaxToken>)
Creates a separated list of nodes from a sequence of nodes and a sequence of separator tokens.
Declaration
public static SeparatedSyntaxList<TNode> SeparatedList<TNode>(IEnumerable<TNode> nodes, IEnumerable<SyntaxToken> separators)
where TNode : SyntaxNode
Parameters
Type |
Name |
Description |
IEnumerable<TNode> |
nodes |
A sequence of syntax nodes.
|
IEnumerable<SyntaxToken> |
separators |
A sequence of token to be interleaved between the nodes. The number of tokens must
be one less than the number of nodes.
|
Returns
Type Parameters
Name |
Description |
TNode |
The specific type of the element nodes.
|
SeparatedList<TNode>(IEnumerable<SyntaxNodeOrToken>)
Creates a separated list from a sequence of nodes and tokens, starting with a node and alternating between additional nodes and separator tokens.
Declaration
public static SeparatedSyntaxList<TNode> SeparatedList<TNode>(IEnumerable<SyntaxNodeOrToken> nodesAndTokens)
where TNode : SyntaxNode
Parameters
Type |
Name |
Description |
IEnumerable<SyntaxNodeOrToken> |
nodesAndTokens |
A sequence of nodes or tokens, alternating between nodes and separator tokens.
|
Returns
Type Parameters
Name |
Description |
TNode |
The specific type of the element nodes.
|
SeparatedList<TNode>(SyntaxNodeOrTokenList)
Creates a separated list from a SyntaxNodeOrTokenList, where the list elements start with a node and then alternate between
additional nodes and separator tokens.
Declaration
public static SeparatedSyntaxList<TNode> SeparatedList<TNode>(SyntaxNodeOrTokenList nodesAndTokens)
where TNode : SyntaxNode
Parameters
Returns
Type Parameters
Name |
Description |
TNode |
The specific type of the element nodes.
|
SeparatedList<TNode>(Nullable<IEnumerable<TNode>>)
Creates a separated list of nodes from a sequence of nodes, synthesizing comma separators in between.
Declaration
public static SeparatedSyntaxList<TNode> SeparatedList<TNode>(IEnumerable<TNode>? nodes)
where TNode : SyntaxNode
Parameters
Type |
Name |
Description |
System.Nullable<IEnumerable<TNode>> |
nodes |
A sequence of syntax nodes.
|
Returns
Type Parameters
Name |
Description |
TNode |
The specific type of the element nodes.
|
SimpleFunctionName(SyntaxToken)
Declaration
public static SimpleFunctionNameSyntax SimpleFunctionName(SyntaxToken name)
Parameters
Returns
SimpleTypeName(SyntaxToken)
Creates a new SimpleTypeNameSyntax instance.
Declaration
public static SimpleTypeNameSyntax SimpleTypeName(SyntaxToken identifierToken)
Parameters
Returns
SimpleTypeName(SyntaxToken, TypeArgumentListSyntax)
Declaration
public static SimpleTypeNameSyntax SimpleTypeName(SyntaxToken identifierToken, TypeArgumentListSyntax typeArgumentList)
Parameters
Returns
SimpleTypeName(String)
Creates a new SimpleTypeNameSyntax instance.
Declaration
public static SimpleTypeNameSyntax SimpleTypeName(string identifierToken)
Parameters
Type |
Name |
Description |
System.String |
identifierToken |
|
Returns
SingletonList<TNode>(TNode)
Creates a singleton list of syntax nodes.
Declaration
public static SyntaxList<TNode> SingletonList<TNode>(TNode node)
where TNode : SyntaxNode
Parameters
Type |
Name |
Description |
TNode |
node |
The single element node.
|
Returns
Type Parameters
Name |
Description |
TNode |
The specific type of the element nodes.
|
SingletonSeparatedList<TNode>(TNode)
Creates a singleton separated list.
Declaration
public static SeparatedSyntaxList<TNode> SingletonSeparatedList<TNode>(TNode node)
where TNode : SyntaxNode
Parameters
Type |
Name |
Description |
TNode |
node |
A single node.
|
Returns
Type Parameters
Name |
Description |
TNode |
The specific type of the element nodes.
|
SkippedTokensTrivia()
Creates a new SkippedTokensTriviaSyntax instance.
Declaration
public static SkippedTokensTriviaSyntax SkippedTokensTrivia()
Returns
SkippedTokensTrivia(SyntaxTokenList)
Declaration
public static SkippedTokensTriviaSyntax SkippedTokensTrivia(SyntaxTokenList tokens)
Parameters
Returns
StatementList()
Creates a new StatementListSyntax instance.
Declaration
public static StatementListSyntax StatementList()
Returns
StatementList(IEnumerable<StatementSyntax>)
Declaration
public static StatementListSyntax StatementList(IEnumerable<StatementSyntax> statements)
Parameters
Type |
Name |
Description |
IEnumerable<StatementSyntax> |
statements |
|
Returns
Type |
Description |
StatementListSyntax |
|
StatementList(SyntaxList<StatementSyntax>)
Declaration
public static StatementListSyntax StatementList(SyntaxList<StatementSyntax> statements)
Parameters
Returns
StatementList(StatementSyntax[])
Declaration
public static StatementListSyntax StatementList(params StatementSyntax[] statements)
Parameters
Type |
Name |
Description |
StatementSyntax[] |
statements |
|
Returns
Type |
Description |
StatementListSyntax |
|
StringFunctionArgument(LiteralExpressionSyntax)
Declaration
public static StringFunctionArgumentSyntax StringFunctionArgument(LiteralExpressionSyntax expression)
Parameters
Returns
SyntaxTree(SyntaxNode, ParseOptions, String, Nullable<Encoding>)
Create a new syntax tree from a syntax node.
Declaration
public static SyntaxTree SyntaxTree(SyntaxNode root, ParseOptions options = null, string path = "", Encoding? encoding = null)
Parameters
Type |
Name |
Description |
SyntaxNode |
root |
|
ParseOptions |
options |
|
System.String |
path |
|
System.Nullable<Encoding> |
encoding |
|
Returns
SyntaxTrivia(SyntaxKind, String)
Trivia nodes represent parts of the program text that are not parts of the
syntactic grammar, such as spaces, newlines, shebangs and comments.
Declaration
public static SyntaxTrivia SyntaxTrivia(SyntaxKind kind, string text)
Parameters
Returns
TableConstructorExpression(SeparatedSyntaxList<TableFieldSyntax>)
Creates a new TableConstructorExpressionSyntax instance.
Declaration
public static TableConstructorExpressionSyntax TableConstructorExpression(SeparatedSyntaxList<TableFieldSyntax> fields = default(SeparatedSyntaxList<TableFieldSyntax>))
Parameters
Returns
TableConstructorExpression(SyntaxToken, SeparatedSyntaxList<TableFieldSyntax>, SyntaxToken)
Declaration
public static TableConstructorExpressionSyntax TableConstructorExpression(SyntaxToken openBraceToken, SeparatedSyntaxList<TableFieldSyntax> fields, SyntaxToken closeBraceToken)
Parameters
Returns
TableConstructorFunctionArgument(TableConstructorExpressionSyntax)
Declaration
public static TableConstructorFunctionArgumentSyntax TableConstructorFunctionArgument(TableConstructorExpressionSyntax tableConstructor)
Parameters
Returns
TableType(SeparatedSyntaxList<TableTypeElementSyntax>)
Creates a new TableTypeSyntax instance.
Declaration
public static TableTypeSyntax TableType(SeparatedSyntaxList<TableTypeElementSyntax> elements = default(SeparatedSyntaxList<TableTypeElementSyntax>))
Parameters
Returns
TableType(SyntaxToken, SeparatedSyntaxList<TableTypeElementSyntax>, SyntaxToken)
Declaration
public static TableTypeSyntax TableType(SyntaxToken openBraceToken, SeparatedSyntaxList<TableTypeElementSyntax> elements, SyntaxToken closeBraceToken)
Parameters
Returns
TableTypeIndexer(TypeSyntax, TypeSyntax)
Creates a new TableTypeIndexerSyntax instance.
Declaration
public static TableTypeIndexerSyntax TableTypeIndexer(TypeSyntax indexType, TypeSyntax valueType)
Parameters
Returns
TableTypeIndexer(SyntaxToken, TypeSyntax, SyntaxToken, SyntaxToken, TypeSyntax)
Declaration
public static TableTypeIndexerSyntax TableTypeIndexer(SyntaxToken openBracketToken, TypeSyntax indexType, SyntaxToken closeBracketToken, SyntaxToken colonToken, TypeSyntax valueType)
Parameters
Returns
TableTypeProperty(SyntaxToken, TypeSyntax)
Creates a new TableTypePropertySyntax instance.
Declaration
public static TableTypePropertySyntax TableTypeProperty(SyntaxToken identifier, TypeSyntax valueType)
Parameters
Returns
TableTypeProperty(SyntaxToken, SyntaxToken, TypeSyntax)
Declaration
public static TableTypePropertySyntax TableTypeProperty(SyntaxToken identifier, SyntaxToken colonToken, TypeSyntax valueType)
Parameters
Returns
TableTypeProperty(String, TypeSyntax)
Creates a new TableTypePropertySyntax instance.
Declaration
public static TableTypePropertySyntax TableTypeProperty(string identifier, TypeSyntax valueType)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
TypeSyntax |
valueType |
|
Returns
Token(SyntaxKind)
Creates a token corresponding to a syntax kind. This method can be used for token syntax kinds whose text
can be inferred by the kind alone.
Declaration
public static SyntaxToken Token(SyntaxKind kind)
Parameters
Type |
Name |
Description |
SyntaxKind |
kind |
A syntax kind value for a token. These have the suffix Token or Keyword.
|
Returns
Token(SyntaxTriviaList, SyntaxKind, SyntaxTriviaList)
Creates a token corresponding to syntax kind. This method can be used for token syntax kinds whose text can
be inferred by the kind alone.
Declaration
public static SyntaxToken Token(SyntaxTriviaList leading, SyntaxKind kind, SyntaxTriviaList trailing)
Parameters
Type |
Name |
Description |
SyntaxTriviaList |
leading |
A list of trivia immediately preceding the token.
|
SyntaxKind |
kind |
A syntax kind value for a token. These have the suffix Token or Keyword.
|
SyntaxTriviaList |
trailing |
A list of trivia immediately following the token.
|
Returns
Token(SyntaxTriviaList, SyntaxKind, String, String, SyntaxTriviaList)
Creates a token corresponding to syntax kind. This method gives control over token Text and ValueText.
Declaration
public static SyntaxToken Token(SyntaxTriviaList leading, SyntaxKind kind, string text, string valueText, SyntaxTriviaList trailing)
Parameters
Type |
Name |
Description |
SyntaxTriviaList |
leading |
A list of trivia immediately preceding the token.
|
SyntaxKind |
kind |
A syntax kind value for a token. These have the suffix Token or Keyword.
|
System.String |
text |
The text from which this token was created (e.g. lexed).
|
System.String |
valueText |
How Lua should interpret the text of this token.
|
SyntaxTriviaList |
trailing |
A list of trivia immediately following the token.
|
Returns
TokenList()
Creates an empty list of tokens.
Declaration
public static SyntaxTokenList TokenList()
Returns
TokenList(IEnumerable<SyntaxToken>)
Creates a list of tokens.
Declaration
public static SyntaxTokenList TokenList(IEnumerable<SyntaxToken> tokens)
Parameters
Returns
TokenList(SyntaxToken)
Creates a singleton list of tokens.
Declaration
public static SyntaxTokenList TokenList(SyntaxToken token)
Parameters
Type |
Name |
Description |
SyntaxToken |
token |
The single token.
|
Returns
TokenList(SyntaxToken[])
Creates a list of tokens.
Declaration
public static SyntaxTokenList TokenList(params SyntaxToken[] tokens)
Parameters
Type |
Name |
Description |
SyntaxToken[] |
tokens |
An array of tokens.
|
Returns
Trivia(StructuredTriviaSyntax)
Creates a trivia from a StructuredTriviaSyntax node.
Declaration
public static SyntaxTrivia Trivia(StructuredTriviaSyntax node)
Parameters
Type |
Name |
Description |
StructuredTriviaSyntax |
node |
|
Returns
TriviaList()
Creates an empty list of trivia.
Declaration
public static SyntaxTriviaList TriviaList()
Returns
TriviaList(IEnumerable<SyntaxTrivia>)
Creates a list of trivia.
Declaration
public static SyntaxTriviaList TriviaList(IEnumerable<SyntaxTrivia> trivias)
Parameters
Type |
Name |
Description |
IEnumerable<SyntaxTrivia> |
trivias |
A sequence of trivia.
|
Returns
TriviaList(SyntaxTrivia)
Creates a singleton list of trivia.
Declaration
public static SyntaxTriviaList TriviaList(SyntaxTrivia trivia)
Parameters
Returns
TriviaList(SyntaxTrivia[])
Creates a list of trivia.
Declaration
public static SyntaxTriviaList TriviaList(params SyntaxTrivia[] trivias)
Parameters
Type |
Name |
Description |
SyntaxTrivia[] |
trivias |
An array of trivia.
|
Returns
TypeArgumentList(SeparatedSyntaxList<TypeSyntax>)
Creates a new TypeArgumentListSyntax instance.
Declaration
public static TypeArgumentListSyntax TypeArgumentList(SeparatedSyntaxList<TypeSyntax> arguments = default(SeparatedSyntaxList<TypeSyntax>))
Parameters
Returns
TypeArgumentList(SyntaxToken, SeparatedSyntaxList<TypeSyntax>, SyntaxToken)
Declaration
public static TypeArgumentListSyntax TypeArgumentList(SyntaxToken lessThanToken, SeparatedSyntaxList<TypeSyntax> arguments, SyntaxToken greaterThanToken)
Parameters
Returns
TypeBinding(TypeSyntax)
Creates a new TypeBindingSyntax instance.
Declaration
public static TypeBindingSyntax TypeBinding(TypeSyntax type)
Parameters
Returns
TypeBinding(SyntaxToken, TypeSyntax)
Declaration
public static TypeBindingSyntax TypeBinding(SyntaxToken colonToken, TypeSyntax type)
Parameters
Returns
TypeCastExpression(ExpressionSyntax, TypeSyntax)
Creates a new TypeCastExpressionSyntax instance.
Declaration
public static TypeCastExpressionSyntax TypeCastExpression(ExpressionSyntax expression, TypeSyntax type)
Parameters
Returns
TypeCastExpression(ExpressionSyntax, SyntaxToken, TypeSyntax)
Declaration
public static TypeCastExpressionSyntax TypeCastExpression(ExpressionSyntax expression, SyntaxToken colonColonToken, TypeSyntax type)
Parameters
Returns
TypeDeclarationStatement(SyntaxToken, TypeParameterListSyntax, TypeSyntax)
Creates a new TypeDeclarationStatementSyntax instance.
Declaration
public static TypeDeclarationStatementSyntax TypeDeclarationStatement(SyntaxToken name, TypeParameterListSyntax typeParameterList, TypeSyntax type)
Parameters
Returns
TypeDeclarationStatement(SyntaxToken, TypeSyntax)
Creates a new TypeDeclarationStatementSyntax instance.
Declaration
public static TypeDeclarationStatementSyntax TypeDeclarationStatement(SyntaxToken name, TypeSyntax type)
Parameters
Returns
TypeDeclarationStatement(SyntaxToken, SyntaxToken, SyntaxToken, TypeParameterListSyntax, SyntaxToken, TypeSyntax, SyntaxToken)
Declaration
public static TypeDeclarationStatementSyntax TypeDeclarationStatement(SyntaxToken exportKeyword, SyntaxToken typeKeyword, SyntaxToken name, TypeParameterListSyntax typeParameterList, SyntaxToken equalsToken, TypeSyntax type, SyntaxToken semicolonToken)
Parameters
Returns
TypeDeclarationStatement(String, TypeSyntax)
Creates a new TypeDeclarationStatementSyntax instance.
Declaration
public static TypeDeclarationStatementSyntax TypeDeclarationStatement(string name, TypeSyntax type)
Parameters
Type |
Name |
Description |
System.String |
name |
|
TypeSyntax |
type |
|
Returns
TypedIdentifierName(IdentifierNameSyntax)
Creates a new TypedIdentifierNameSyntax instance.
Declaration
public static TypedIdentifierNameSyntax TypedIdentifierName(IdentifierNameSyntax identifierName)
Parameters
Returns
TypedIdentifierName(IdentifierNameSyntax, TypeBindingSyntax)
Declaration
public static TypedIdentifierNameSyntax TypedIdentifierName(IdentifierNameSyntax identifierName, TypeBindingSyntax typeBinding)
Parameters
Returns
TypedIdentifierName(String)
Creates a new TypedIdentifierNameSyntax instance.
Declaration
public static TypedIdentifierNameSyntax TypedIdentifierName(string identifierName)
Parameters
Type |
Name |
Description |
System.String |
identifierName |
|
Returns
TypeofType(ExpressionSyntax)
Creates a new TypeofTypeSyntax instance.
Declaration
public static TypeofTypeSyntax TypeofType(ExpressionSyntax expression)
Parameters
Returns
TypeofType(SyntaxToken, SyntaxToken, ExpressionSyntax, SyntaxToken)
Declaration
public static TypeofTypeSyntax TypeofType(SyntaxToken typeofKeyword, SyntaxToken openParenthesisToken, ExpressionSyntax expression, SyntaxToken closeParenthesisToken)
Parameters
Returns
TypePack(SeparatedSyntaxList<TypeSyntax>)
Creates a new TypePackSyntax instance.
Declaration
public static TypePackSyntax TypePack(SeparatedSyntaxList<TypeSyntax> types = default(SeparatedSyntaxList<TypeSyntax>))
Parameters
Returns
TypePack(SyntaxToken, SeparatedSyntaxList<TypeSyntax>, SyntaxToken)
Declaration
public static TypePackSyntax TypePack(SyntaxToken openParenthesisToken, SeparatedSyntaxList<TypeSyntax> types, SyntaxToken closeParenthesisToken)
Parameters
Returns
TypeParameter(SyntaxToken)
Creates a new TypeParameterSyntax instance.
Declaration
public static TypeParameterSyntax TypeParameter(SyntaxToken identifier)
Parameters
Returns
TypeParameter(SyntaxToken, EqualsTypeSyntax)
Creates a new TypeParameterSyntax instance.
Declaration
public static TypeParameterSyntax TypeParameter(SyntaxToken identifier, EqualsTypeSyntax equalsType)
Parameters
Returns
TypeParameter(SyntaxToken, SyntaxToken, EqualsTypeSyntax)
Declaration
public static TypeParameterSyntax TypeParameter(SyntaxToken identifier, SyntaxToken dotDotDotToken, EqualsTypeSyntax equalsType)
Parameters
Returns
TypeParameter(String)
Creates a new TypeParameterSyntax instance.
Declaration
public static TypeParameterSyntax TypeParameter(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
Returns
TypeParameterList(SeparatedSyntaxList<TypeParameterSyntax>)
Creates a new TypeParameterListSyntax instance.
Declaration
public static TypeParameterListSyntax TypeParameterList(SeparatedSyntaxList<TypeParameterSyntax> names = default(SeparatedSyntaxList<TypeParameterSyntax>))
Parameters
Returns
TypeParameterList(SyntaxToken, SeparatedSyntaxList<TypeParameterSyntax>, SyntaxToken)
Declaration
public static TypeParameterListSyntax TypeParameterList(SyntaxToken lessThanToken, SeparatedSyntaxList<TypeParameterSyntax> names, SyntaxToken greaterThanToken)
Parameters
Returns
UnaryExpression(SyntaxKind, SyntaxToken, ExpressionSyntax)
Declaration
public static UnaryExpressionSyntax UnaryExpression(SyntaxKind kind, SyntaxToken operatorToken, ExpressionSyntax operand)
Parameters
Returns
UnionType(TypeSyntax, TypeSyntax)
Creates a new UnionTypeSyntax instance.
Declaration
public static UnionTypeSyntax UnionType(TypeSyntax left, TypeSyntax right)
Parameters
Returns
UnionType(TypeSyntax, SyntaxToken, TypeSyntax)
Declaration
public static UnionTypeSyntax UnionType(TypeSyntax left, SyntaxToken pipeToken, TypeSyntax right)
Parameters
Returns
UnkeyedTableField(ExpressionSyntax)
Declaration
public static UnkeyedTableFieldSyntax UnkeyedTableField(ExpressionSyntax value)
Parameters
Returns
VarArgExpression()
Creates a new VarArgExpressionSyntax instance.
Declaration
public static VarArgExpressionSyntax VarArgExpression()
Returns
VarArgExpression(SyntaxToken)
Declaration
public static VarArgExpressionSyntax VarArgExpression(SyntaxToken varArgToken)
Parameters
Returns
VarArgParameter(TypeBindingSyntax)
Creates a new VarArgParameterSyntax instance.
Declaration
public static VarArgParameterSyntax VarArgParameter(TypeBindingSyntax typeBinding = null)
Parameters
Returns
VarArgParameter(SyntaxToken, TypeBindingSyntax)
Declaration
public static VarArgParameterSyntax VarArgParameter(SyntaxToken varArgToken, TypeBindingSyntax typeBinding)
Parameters
Returns
VariableAttribute(SyntaxToken)
Creates a new VariableAttributeSyntax instance.
Declaration
public static VariableAttributeSyntax VariableAttribute(SyntaxToken identifier)
Parameters
Returns
VariableAttribute(SyntaxToken, SyntaxToken, SyntaxToken)
Declaration
public static VariableAttributeSyntax VariableAttribute(SyntaxToken lessThanToken, SyntaxToken identifier, SyntaxToken greaterThanToken)
Parameters
Returns
VariableAttribute(String)
Creates a new VariableAttributeSyntax instance.
Declaration
public static VariableAttributeSyntax VariableAttribute(string identifier)
Parameters
Type |
Name |
Description |
System.String |
identifier |
|
Returns
VariadicTypePack(TypeSyntax)
Creates a new VariadicTypePackSyntax instance.
Declaration
public static VariadicTypePackSyntax VariadicTypePack(TypeSyntax type)
Parameters
Returns
VariadicTypePack(SyntaxToken, TypeSyntax)
Declaration
public static VariadicTypePackSyntax VariadicTypePack(SyntaxToken dotDotDotToken, TypeSyntax type)
Parameters
Returns
WhileStatement(ExpressionSyntax, StatementListSyntax)
Creates a new WhileStatementSyntax instance.
Declaration
public static WhileStatementSyntax WhileStatement(ExpressionSyntax condition, StatementListSyntax body)
Parameters
Returns
WhileStatement(SyntaxToken, ExpressionSyntax, SyntaxToken, StatementListSyntax, SyntaxToken, SyntaxToken)
Declaration
public static WhileStatementSyntax WhileStatement(SyntaxToken whileKeyword, ExpressionSyntax condition, SyntaxToken doKeyword, StatementListSyntax body, SyntaxToken endKeyword, SyntaxToken semicolonToken)
Parameters
Returns
Whitespace(String)
Creates a trivia with kind WhitespaceTrivia containing the specified text.
Declaration
public static SyntaxTrivia Whitespace(string text)
Parameters
Type |
Name |
Description |
System.String |
text |
The text of the whitespace. Any text can be specified here, however only specific
whitespace characters are recognized by the parser.
|
Returns