Search Results for

    Show / Hide Table of Contents

    Class SyntaxFactory

    A class containing factory methods for constructing syntax nodes, tokens and trivia.

    Inheritance
    System.Object
    SyntaxFactory
    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()
    Namespace: Loretta.CodeAnalysis.Lua
    Assembly: Loretta.CodeAnalysis.Lua.dll
    Syntax
    public static class SyntaxFactory

    Properties

    | Improve this Doc View Source

    CarriageReturn

    A trivia with kind EndOfLineTrivia containing a single carriage return character.

    Declaration
    public static SyntaxTrivia CarriageReturn { get; }
    Property Value
    Type Description
    SyntaxTrivia
    | Improve this Doc View Source

    CarriageReturnLineFeed

    A trivia with kind EndOfLineTrivia containing both the carriage return and line feed characters.

    Declaration
    public static SyntaxTrivia CarriageReturnLineFeed { get; }
    Property Value
    Type Description
    SyntaxTrivia
    | Improve this Doc View Source

    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
    Type Description
    SyntaxTrivia
    | Improve this Doc View Source

    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
    Type Description
    SyntaxTrivia
    | Improve this Doc View Source

    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
    Type Description
    SyntaxTrivia
    | Improve this Doc View Source

    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
    Type Description
    SyntaxTrivia
    | Improve this Doc View Source

    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
    Type Description
    SyntaxTrivia
    | Improve this Doc View Source

    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
    Type Description
    SyntaxTrivia
    | Improve this Doc View Source

    LineFeed

    A trivia with kind EndOfLineTrivia containing a single line feed character.

    Declaration
    public static SyntaxTrivia LineFeed { get; }
    Property Value
    Type Description
    SyntaxTrivia
    | Improve this Doc View Source

    Space

    A trivia with kind WhitespaceTrivia containing a single space character.

    Declaration
    public static SyntaxTrivia Space { get; }
    Property Value
    Type Description
    SyntaxTrivia
    | Improve this Doc View Source

    Tab

    A trivia with kind WhitespaceTrivia containing a single tab character.

    Declaration
    public static SyntaxTrivia Tab { get; }
    Property Value
    Type Description
    SyntaxTrivia

    Methods

    | Improve this Doc View Source

    AnonymousFunctionExpression(ParameterListSyntax, StatementListSyntax)

    Creates a new AnonymousFunctionExpressionSyntax instance.

    Declaration
    public static AnonymousFunctionExpressionSyntax AnonymousFunctionExpression(ParameterListSyntax parameters, StatementListSyntax body)
    Parameters
    Type Name Description
    ParameterListSyntax parameters
    StatementListSyntax body
    Returns
    Type Description
    AnonymousFunctionExpressionSyntax
    | Improve this Doc View Source

    AnonymousFunctionExpression(TypeParameterListSyntax, ParameterListSyntax, TypeBindingSyntax, StatementListSyntax)

    Creates a new AnonymousFunctionExpressionSyntax instance.

    Declaration
    public static AnonymousFunctionExpressionSyntax AnonymousFunctionExpression(TypeParameterListSyntax typeParameterList, ParameterListSyntax parameters, TypeBindingSyntax typeBinding, StatementListSyntax body)
    Parameters
    Type Name Description
    TypeParameterListSyntax typeParameterList
    ParameterListSyntax parameters
    TypeBindingSyntax typeBinding
    StatementListSyntax body
    Returns
    Type Description
    AnonymousFunctionExpressionSyntax
    | Improve this Doc View Source

    AnonymousFunctionExpression(SyntaxToken, TypeParameterListSyntax, ParameterListSyntax, TypeBindingSyntax, StatementListSyntax, SyntaxToken)

    Creates a new AnonymousFunctionExpressionSyntax node.

    Declaration
    public static AnonymousFunctionExpressionSyntax AnonymousFunctionExpression(SyntaxToken functionKeyword, TypeParameterListSyntax typeParameterList, ParameterListSyntax parameters, TypeBindingSyntax typeBinding, StatementListSyntax body, SyntaxToken endKeyword)
    Parameters
    Type Name Description
    SyntaxToken functionKeyword
    TypeParameterListSyntax typeParameterList
    ParameterListSyntax parameters
    TypeBindingSyntax typeBinding
    StatementListSyntax body
    SyntaxToken endKeyword
    Returns
    Type Description
    AnonymousFunctionExpressionSyntax
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    AreEquivalent(SyntaxToken, SyntaxToken)

    Determines if two syntax tokens are the same, disregarding trivia differences.

    Declaration
    public static bool AreEquivalent(SyntaxToken oldToken, SyntaxToken newToken)
    Parameters
    Type Name Description
    SyntaxToken oldToken

    The old token.

    SyntaxToken newToken

    The new token.

    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    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
    Type Name Description
    SyntaxTokenList oldList

    The old token list.

    SyntaxTokenList newList

    The new token list.

    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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
    Name Description
    TNode
    | Improve this Doc View Source

    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
    Name Description
    TNode
    | Improve this Doc View Source

    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
    Name Description
    TNode
    | Improve this Doc View Source

    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
    Name Description
    TNode
    | Improve this Doc View Source

    ArrayType(TypeSyntax)

    Creates a new ArrayTypeSyntax instance.

    Declaration
    public static ArrayTypeSyntax ArrayType(TypeSyntax type)
    Parameters
    Type Name Description
    TypeSyntax type
    Returns
    Type Description
    ArrayTypeSyntax
    | Improve this Doc View Source

    ArrayType(SyntaxToken, TypeSyntax, SyntaxToken)

    Creates a new ArrayTypeSyntax node.

    Declaration
    public static ArrayTypeSyntax ArrayType(SyntaxToken openBraceToken, TypeSyntax type, SyntaxToken closeBraceToken)
    Parameters
    Type Name Description
    SyntaxToken openBraceToken
    TypeSyntax type
    SyntaxToken closeBraceToken
    Returns
    Type Description
    ArrayTypeSyntax
    | Improve this Doc View Source

    AssignmentStatement(SeparatedSyntaxList<PrefixExpressionSyntax>, EqualsValuesClauseSyntax)

    Creates a new AssignmentStatementSyntax instance.

    Declaration
    public static AssignmentStatementSyntax AssignmentStatement(SeparatedSyntaxList<PrefixExpressionSyntax> variables, EqualsValuesClauseSyntax equalsValues)
    Parameters
    Type Name Description
    SeparatedSyntaxList<PrefixExpressionSyntax> variables
    EqualsValuesClauseSyntax equalsValues
    Returns
    Type Description
    AssignmentStatementSyntax
    | Improve this Doc View Source

    AssignmentStatement(SeparatedSyntaxList<PrefixExpressionSyntax>, EqualsValuesClauseSyntax, SyntaxToken)

    Creates a new AssignmentStatementSyntax node.

    Declaration
    public static AssignmentStatementSyntax AssignmentStatement(SeparatedSyntaxList<PrefixExpressionSyntax> variables, EqualsValuesClauseSyntax equalsValues, SyntaxToken semicolonToken)
    Parameters
    Type Name Description
    SeparatedSyntaxList<PrefixExpressionSyntax> variables
    EqualsValuesClauseSyntax equalsValues
    SyntaxToken semicolonToken
    Returns
    Type Description
    AssignmentStatementSyntax
    | Improve this Doc View Source

    AssignmentStatement(SeparatedSyntaxList<PrefixExpressionSyntax>, SeparatedSyntaxList<ExpressionSyntax>)

    Creates a new AssignmentStatementSyntax node.

    Declaration
    public static AssignmentStatementSyntax AssignmentStatement(SeparatedSyntaxList<PrefixExpressionSyntax> variables, SeparatedSyntaxList<ExpressionSyntax> values)
    Parameters
    Type Name Description
    SeparatedSyntaxList<PrefixExpressionSyntax> variables
    SeparatedSyntaxList<ExpressionSyntax> values
    Returns
    Type Description
    AssignmentStatementSyntax
    | Improve this Doc View Source

    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
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    BinaryExpression(SyntaxKind, ExpressionSyntax, SyntaxToken, ExpressionSyntax)

    Creates a new BinaryExpressionSyntax node.

    Declaration
    public static BinaryExpressionSyntax BinaryExpression(SyntaxKind kind, ExpressionSyntax left, SyntaxToken operatorToken, ExpressionSyntax right)
    Parameters
    Type Name Description
    SyntaxKind kind
    ExpressionSyntax left
    SyntaxToken operatorToken
    ExpressionSyntax right
    Returns
    Type Description
    BinaryExpressionSyntax
    | Improve this Doc View Source

    BreakStatement()

    Creates a new BreakStatementSyntax instance.

    Declaration
    public static BreakStatementSyntax BreakStatement()
    Returns
    Type Description
    BreakStatementSyntax
    | Improve this Doc View Source

    BreakStatement(SyntaxToken, SyntaxToken)

    Creates a new BreakStatementSyntax node.

    Declaration
    public static BreakStatementSyntax BreakStatement(SyntaxToken breakKeyword, SyntaxToken semicolonToken)
    Parameters
    Type Name Description
    SyntaxToken breakKeyword
    SyntaxToken semicolonToken
    Returns
    Type Description
    BreakStatementSyntax
    | Improve this Doc View Source

    Comment(String)

    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
    Type Description
    SyntaxTrivia
    | Improve this Doc View Source

    CompilationUnit(StatementListSyntax)

    Creates a new CompilationUnitSyntax instance.

    Declaration
    public static CompilationUnitSyntax CompilationUnit(StatementListSyntax statements)
    Parameters
    Type Name Description
    StatementListSyntax statements
    Returns
    Type Description
    CompilationUnitSyntax
    | Improve this Doc View Source

    CompilationUnit(StatementListSyntax, SyntaxToken)

    Creates a new CompilationUnitSyntax node.

    Declaration
    public static CompilationUnitSyntax CompilationUnit(StatementListSyntax statements, SyntaxToken endOfFileToken)
    Parameters
    Type Name Description
    StatementListSyntax statements
    SyntaxToken endOfFileToken
    Returns
    Type Description
    CompilationUnitSyntax
    | Improve this Doc View Source

    CompositeTypeName(TypeNameSyntax, SyntaxToken)

    Creates a new CompositeTypeNameSyntax instance.

    Declaration
    public static CompositeTypeNameSyntax CompositeTypeName(TypeNameSyntax base, SyntaxToken identifierToken)
    Parameters
    Type Name Description
    TypeNameSyntax base
    SyntaxToken identifierToken
    Returns
    Type Description
    CompositeTypeNameSyntax
    | Improve this Doc View Source

    CompositeTypeName(TypeNameSyntax, SyntaxToken, TypeArgumentListSyntax)

    Creates a new CompositeTypeNameSyntax instance.

    Declaration
    public static CompositeTypeNameSyntax CompositeTypeName(TypeNameSyntax base, SyntaxToken identifierToken, TypeArgumentListSyntax typeArgumentList)
    Parameters
    Type Name Description
    TypeNameSyntax base
    SyntaxToken identifierToken
    TypeArgumentListSyntax typeArgumentList
    Returns
    Type Description
    CompositeTypeNameSyntax
    | Improve this Doc View Source

    CompositeTypeName(TypeNameSyntax, SyntaxToken, SyntaxToken, TypeArgumentListSyntax)

    Creates a new CompositeTypeNameSyntax node.

    Declaration
    public static CompositeTypeNameSyntax CompositeTypeName(TypeNameSyntax base, SyntaxToken dotToken, SyntaxToken identifierToken, TypeArgumentListSyntax typeArgumentList)
    Parameters
    Type Name Description
    TypeNameSyntax base
    SyntaxToken dotToken
    SyntaxToken identifierToken
    TypeArgumentListSyntax typeArgumentList
    Returns
    Type Description
    CompositeTypeNameSyntax
    | Improve this Doc View Source

    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
    Type Description
    CompositeTypeNameSyntax
    | Improve this Doc View Source

    CompoundAssignmentStatement(SyntaxKind, PrefixExpressionSyntax, ExpressionSyntax)

    Creates a new CompoundAssignmentStatementSyntax instance.

    Declaration
    public static CompoundAssignmentStatementSyntax CompoundAssignmentStatement(SyntaxKind kind, PrefixExpressionSyntax variable, ExpressionSyntax expression)
    Parameters
    Type Name Description
    SyntaxKind kind
    PrefixExpressionSyntax variable
    ExpressionSyntax expression
    Returns
    Type Description
    CompoundAssignmentStatementSyntax
    | Improve this Doc View Source

    CompoundAssignmentStatement(SyntaxKind, PrefixExpressionSyntax, SyntaxToken, ExpressionSyntax, SyntaxToken)

    Creates a new CompoundAssignmentStatementSyntax node.

    Declaration
    public static CompoundAssignmentStatementSyntax CompoundAssignmentStatement(SyntaxKind kind, PrefixExpressionSyntax variable, SyntaxToken assignmentOperatorToken, ExpressionSyntax expression, SyntaxToken semicolonToken)
    Parameters
    Type Name Description
    SyntaxKind kind
    PrefixExpressionSyntax variable
    SyntaxToken assignmentOperatorToken
    ExpressionSyntax expression
    SyntaxToken semicolonToken
    Returns
    Type Description
    CompoundAssignmentStatementSyntax
    | Improve this Doc View Source

    ContinueStatement()

    Creates a new ContinueStatementSyntax instance.

    Declaration
    public static ContinueStatementSyntax ContinueStatement()
    Returns
    Type Description
    ContinueStatementSyntax
    | Improve this Doc View Source

    ContinueStatement(SyntaxToken, SyntaxToken)

    Creates a new ContinueStatementSyntax node.

    Declaration
    public static ContinueStatementSyntax ContinueStatement(SyntaxToken continueKeyword, SyntaxToken semicolonToken)
    Parameters
    Type Name Description
    SyntaxToken continueKeyword
    SyntaxToken semicolonToken
    Returns
    Type Description
    ContinueStatementSyntax
    | Improve this Doc View Source

    DoStatement(StatementListSyntax)

    Creates a new DoStatementSyntax instance.

    Declaration
    public static DoStatementSyntax DoStatement(StatementListSyntax body)
    Parameters
    Type Name Description
    StatementListSyntax body
    Returns
    Type Description
    DoStatementSyntax
    | Improve this Doc View Source

    DoStatement(SyntaxToken, StatementListSyntax, SyntaxToken, SyntaxToken)

    Creates a new DoStatementSyntax node.

    Declaration
    public static DoStatementSyntax DoStatement(SyntaxToken doKeyword, StatementListSyntax body, SyntaxToken endKeyword, SyntaxToken semicolonToken)
    Parameters
    Type Name Description
    SyntaxToken doKeyword
    StatementListSyntax body
    SyntaxToken endKeyword
    SyntaxToken semicolonToken
    Returns
    Type Description
    DoStatementSyntax
    | Improve this Doc View Source

    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
    Type Description
    SyntaxTrivia
    | Improve this Doc View Source

    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
    Type Description
    SyntaxTrivia
    | Improve this Doc View Source

    ElementAccessExpression(PrefixExpressionSyntax, ExpressionSyntax)

    Creates a new ElementAccessExpressionSyntax instance.

    Declaration
    public static ElementAccessExpressionSyntax ElementAccessExpression(PrefixExpressionSyntax expression, ExpressionSyntax keyExpression)
    Parameters
    Type Name Description
    PrefixExpressionSyntax expression
    ExpressionSyntax keyExpression
    Returns
    Type Description
    ElementAccessExpressionSyntax
    | Improve this Doc View Source

    ElementAccessExpression(PrefixExpressionSyntax, SyntaxToken, ExpressionSyntax, SyntaxToken)

    Creates a new ElementAccessExpressionSyntax node.

    Declaration
    public static ElementAccessExpressionSyntax ElementAccessExpression(PrefixExpressionSyntax expression, SyntaxToken openBracketToken, ExpressionSyntax keyExpression, SyntaxToken closeBracketToken)
    Parameters
    Type Name Description
    PrefixExpressionSyntax expression
    SyntaxToken openBracketToken
    ExpressionSyntax keyExpression
    SyntaxToken closeBracketToken
    Returns
    Type Description
    ElementAccessExpressionSyntax
    | Improve this Doc View Source

    ElseClause(StatementListSyntax)

    Creates a new ElseClauseSyntax instance.

    Declaration
    public static ElseClauseSyntax ElseClause(StatementListSyntax elseBody)
    Parameters
    Type Name Description
    StatementListSyntax elseBody
    Returns
    Type Description
    ElseClauseSyntax
    | Improve this Doc View Source

    ElseClause(SyntaxToken, StatementListSyntax)

    Creates a new ElseClauseSyntax comment.

    Declaration
    public static ElseClauseSyntax ElseClause(SyntaxToken elseKeyword, StatementListSyntax elseBody)
    Parameters
    Type Name Description
    SyntaxToken elseKeyword
    StatementListSyntax elseBody
    Returns
    Type Description
    ElseClauseSyntax
    | Improve this Doc View Source

    ElseIfClause(ExpressionSyntax, StatementListSyntax)

    Creates a new ElseIfClauseSyntax instance.

    Declaration
    public static ElseIfClauseSyntax ElseIfClause(ExpressionSyntax condition, StatementListSyntax body)
    Parameters
    Type Name Description
    ExpressionSyntax condition
    StatementListSyntax body
    Returns
    Type Description
    ElseIfClauseSyntax
    | Improve this Doc View Source

    ElseIfClause(SyntaxToken, ExpressionSyntax, SyntaxToken, StatementListSyntax)

    Creates a new ElseIfClauseSyntax node.

    Declaration
    public static ElseIfClauseSyntax ElseIfClause(SyntaxToken elseIfKeyword, ExpressionSyntax condition, SyntaxToken thenKeyword, StatementListSyntax body)
    Parameters
    Type Name Description
    SyntaxToken elseIfKeyword
    ExpressionSyntax condition
    SyntaxToken thenKeyword
    StatementListSyntax body
    Returns
    Type Description
    ElseIfClauseSyntax
    | Improve this Doc View Source

    ElseIfExpressionClause(ExpressionSyntax, ExpressionSyntax)

    Creates a new ElseIfExpressionClauseSyntax instance.

    Declaration
    public static ElseIfExpressionClauseSyntax ElseIfExpressionClause(ExpressionSyntax condition, ExpressionSyntax value)
    Parameters
    Type Name Description
    ExpressionSyntax condition
    ExpressionSyntax value
    Returns
    Type Description
    ElseIfExpressionClauseSyntax
    | Improve this Doc View Source

    ElseIfExpressionClause(SyntaxToken, ExpressionSyntax, SyntaxToken, ExpressionSyntax)

    Creates a new ElseIfExpressionClauseSyntax node.

    Declaration
    public static ElseIfExpressionClauseSyntax ElseIfExpressionClause(SyntaxToken elseIfKeyword, ExpressionSyntax condition, SyntaxToken thenKeyword, ExpressionSyntax value)
    Parameters
    Type Name Description
    SyntaxToken elseIfKeyword
    ExpressionSyntax condition
    SyntaxToken thenKeyword
    ExpressionSyntax value
    Returns
    Type Description
    ElseIfExpressionClauseSyntax
    | Improve this Doc View Source

    EmptyStatement()

    Creates a new EmptyStatementSyntax instance.

    Declaration
    public static EmptyStatementSyntax EmptyStatement()
    Returns
    Type Description
    EmptyStatementSyntax
    | Improve this Doc View Source

    EmptyStatement(SyntaxToken)

    Creates a new EmptyStatementSyntax node.

    Declaration
    public static EmptyStatementSyntax EmptyStatement(SyntaxToken semicolonToken)
    Parameters
    Type Name Description
    SyntaxToken semicolonToken
    Returns
    Type Description
    EmptyStatementSyntax
    | Improve this Doc View Source

    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
    Type Description
    SyntaxTrivia
    | Improve this Doc View Source

    EqualsType(TypeSyntax)

    Creates a new EqualsTypeSyntax instance.

    Declaration
    public static EqualsTypeSyntax EqualsType(TypeSyntax type)
    Parameters
    Type Name Description
    TypeSyntax type
    Returns
    Type Description
    EqualsTypeSyntax
    | Improve this Doc View Source

    EqualsType(SyntaxToken, TypeSyntax)

    Creates a new EqualsTypeSyntax node.

    Declaration
    public static EqualsTypeSyntax EqualsType(SyntaxToken equalsToken, TypeSyntax type)
    Parameters
    Type Name Description
    SyntaxToken equalsToken
    TypeSyntax type
    Returns
    Type Description
    EqualsTypeSyntax
    | Improve this Doc View Source

    EqualsValuesClause(SeparatedSyntaxList<ExpressionSyntax>)

    Creates a new EqualsValuesClauseSyntax instance.

    Declaration
    public static EqualsValuesClauseSyntax EqualsValuesClause(SeparatedSyntaxList<ExpressionSyntax> values)
    Parameters
    Type Name Description
    SeparatedSyntaxList<ExpressionSyntax> values
    Returns
    Type Description
    EqualsValuesClauseSyntax
    | Improve this Doc View Source

    EqualsValuesClause(SyntaxToken, SeparatedSyntaxList<ExpressionSyntax>)

    Creates a new EqualsValuesClauseSyntax node.

    Declaration
    public static EqualsValuesClauseSyntax EqualsValuesClause(SyntaxToken equalsToken, SeparatedSyntaxList<ExpressionSyntax> values)
    Parameters
    Type Name Description
    SyntaxToken equalsToken
    SeparatedSyntaxList<ExpressionSyntax> values
    Returns
    Type Description
    EqualsValuesClauseSyntax
    | Improve this Doc View Source

    ExpressionKeyedTableField(ExpressionSyntax, ExpressionSyntax)

    Creates a new ExpressionKeyedTableFieldSyntax instance.

    Declaration
    public static ExpressionKeyedTableFieldSyntax ExpressionKeyedTableField(ExpressionSyntax key, ExpressionSyntax value)
    Parameters
    Type Name Description
    ExpressionSyntax key
    ExpressionSyntax value
    Returns
    Type Description
    ExpressionKeyedTableFieldSyntax
    | Improve this Doc View Source

    ExpressionKeyedTableField(SyntaxToken, ExpressionSyntax, SyntaxToken, SyntaxToken, ExpressionSyntax)

    Creates a new ExpressionKeyedTableFieldSyntax node.

    Declaration
    public static ExpressionKeyedTableFieldSyntax ExpressionKeyedTableField(SyntaxToken openBracketToken, ExpressionSyntax key, SyntaxToken closeBracketToken, SyntaxToken equalsToken, ExpressionSyntax value)
    Parameters
    Type Name Description
    SyntaxToken openBracketToken
    ExpressionSyntax key
    SyntaxToken closeBracketToken
    SyntaxToken equalsToken
    ExpressionSyntax value
    Returns
    Type Description
    ExpressionKeyedTableFieldSyntax
    | Improve this Doc View Source

    ExpressionListFunctionArgument(SeparatedSyntaxList<ExpressionSyntax>)

    Creates a new ExpressionListFunctionArgumentSyntax instance.

    Declaration
    public static ExpressionListFunctionArgumentSyntax ExpressionListFunctionArgument(SeparatedSyntaxList<ExpressionSyntax> expressions = default(SeparatedSyntaxList<ExpressionSyntax>))
    Parameters
    Type Name Description
    SeparatedSyntaxList<ExpressionSyntax> expressions
    Returns
    Type Description
    ExpressionListFunctionArgumentSyntax
    | Improve this Doc View Source

    ExpressionListFunctionArgument(SyntaxToken, SeparatedSyntaxList<ExpressionSyntax>, SyntaxToken)

    Creates a new ExpressionListFunctionArgumentSyntax node.

    Declaration
    public static ExpressionListFunctionArgumentSyntax ExpressionListFunctionArgument(SyntaxToken openParenthesisToken, SeparatedSyntaxList<ExpressionSyntax> expressions, SyntaxToken closeParenthesisToken)
    Parameters
    Type Name Description
    SyntaxToken openParenthesisToken
    SeparatedSyntaxList<ExpressionSyntax> expressions
    SyntaxToken closeParenthesisToken
    Returns
    Type Description
    ExpressionListFunctionArgumentSyntax
    | Improve this Doc View Source

    ExpressionStatement(ExpressionSyntax)

    Creates a new ExpressionStatementSyntax instance.

    Declaration
    public static ExpressionStatementSyntax ExpressionStatement(ExpressionSyntax expression)
    Parameters
    Type Name Description
    ExpressionSyntax expression
    Returns
    Type Description
    ExpressionStatementSyntax
    | Improve this Doc View Source

    ExpressionStatement(ExpressionSyntax, SyntaxToken)

    Creates a new ExpressionStatementSyntax node.

    Declaration
    public static ExpressionStatementSyntax ExpressionStatement(ExpressionSyntax expression, SyntaxToken semicolonToken)
    Parameters
    Type Name Description
    ExpressionSyntax expression
    SyntaxToken semicolonToken
    Returns
    Type Description
    ExpressionStatementSyntax
    | Improve this Doc View Source

    FunctionCallExpression(PrefixExpressionSyntax, FunctionArgumentSyntax)

    Creates a new FunctionCallExpressionSyntax node.

    Declaration
    public static FunctionCallExpressionSyntax FunctionCallExpression(PrefixExpressionSyntax expression, FunctionArgumentSyntax argument)
    Parameters
    Type Name Description
    PrefixExpressionSyntax expression
    FunctionArgumentSyntax argument
    Returns
    Type Description
    FunctionCallExpressionSyntax
    | Improve this Doc View Source

    FunctionDeclarationStatement(FunctionNameSyntax, ParameterListSyntax, StatementListSyntax)

    Creates a new FunctionDeclarationStatementSyntax instance.

    Declaration
    public static FunctionDeclarationStatementSyntax FunctionDeclarationStatement(FunctionNameSyntax name, ParameterListSyntax parameters, StatementListSyntax body)
    Parameters
    Type Name Description
    FunctionNameSyntax name
    ParameterListSyntax parameters
    StatementListSyntax body
    Returns
    Type Description
    FunctionDeclarationStatementSyntax
    | Improve this Doc View Source

    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
    Type Name Description
    FunctionNameSyntax name
    TypeParameterListSyntax typeParameterList
    ParameterListSyntax parameters
    TypeBindingSyntax typeBinding
    StatementListSyntax body
    Returns
    Type Description
    FunctionDeclarationStatementSyntax
    | Improve this Doc View Source

    FunctionDeclarationStatement(SyntaxToken, FunctionNameSyntax, TypeParameterListSyntax, ParameterListSyntax, TypeBindingSyntax, StatementListSyntax, SyntaxToken, SyntaxToken)

    Creates a new FunctionDeclarationStatementSyntax node.

    Declaration
    public static FunctionDeclarationStatementSyntax FunctionDeclarationStatement(SyntaxToken functionKeyword, FunctionNameSyntax name, TypeParameterListSyntax typeParameterList, ParameterListSyntax parameters, TypeBindingSyntax typeBinding, StatementListSyntax body, SyntaxToken endKeyword, SyntaxToken semicolonToken)
    Parameters
    Type Name Description
    SyntaxToken functionKeyword
    FunctionNameSyntax name
    TypeParameterListSyntax typeParameterList
    ParameterListSyntax parameters
    TypeBindingSyntax typeBinding
    StatementListSyntax body
    SyntaxToken endKeyword
    SyntaxToken semicolonToken
    Returns
    Type Description
    FunctionDeclarationStatementSyntax
    | Improve this Doc View Source

    FunctionType(TypeParameterListSyntax, SeparatedSyntaxList<FunctionTypeParameterSyntax>, TypeSyntax)

    Creates a new FunctionTypeSyntax instance.

    Declaration
    public static FunctionTypeSyntax FunctionType(TypeParameterListSyntax typeParameterList, SeparatedSyntaxList<FunctionTypeParameterSyntax> parameters, TypeSyntax returnType)
    Parameters
    Type Name Description
    TypeParameterListSyntax typeParameterList
    SeparatedSyntaxList<FunctionTypeParameterSyntax> parameters
    TypeSyntax returnType
    Returns
    Type Description
    FunctionTypeSyntax
    | Improve this Doc View Source

    FunctionType(TypeParameterListSyntax, SyntaxToken, SeparatedSyntaxList<FunctionTypeParameterSyntax>, SyntaxToken, SyntaxToken, TypeSyntax)

    Creates a new FunctionTypeSyntax node.

    Declaration
    public static FunctionTypeSyntax FunctionType(TypeParameterListSyntax typeParameterList, SyntaxToken openParenthesisToken, SeparatedSyntaxList<FunctionTypeParameterSyntax> parameters, SyntaxToken closeParenthesisToken, SyntaxToken minusGreaterThanToken, TypeSyntax returnType)
    Parameters
    Type Name Description
    TypeParameterListSyntax typeParameterList
    SyntaxToken openParenthesisToken
    SeparatedSyntaxList<FunctionTypeParameterSyntax> parameters
    SyntaxToken closeParenthesisToken
    SyntaxToken minusGreaterThanToken
    TypeSyntax returnType
    Returns
    Type Description
    FunctionTypeSyntax
    | Improve this Doc View Source

    FunctionType(TypeSyntax)

    Creates a new FunctionTypeSyntax instance.

    Declaration
    public static FunctionTypeSyntax FunctionType(TypeSyntax returnType)
    Parameters
    Type Name Description
    TypeSyntax returnType
    Returns
    Type Description
    FunctionTypeSyntax
    | Improve this Doc View Source

    FunctionTypeParameter(TypeSyntax)

    Creates a new FunctionTypeParameterSyntax instance.

    Declaration
    public static FunctionTypeParameterSyntax FunctionTypeParameter(TypeSyntax type)
    Parameters
    Type Name Description
    TypeSyntax type
    Returns
    Type Description
    FunctionTypeParameterSyntax
    | Improve this Doc View Source

    FunctionTypeParameter(SyntaxToken, TypeSyntax)

    Creates a new FunctionTypeParameterSyntax instance.

    Declaration
    public static FunctionTypeParameterSyntax FunctionTypeParameter(SyntaxToken identifier, TypeSyntax type)
    Parameters
    Type Name Description
    SyntaxToken identifier
    TypeSyntax type
    Returns
    Type Description
    FunctionTypeParameterSyntax
    | Improve this Doc View Source

    FunctionTypeParameter(SyntaxToken, SyntaxToken, TypeSyntax)

    Declaration
    public static FunctionTypeParameterSyntax FunctionTypeParameter(SyntaxToken identifier, SyntaxToken colonToken, TypeSyntax type)
    Parameters
    Type Name Description
    SyntaxToken identifier
    SyntaxToken colonToken
    TypeSyntax type
    Returns
    Type Description
    FunctionTypeParameterSyntax
    | Improve this Doc View Source

    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
    Type Name Description
    SeparatedSyntaxList<TypedIdentifierNameSyntax> identifiers
    SeparatedSyntaxList<ExpressionSyntax> expressions
    StatementListSyntax body
    Returns
    Type Description
    GenericForStatementSyntax
    | Improve this Doc View Source

    GenericForStatement(SyntaxToken, SeparatedSyntaxList<TypedIdentifierNameSyntax>, SyntaxToken, SeparatedSyntaxList<ExpressionSyntax>, SyntaxToken, StatementListSyntax, SyntaxToken, SyntaxToken)

    Creates a new GenericForStatementSyntax node.

    Declaration
    public static GenericForStatementSyntax GenericForStatement(SyntaxToken forKeyword, SeparatedSyntaxList<TypedIdentifierNameSyntax> identifiers, SyntaxToken inKeyword, SeparatedSyntaxList<ExpressionSyntax> expressions, SyntaxToken doKeyword, StatementListSyntax body, SyntaxToken endKeyword, SyntaxToken semicolonToken)
    Parameters
    Type Name Description
    SyntaxToken forKeyword
    SeparatedSyntaxList<TypedIdentifierNameSyntax> identifiers
    SyntaxToken inKeyword
    SeparatedSyntaxList<ExpressionSyntax> expressions
    SyntaxToken doKeyword
    StatementListSyntax body
    SyntaxToken endKeyword
    SyntaxToken semicolonToken
    Returns
    Type Description
    GenericForStatementSyntax
    | Improve this Doc View Source

    GenericTypePack(SyntaxToken)

    Creates a new GenericTypePackSyntax instance.

    Declaration
    public static GenericTypePackSyntax GenericTypePack(SyntaxToken identifier)
    Parameters
    Type Name Description
    SyntaxToken identifier
    Returns
    Type Description
    GenericTypePackSyntax
    | Improve this Doc View Source

    GenericTypePack(SyntaxToken, SyntaxToken)

    Creates a new GenericTypePackSyntax node.

    Declaration
    public static GenericTypePackSyntax GenericTypePack(SyntaxToken identifier, SyntaxToken dotDotDotToken)
    Parameters
    Type Name Description
    SyntaxToken identifier
    SyntaxToken dotDotDotToken
    Returns
    Type Description
    GenericTypePackSyntax
    | Improve this Doc View Source

    GenericTypePack(String)

    Creates a new GenericTypePackSyntax instance.

    Declaration
    public static GenericTypePackSyntax GenericTypePack(string identifier)
    Parameters
    Type Name Description
    System.String identifier
    Returns
    Type Description
    GenericTypePackSyntax
    | Improve this Doc View Source

    GotoLabelStatement(SyntaxToken)

    Creates a new GotoLabelStatementSyntax instance.

    Declaration
    public static GotoLabelStatementSyntax GotoLabelStatement(SyntaxToken identifier)
    Parameters
    Type Name Description
    SyntaxToken identifier
    Returns
    Type Description
    GotoLabelStatementSyntax
    | Improve this Doc View Source

    GotoLabelStatement(SyntaxToken, SyntaxToken, SyntaxToken, SyntaxToken)

    Creates a new GotoLabelStatementSyntax node.

    Declaration
    public static GotoLabelStatementSyntax GotoLabelStatement(SyntaxToken leftDelimiterToken, SyntaxToken identifier, SyntaxToken rightDelimiterToken, SyntaxToken semicolonToken)
    Parameters
    Type Name Description
    SyntaxToken leftDelimiterToken
    SyntaxToken identifier
    SyntaxToken rightDelimiterToken
    SyntaxToken semicolonToken
    Returns
    Type Description
    GotoLabelStatementSyntax
    | Improve this Doc View Source

    GotoLabelStatement(String)

    Creates a new GotoLabelStatementSyntax instance.

    Declaration
    public static GotoLabelStatementSyntax GotoLabelStatement(string identifier)
    Parameters
    Type Name Description
    System.String identifier
    Returns
    Type Description
    GotoLabelStatementSyntax
    | Improve this Doc View Source

    GotoStatement(SyntaxToken)

    Creates a new GotoStatementSyntax instance.

    Declaration
    public static GotoStatementSyntax GotoStatement(SyntaxToken labelName)
    Parameters
    Type Name Description
    SyntaxToken labelName
    Returns
    Type Description
    GotoStatementSyntax
    | Improve this Doc View Source

    GotoStatement(SyntaxToken, SyntaxToken, SyntaxToken)

    Creates a new GotoStatementSyntax node.

    Declaration
    public static GotoStatementSyntax GotoStatement(SyntaxToken gotoKeyword, SyntaxToken labelName, SyntaxToken semicolonToken)
    Parameters
    Type Name Description
    SyntaxToken gotoKeyword
    SyntaxToken labelName
    SyntaxToken semicolonToken
    Returns
    Type Description
    GotoStatementSyntax
    | Improve this Doc View Source

    GotoStatement(String)

    Creates a new GotoStatementSyntax instance.

    Declaration
    public static GotoStatementSyntax GotoStatement(string labelName)
    Parameters
    Type Name Description
    System.String labelName
    Returns
    Type Description
    GotoStatementSyntax
    | Improve this Doc View Source

    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
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    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
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    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
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    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
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    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
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    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
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    IdentifierKeyedTableField(SyntaxToken, ExpressionSyntax)

    Creates a new IdentifierKeyedTableFieldSyntax instance.

    Declaration
    public static IdentifierKeyedTableFieldSyntax IdentifierKeyedTableField(SyntaxToken identifier, ExpressionSyntax value)
    Parameters
    Type Name Description
    SyntaxToken identifier
    ExpressionSyntax value
    Returns
    Type Description
    IdentifierKeyedTableFieldSyntax
    | Improve this Doc View Source

    IdentifierKeyedTableField(SyntaxToken, SyntaxToken, ExpressionSyntax)

    Creates a new IdentifierKeyedTableFieldSyntax node.

    Declaration
    public static IdentifierKeyedTableFieldSyntax IdentifierKeyedTableField(SyntaxToken identifier, SyntaxToken equalsToken, ExpressionSyntax value)
    Parameters
    Type Name Description
    SyntaxToken identifier
    SyntaxToken equalsToken
    ExpressionSyntax value
    Returns
    Type Description
    IdentifierKeyedTableFieldSyntax
    | Improve this Doc View Source

    IdentifierKeyedTableField(String, ExpressionSyntax)

    Creates a new IdentifierKeyedTableFieldSyntax instance.

    Declaration
    public static IdentifierKeyedTableFieldSyntax IdentifierKeyedTableField(string identifier, ExpressionSyntax value)
    Parameters
    Type Name Description
    System.String identifier
    ExpressionSyntax value
    Returns
    Type Description
    IdentifierKeyedTableFieldSyntax
    | Improve this Doc View Source

    IdentifierName(SyntaxToken)

    Creates a new IdentifierNameSyntax node.

    Declaration
    public static IdentifierNameSyntax IdentifierName(SyntaxToken identifier)
    Parameters
    Type Name Description
    SyntaxToken identifier
    Returns
    Type Description
    IdentifierNameSyntax
    | Improve this Doc View Source

    IdentifierName(String)

    Creates an IdentifierNameSyntax node.

    Declaration
    public static IdentifierNameSyntax IdentifierName(string name)
    Parameters
    Type Name Description
    System.String name

    The identifier name.

    Returns
    Type Description
    IdentifierNameSyntax
    | Improve this Doc View Source

    IfExpression(ExpressionSyntax, ExpressionSyntax, ExpressionSyntax)

    Creates a new IfExpressionSyntax instance.

    Declaration
    public static IfExpressionSyntax IfExpression(ExpressionSyntax condition, ExpressionSyntax trueValue, ExpressionSyntax falseValue)
    Parameters
    Type Name Description
    ExpressionSyntax condition
    ExpressionSyntax trueValue
    ExpressionSyntax falseValue
    Returns
    Type Description
    IfExpressionSyntax
    | Improve this Doc View Source

    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
    Type Name Description
    ExpressionSyntax condition
    ExpressionSyntax trueValue
    SyntaxList<ElseIfExpressionClauseSyntax> elseIfClauses
    ExpressionSyntax falseValue
    Returns
    Type Description
    IfExpressionSyntax
    | Improve this Doc View Source

    IfExpression(SyntaxToken, ExpressionSyntax, SyntaxToken, ExpressionSyntax, SyntaxList<ElseIfExpressionClauseSyntax>, SyntaxToken, ExpressionSyntax)

    Creates a new IfExpressionSyntax node.

    Declaration
    public static IfExpressionSyntax IfExpression(SyntaxToken ifKeyword, ExpressionSyntax condition, SyntaxToken thenKeyword, ExpressionSyntax trueValue, SyntaxList<ElseIfExpressionClauseSyntax> elseIfClauses, SyntaxToken elseKeyword, ExpressionSyntax falseValue)
    Parameters
    Type Name Description
    SyntaxToken ifKeyword
    ExpressionSyntax condition
    SyntaxToken thenKeyword
    ExpressionSyntax trueValue
    SyntaxList<ElseIfExpressionClauseSyntax> elseIfClauses
    SyntaxToken elseKeyword
    ExpressionSyntax falseValue
    Returns
    Type Description
    IfExpressionSyntax
    | Improve this Doc View Source

    IfStatement(ExpressionSyntax, StatementListSyntax)

    Creates a new IfStatementSyntax instance.

    Declaration
    public static IfStatementSyntax IfStatement(ExpressionSyntax condition, StatementListSyntax body)
    Parameters
    Type Name Description
    ExpressionSyntax condition
    StatementListSyntax body
    Returns
    Type Description
    IfStatementSyntax
    | Improve this Doc View Source

    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
    Type Name Description
    ExpressionSyntax condition
    StatementListSyntax body
    SyntaxList<ElseIfClauseSyntax> elseIfClauses
    ElseClauseSyntax elseClause
    Returns
    Type Description
    IfStatementSyntax
    | Improve this Doc View Source

    IfStatement(SyntaxToken, ExpressionSyntax, SyntaxToken, StatementListSyntax, SyntaxList<ElseIfClauseSyntax>, ElseClauseSyntax, SyntaxToken, SyntaxToken)

    Creates a new IfStatementSyntax comment.

    Declaration
    public static IfStatementSyntax IfStatement(SyntaxToken ifKeyword, ExpressionSyntax condition, SyntaxToken thenKeyword, StatementListSyntax body, SyntaxList<ElseIfClauseSyntax> elseIfClauses, ElseClauseSyntax elseClause, SyntaxToken endKeyword, SyntaxToken semicolonToken)
    Parameters
    Type Name Description
    SyntaxToken ifKeyword
    ExpressionSyntax condition
    SyntaxToken thenKeyword
    StatementListSyntax body
    SyntaxList<ElseIfClauseSyntax> elseIfClauses
    ElseClauseSyntax elseClause
    SyntaxToken endKeyword
    SyntaxToken semicolonToken
    Returns
    Type Description
    IfStatementSyntax
    | Improve this Doc View Source

    InterpolatedStringExpression(SyntaxList<InterpolatedStringContentSyntax>)

    Creates a new InterpolatedStringExpressionSyntax instance.

    Declaration
    public static InterpolatedStringExpressionSyntax InterpolatedStringExpression(SyntaxList<InterpolatedStringContentSyntax> contents = default(SyntaxList<InterpolatedStringContentSyntax>))
    Parameters
    Type Name Description
    SyntaxList<InterpolatedStringContentSyntax> contents
    Returns
    Type Description
    InterpolatedStringExpressionSyntax
    | Improve this Doc View Source

    InterpolatedStringExpression(SyntaxToken, SyntaxList<InterpolatedStringContentSyntax>, SyntaxToken)

    Declaration
    public static InterpolatedStringExpressionSyntax InterpolatedStringExpression(SyntaxToken stringStartToken, SyntaxList<InterpolatedStringContentSyntax> contents, SyntaxToken stringEndToken)
    Parameters
    Type Name Description
    SyntaxToken stringStartToken
    SyntaxList<InterpolatedStringContentSyntax> contents
    SyntaxToken stringEndToken
    Returns
    Type Description
    InterpolatedStringExpressionSyntax
    | Improve this Doc View Source

    InterpolatedStringText()

    Creates a new InterpolatedStringTextSyntax instance.

    Declaration
    public static InterpolatedStringTextSyntax InterpolatedStringText()
    Returns
    Type Description
    InterpolatedStringTextSyntax
    | Improve this Doc View Source

    InterpolatedStringText(SyntaxToken)

    Declaration
    public static InterpolatedStringTextSyntax InterpolatedStringText(SyntaxToken textToken)
    Parameters
    Type Name Description
    SyntaxToken textToken
    Returns
    Type Description
    InterpolatedStringTextSyntax
    | Improve this Doc View Source

    Interpolation(ExpressionSyntax)

    Creates a new InterpolationSyntax instance.

    Declaration
    public static InterpolationSyntax Interpolation(ExpressionSyntax expression)
    Parameters
    Type Name Description
    ExpressionSyntax expression
    Returns
    Type Description
    InterpolationSyntax
    | Improve this Doc View Source

    Interpolation(SyntaxToken, ExpressionSyntax, SyntaxToken)

    Declaration
    public static InterpolationSyntax Interpolation(SyntaxToken openBraceToken, ExpressionSyntax expression, SyntaxToken closeBraceToken)
    Parameters
    Type Name Description
    SyntaxToken openBraceToken
    ExpressionSyntax expression
    SyntaxToken closeBraceToken
    Returns
    Type Description
    InterpolationSyntax
    | Improve this Doc View Source

    IntersectionType(TypeSyntax, TypeSyntax)

    Creates a new IntersectionTypeSyntax instance.

    Declaration
    public static IntersectionTypeSyntax IntersectionType(TypeSyntax left, TypeSyntax right)
    Parameters
    Type Name Description
    TypeSyntax left
    TypeSyntax right
    Returns
    Type Description
    IntersectionTypeSyntax
    | Improve this Doc View Source

    IntersectionType(TypeSyntax, SyntaxToken, TypeSyntax)

    Creates a new IntersectionTypeSyntax node.

    Declaration
    public static IntersectionTypeSyntax IntersectionType(TypeSyntax left, SyntaxToken ampersandToken, TypeSyntax right)
    Parameters
    Type Name Description
    TypeSyntax left
    SyntaxToken ampersandToken
    TypeSyntax right
    Returns
    Type Description
    IntersectionTypeSyntax
    | Improve this Doc View Source

    List<TNode>()

    Creates an empty list of syntax nodes.

    Declaration
    public static SyntaxList<TNode> List<TNode>()
        where TNode : SyntaxNode
    Returns
    Type Description
    SyntaxList<TNode>
    Type Parameters
    Name Description
    TNode

    The specific type of the element nodes.

    | Improve this Doc View Source

    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 Description
    SyntaxList<TNode>
    Type Parameters
    Name Description
    TNode

    The specific type of the element nodes.

    | Improve this Doc View Source

    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
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    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
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    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.

    System.Numerics.Complex value

    The complex value to be represented by the returned token.

    SyntaxTriviaList trailing

    A list of trivia immediately following the token.

    Returns
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    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
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    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
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    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
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    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
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    Literal(Complex)

    Creates a token with kind NumericLiteralToken from a complex value.

    Declaration
    public static SyntaxToken Literal(Complex value)
    Parameters
    Type Name Description
    System.Numerics.Complex value

    The complex value to be represented by the returned token.

    Returns
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    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
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    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
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    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
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    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.

    System.Numerics.Complex value

    The complex value to be represented by the returned token.

    Returns
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    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
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    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
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    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
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    LiteralExpression(SyntaxKind)

    Creates a new LiteralExpressionSyntax instance.

    Declaration
    public static LiteralExpressionSyntax LiteralExpression(SyntaxKind kind)
    Parameters
    Type Name Description
    SyntaxKind kind
    Returns
    Type Description
    LiteralExpressionSyntax
    | Improve this Doc View Source

    LiteralExpression(SyntaxKind, SyntaxToken)

    Creates a new LiteralExpressionSyntax node.

    Declaration
    public static LiteralExpressionSyntax LiteralExpression(SyntaxKind kind, SyntaxToken token)
    Parameters
    Type Name Description
    SyntaxKind kind
    SyntaxToken token
    Returns
    Type Description
    LiteralExpressionSyntax
    | Improve this Doc View Source

    LiteralType(SyntaxKind)

    Creates a new LiteralTypeSyntax instance.

    Declaration
    public static LiteralTypeSyntax LiteralType(SyntaxKind kind)
    Parameters
    Type Name Description
    SyntaxKind kind
    Returns
    Type Description
    LiteralTypeSyntax
    | Improve this Doc View Source

    LiteralType(SyntaxKind, SyntaxToken)

    Creates a new LiteralTypeSyntax node.

    Declaration
    public static LiteralTypeSyntax LiteralType(SyntaxKind kind, SyntaxToken token)
    Parameters
    Type Name Description
    SyntaxKind kind
    SyntaxToken token
    Returns
    Type Description
    LiteralTypeSyntax
    | Improve this Doc View Source

    LocalDeclarationName(IdentifierNameSyntax)

    Creates a new LocalDeclarationNameSyntax instance.

    Declaration
    public static LocalDeclarationNameSyntax LocalDeclarationName(IdentifierNameSyntax identifierName)
    Parameters
    Type Name Description
    IdentifierNameSyntax identifierName
    Returns
    Type Description
    LocalDeclarationNameSyntax
    | Improve this Doc View Source

    LocalDeclarationName(IdentifierNameSyntax, VariableAttributeSyntax)

    Creates a new LocalDeclarationNameSyntax node.

    Declaration
    public static LocalDeclarationNameSyntax LocalDeclarationName(IdentifierNameSyntax identifierName, VariableAttributeSyntax attribute)
    Parameters
    Type Name Description
    IdentifierNameSyntax identifierName
    VariableAttributeSyntax attribute
    Returns
    Type Description
    LocalDeclarationNameSyntax
    | Improve this Doc View Source

    LocalDeclarationName(IdentifierNameSyntax, VariableAttributeSyntax, TypeBindingSyntax)

    Creates a new LocalDeclarationNameSyntax node.

    Declaration
    public static LocalDeclarationNameSyntax LocalDeclarationName(IdentifierNameSyntax identifierName, VariableAttributeSyntax attribute, TypeBindingSyntax typeBinding)
    Parameters
    Type Name Description
    IdentifierNameSyntax identifierName
    VariableAttributeSyntax attribute
    TypeBindingSyntax typeBinding
    Returns
    Type Description
    LocalDeclarationNameSyntax
    | Improve this Doc View Source

    LocalDeclarationName(String)

    Creates a new LocalDeclarationNameSyntax instance.

    Declaration
    public static LocalDeclarationNameSyntax LocalDeclarationName(string identifierName)
    Parameters
    Type Name Description
    System.String identifierName
    Returns
    Type Description
    LocalDeclarationNameSyntax
    | Improve this Doc View Source

    LocalDeclarationName(String, VariableAttributeSyntax)

    Creates a new LocalDeclarationNameSyntax node.

    Declaration
    public static LocalDeclarationNameSyntax LocalDeclarationName(string name, VariableAttributeSyntax attribute)
    Parameters
    Type Name Description
    System.String name
    VariableAttributeSyntax attribute
    Returns
    Type Description
    LocalDeclarationNameSyntax
    | Improve this Doc View Source

    LocalFunctionDeclarationStatement(IdentifierNameSyntax, ParameterListSyntax, StatementListSyntax)

    Creates a new LocalFunctionDeclarationStatementSyntax instance.

    Declaration
    public static LocalFunctionDeclarationStatementSyntax LocalFunctionDeclarationStatement(IdentifierNameSyntax name, ParameterListSyntax parameters, StatementListSyntax body)
    Parameters
    Type Name Description
    IdentifierNameSyntax name
    ParameterListSyntax parameters
    StatementListSyntax body
    Returns
    Type Description
    LocalFunctionDeclarationStatementSyntax
    | Improve this Doc View Source

    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
    Type Name Description
    IdentifierNameSyntax name
    TypeParameterListSyntax typeParameterList
    ParameterListSyntax parameters
    TypeBindingSyntax typeBinding
    StatementListSyntax body
    Returns
    Type Description
    LocalFunctionDeclarationStatementSyntax
    | Improve this Doc View Source

    LocalFunctionDeclarationStatement(SyntaxToken, SyntaxToken, IdentifierNameSyntax, ParameterListSyntax, StatementListSyntax, SyntaxToken, SyntaxToken)

    Creates a new LocalFunctionDeclarationStatementSyntax node.

    Declaration
    public static LocalFunctionDeclarationStatementSyntax LocalFunctionDeclarationStatement(SyntaxToken localKeyword, SyntaxToken functionKeyword, IdentifierNameSyntax name, ParameterListSyntax parameters, StatementListSyntax body, SyntaxToken endKeyword, SyntaxToken semicolonToken)
    Parameters
    Type Name Description
    SyntaxToken localKeyword
    SyntaxToken functionKeyword
    IdentifierNameSyntax name
    ParameterListSyntax parameters
    StatementListSyntax body
    SyntaxToken endKeyword
    SyntaxToken semicolonToken
    Returns
    Type Description
    LocalFunctionDeclarationStatementSyntax
    | Improve this Doc View Source

    LocalFunctionDeclarationStatement(SyntaxToken, SyntaxToken, IdentifierNameSyntax, TypeParameterListSyntax, ParameterListSyntax, TypeBindingSyntax, StatementListSyntax, SyntaxToken, SyntaxToken)

    Creates a new LocalFunctionDeclarationStatementSyntax node.

    Declaration
    public static LocalFunctionDeclarationStatementSyntax LocalFunctionDeclarationStatement(SyntaxToken localKeyword, SyntaxToken functionKeyword, IdentifierNameSyntax name, TypeParameterListSyntax typeParameterList, ParameterListSyntax parameters, TypeBindingSyntax typeBinding, StatementListSyntax body, SyntaxToken endKeyword, SyntaxToken semicolonToken)
    Parameters
    Type Name Description
    SyntaxToken localKeyword
    SyntaxToken functionKeyword
    IdentifierNameSyntax name
    TypeParameterListSyntax typeParameterList
    ParameterListSyntax parameters
    TypeBindingSyntax typeBinding
    StatementListSyntax body
    SyntaxToken endKeyword
    SyntaxToken semicolonToken
    Returns
    Type Description
    LocalFunctionDeclarationStatementSyntax
    | Improve this Doc View Source

    LocalFunctionDeclarationStatement(String, ParameterListSyntax, StatementListSyntax)

    Creates a new LocalFunctionDeclarationStatementSyntax instance.

    Declaration
    public static LocalFunctionDeclarationStatementSyntax LocalFunctionDeclarationStatement(string name, ParameterListSyntax parameters, StatementListSyntax body)
    Parameters
    Type Name Description
    System.String name
    ParameterListSyntax parameters
    StatementListSyntax body
    Returns
    Type Description
    LocalFunctionDeclarationStatementSyntax
    | Improve this Doc View Source

    LocalVariableDeclarationStatement(SeparatedSyntaxList<LocalDeclarationNameSyntax>)

    Creates a new LocalVariableDeclarationStatementSyntax instance.

    Declaration
    public static LocalVariableDeclarationStatementSyntax LocalVariableDeclarationStatement(SeparatedSyntaxList<LocalDeclarationNameSyntax> names)
    Parameters
    Type Name Description
    SeparatedSyntaxList<LocalDeclarationNameSyntax> names
    Returns
    Type Description
    LocalVariableDeclarationStatementSyntax
    | Improve this Doc View Source

    LocalVariableDeclarationStatement(SeparatedSyntaxList<LocalDeclarationNameSyntax>, EqualsValuesClauseSyntax)

    Creates a new LocalVariableDeclarationStatementSyntax instance.

    Declaration
    public static LocalVariableDeclarationStatementSyntax LocalVariableDeclarationStatement(SeparatedSyntaxList<LocalDeclarationNameSyntax> names, EqualsValuesClauseSyntax equalsValues)
    Parameters
    Type Name Description
    SeparatedSyntaxList<LocalDeclarationNameSyntax> names
    EqualsValuesClauseSyntax equalsValues
    Returns
    Type Description
    LocalVariableDeclarationStatementSyntax
    | Improve this Doc View Source

    LocalVariableDeclarationStatement(SeparatedSyntaxList<LocalDeclarationNameSyntax>, SeparatedSyntaxList<ExpressionSyntax>)

    Creates a new LocalVariableDeclarationStatementSyntax node.

    Declaration
    public static LocalVariableDeclarationStatementSyntax LocalVariableDeclarationStatement(SeparatedSyntaxList<LocalDeclarationNameSyntax> names, SeparatedSyntaxList<ExpressionSyntax> values)
    Parameters
    Type Name Description
    SeparatedSyntaxList<LocalDeclarationNameSyntax> names
    SeparatedSyntaxList<ExpressionSyntax> values
    Returns
    Type Description
    LocalVariableDeclarationStatementSyntax
    | Improve this Doc View Source

    LocalVariableDeclarationStatement(SyntaxToken, SeparatedSyntaxList<LocalDeclarationNameSyntax>, EqualsValuesClauseSyntax, SyntaxToken)

    Creates a new LocalVariableDeclarationStatementSyntax node.

    Declaration
    public static LocalVariableDeclarationStatementSyntax LocalVariableDeclarationStatement(SyntaxToken localKeyword, SeparatedSyntaxList<LocalDeclarationNameSyntax> names, EqualsValuesClauseSyntax equalsValues, SyntaxToken semicolonToken)
    Parameters
    Type Name Description
    SyntaxToken localKeyword
    SeparatedSyntaxList<LocalDeclarationNameSyntax> names
    EqualsValuesClauseSyntax equalsValues
    SyntaxToken semicolonToken
    Returns
    Type Description
    LocalVariableDeclarationStatementSyntax
    | Improve this Doc View Source

    MemberAccessExpression(PrefixExpressionSyntax, SyntaxToken)

    Creates a new MemberAccessExpressionSyntax instance.

    Declaration
    public static MemberAccessExpressionSyntax MemberAccessExpression(PrefixExpressionSyntax expression, SyntaxToken memberName)
    Parameters
    Type Name Description
    PrefixExpressionSyntax expression
    SyntaxToken memberName
    Returns
    Type Description
    MemberAccessExpressionSyntax
    | Improve this Doc View Source

    MemberAccessExpression(PrefixExpressionSyntax, SyntaxToken, SyntaxToken)

    Creates a new MemberAccessExpressionSyntax node.

    Declaration
    public static MemberAccessExpressionSyntax MemberAccessExpression(PrefixExpressionSyntax expression, SyntaxToken dotSeparator, SyntaxToken memberName)
    Parameters
    Type Name Description
    PrefixExpressionSyntax expression
    SyntaxToken dotSeparator
    SyntaxToken memberName
    Returns
    Type Description
    MemberAccessExpressionSyntax
    | Improve this Doc View Source

    MemberAccessExpression(PrefixExpressionSyntax, String)

    Creates a new MemberAccessExpressionSyntax instance.

    Declaration
    public static MemberAccessExpressionSyntax MemberAccessExpression(PrefixExpressionSyntax expression, string memberName)
    Parameters
    Type Name Description
    PrefixExpressionSyntax expression
    System.String memberName
    Returns
    Type Description
    MemberAccessExpressionSyntax
    | Improve this Doc View Source

    MemberFunctionName(FunctionNameSyntax, SyntaxToken)

    Creates a new MemberFunctionNameSyntax instance.

    Declaration
    public static MemberFunctionNameSyntax MemberFunctionName(FunctionNameSyntax baseName, SyntaxToken name)
    Parameters
    Type Name Description
    FunctionNameSyntax baseName
    SyntaxToken name
    Returns
    Type Description
    MemberFunctionNameSyntax
    | Improve this Doc View Source

    MemberFunctionName(FunctionNameSyntax, SyntaxToken, SyntaxToken)

    Creates a new MemberFunctionNameSyntax node.

    Declaration
    public static MemberFunctionNameSyntax MemberFunctionName(FunctionNameSyntax baseName, SyntaxToken dotToken, SyntaxToken name)
    Parameters
    Type Name Description
    FunctionNameSyntax baseName
    SyntaxToken dotToken
    SyntaxToken name
    Returns
    Type Description
    MemberFunctionNameSyntax
    | Improve this Doc View Source

    MemberFunctionName(FunctionNameSyntax, String)

    Creates a new MemberFunctionNameSyntax instance.

    Declaration
    public static MemberFunctionNameSyntax MemberFunctionName(FunctionNameSyntax baseName, string name)
    Parameters
    Type Name Description
    FunctionNameSyntax baseName
    System.String name
    Returns
    Type Description
    MemberFunctionNameSyntax
    | Improve this Doc View Source

    MethodCallExpression(PrefixExpressionSyntax, SyntaxToken, FunctionArgumentSyntax)

    Creates a new MethodCallExpressionSyntax instance.

    Declaration
    public static MethodCallExpressionSyntax MethodCallExpression(PrefixExpressionSyntax expression, SyntaxToken identifier, FunctionArgumentSyntax argument)
    Parameters
    Type Name Description
    PrefixExpressionSyntax expression
    SyntaxToken identifier
    FunctionArgumentSyntax argument
    Returns
    Type Description
    MethodCallExpressionSyntax
    | Improve this Doc View Source

    MethodCallExpression(PrefixExpressionSyntax, SyntaxToken, SyntaxToken, FunctionArgumentSyntax)

    Creates a new MethodCallExpressionSyntax node.

    Declaration
    public static MethodCallExpressionSyntax MethodCallExpression(PrefixExpressionSyntax expression, SyntaxToken colonToken, SyntaxToken identifier, FunctionArgumentSyntax argument)
    Parameters
    Type Name Description
    PrefixExpressionSyntax expression
    SyntaxToken colonToken
    SyntaxToken identifier
    FunctionArgumentSyntax argument
    Returns
    Type Description
    MethodCallExpressionSyntax
    | Improve this Doc View Source

    MethodCallExpression(PrefixExpressionSyntax, String, FunctionArgumentSyntax)

    Creates a new MethodCallExpressionSyntax instance.

    Declaration
    public static MethodCallExpressionSyntax MethodCallExpression(PrefixExpressionSyntax expression, string identifier, FunctionArgumentSyntax argument)
    Parameters
    Type Name Description
    PrefixExpressionSyntax expression
    System.String identifier
    FunctionArgumentSyntax argument
    Returns
    Type Description
    MethodCallExpressionSyntax
    | Improve this Doc View Source

    MethodFunctionName(FunctionNameSyntax, SyntaxToken)

    Creates a new MethodFunctionNameSyntax instance.

    Declaration
    public static MethodFunctionNameSyntax MethodFunctionName(FunctionNameSyntax baseName, SyntaxToken name)
    Parameters
    Type Name Description
    FunctionNameSyntax baseName
    SyntaxToken name
    Returns
    Type Description
    MethodFunctionNameSyntax
    | Improve this Doc View Source

    MethodFunctionName(FunctionNameSyntax, SyntaxToken, SyntaxToken)

    Creates a new MethodFunctionNameSyntax node.

    Declaration
    public static MethodFunctionNameSyntax MethodFunctionName(FunctionNameSyntax baseName, SyntaxToken colonToken, SyntaxToken name)
    Parameters
    Type Name Description
    FunctionNameSyntax baseName
    SyntaxToken colonToken
    SyntaxToken name
    Returns
    Type Description
    MethodFunctionNameSyntax
    | Improve this Doc View Source

    MethodFunctionName(FunctionNameSyntax, String)

    Creates a new MethodFunctionNameSyntax instance.

    Declaration
    public static MethodFunctionNameSyntax MethodFunctionName(FunctionNameSyntax baseName, string name)
    Parameters
    Type Name Description
    FunctionNameSyntax baseName
    System.String name
    Returns
    Type Description
    MethodFunctionNameSyntax
    | Improve this Doc View Source

    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
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    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
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    NamedParameter(SyntaxToken)

    Creates a new NamedParameterSyntax instance.

    Declaration
    public static NamedParameterSyntax NamedParameter(SyntaxToken identifier)
    Parameters
    Type Name Description
    SyntaxToken identifier
    Returns
    Type Description
    NamedParameterSyntax
    | Improve this Doc View Source

    NamedParameter(SyntaxToken, TypeBindingSyntax)

    Creates a new NamedParameterSyntax node.

    Declaration
    public static NamedParameterSyntax NamedParameter(SyntaxToken identifier, TypeBindingSyntax typeBinding)
    Parameters
    Type Name Description
    SyntaxToken identifier
    TypeBindingSyntax typeBinding
    Returns
    Type Description
    NamedParameterSyntax
    | Improve this Doc View Source

    NamedParameter(String)

    Creates a new NamedParameterSyntax instance.

    Declaration
    public static NamedParameterSyntax NamedParameter(string identifier)
    Parameters
    Type Name Description
    System.String identifier
    Returns
    Type Description
    NamedParameterSyntax
    | Improve this Doc View Source

    NilableType(TypeSyntax)

    Creates a new NilableTypeSyntax instance.

    Declaration
    public static NilableTypeSyntax NilableType(TypeSyntax type)
    Parameters
    Type Name Description
    TypeSyntax type
    Returns
    Type Description
    NilableTypeSyntax
    | Improve this Doc View Source

    NilableType(TypeSyntax, SyntaxToken)

    Creates a new NilableTypeSyntax node.

    Declaration
    public static NilableTypeSyntax NilableType(TypeSyntax type, SyntaxToken questionToken)
    Parameters
    Type Name Description
    TypeSyntax type
    SyntaxToken questionToken
    Returns
    Type Description
    NilableTypeSyntax
    | Improve this Doc View Source

    NodeOrTokenList()

    Creates an empty SyntaxNodeOrTokenList.

    Declaration
    public static SyntaxNodeOrTokenList NodeOrTokenList()
    Returns
    Type Description
    SyntaxNodeOrTokenList
    | Improve this Doc View Source

    NodeOrTokenList(IEnumerable<SyntaxNodeOrToken>)

    Create a SyntaxNodeOrTokenList from a sequence of SyntaxNodeOrToken.

    Declaration
    public static SyntaxNodeOrTokenList NodeOrTokenList(IEnumerable<SyntaxNodeOrToken> nodesAndTokens)
    Parameters
    Type Name Description
    IEnumerable<SyntaxNodeOrToken> nodesAndTokens

    The sequence of nodes and tokens

    Returns
    Type Description
    SyntaxNodeOrTokenList
    | Improve this Doc View Source

    NodeOrTokenList(SyntaxNodeOrToken[])

    Create a SyntaxNodeOrTokenList from one or more SyntaxNodeOrToken.

    Declaration
    public static SyntaxNodeOrTokenList NodeOrTokenList(params SyntaxNodeOrToken[] nodesAndTokens)
    Parameters
    Type Name Description
    SyntaxNodeOrToken[] nodesAndTokens

    The nodes and tokens

    Returns
    Type Description
    SyntaxNodeOrTokenList
    | Improve this Doc View Source

    NumericForStatement(IdentifierNameSyntax, ExpressionSyntax, ExpressionSyntax, ExpressionSyntax, StatementListSyntax)

    Creates a new NumericForStatementSyntax node.

    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
    ExpressionSyntax stepValue
    StatementListSyntax body
    Returns
    Type Description
    NumericForStatementSyntax
    | Improve this Doc View Source

    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
    Type Name Description
    TypedIdentifierNameSyntax identifier
    ExpressionSyntax initialValue
    ExpressionSyntax finalValue
    ExpressionSyntax stepValue
    StatementListSyntax body
    Returns
    Type Description
    NumericForStatementSyntax
    | Improve this Doc View Source

    NumericForStatement(TypedIdentifierNameSyntax, ExpressionSyntax, ExpressionSyntax, StatementListSyntax)

    Creates a new NumericForStatementSyntax instance.

    Declaration
    public static NumericForStatementSyntax NumericForStatement(TypedIdentifierNameSyntax identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue, StatementListSyntax body)
    Parameters
    Type Name Description
    TypedIdentifierNameSyntax identifier
    ExpressionSyntax initialValue
    ExpressionSyntax finalValue
    StatementListSyntax body
    Returns
    Type Description
    NumericForStatementSyntax
    | Improve this Doc View Source

    NumericForStatement(SyntaxToken, IdentifierNameSyntax, SyntaxToken, ExpressionSyntax, SyntaxToken, ExpressionSyntax, SyntaxToken, ExpressionSyntax, SyntaxToken, StatementListSyntax, SyntaxToken, SyntaxToken)

    Creates a new NumericForStatementSyntax node.

    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
    Type Name Description
    SyntaxToken forKeyword
    IdentifierNameSyntax identifier
    SyntaxToken equalsToken
    ExpressionSyntax initialValue
    SyntaxToken finalValueCommaToken
    ExpressionSyntax finalValue
    SyntaxToken stepValueCommaToken
    ExpressionSyntax stepValue
    SyntaxToken doKeyword
    StatementListSyntax body
    SyntaxToken endKeyword
    SyntaxToken semicolonToken
    Returns
    Type Description
    NumericForStatementSyntax
    | Improve this Doc View Source

    NumericForStatement(SyntaxToken, TypedIdentifierNameSyntax, SyntaxToken, ExpressionSyntax, SyntaxToken, ExpressionSyntax, SyntaxToken, ExpressionSyntax, SyntaxToken, StatementListSyntax, SyntaxToken, SyntaxToken)

    Creates a new NumericForStatementSyntax node.

    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
    Type Name Description
    SyntaxToken forKeyword
    TypedIdentifierNameSyntax identifier
    SyntaxToken equalsToken
    ExpressionSyntax initialValue
    SyntaxToken finalValueCommaToken
    ExpressionSyntax finalValue
    SyntaxToken stepValueCommaToken
    ExpressionSyntax stepValue
    SyntaxToken doKeyword
    StatementListSyntax body
    SyntaxToken endKeyword
    SyntaxToken semicolonToken
    Returns
    Type Description
    NumericForStatementSyntax
    | Improve this Doc View Source

    NumericForStatement(String, ExpressionSyntax, ExpressionSyntax, ExpressionSyntax, StatementListSyntax)

    Creates a new NumericForStatementSyntax node.

    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
    ExpressionSyntax stepValue
    StatementListSyntax body
    Returns
    Type Description
    NumericForStatementSyntax
    | Improve this Doc View Source

    NumericForStatement(String, ExpressionSyntax, ExpressionSyntax, StatementListSyntax)

    Creates a new NumericForStatementSyntax instance.

    Declaration
    public static NumericForStatementSyntax NumericForStatement(string identifier, ExpressionSyntax initialValue, ExpressionSyntax finalValue, StatementListSyntax body)
    Parameters
    Type Name Description
    System.String identifier
    ExpressionSyntax initialValue
    ExpressionSyntax finalValue
    StatementListSyntax body
    Returns
    Type Description
    NumericForStatementSyntax
    | Improve this Doc View Source

    ParameterList(SeparatedSyntaxList<ParameterSyntax>)

    Creates a new ParameterListSyntax instance.

    Declaration
    public static ParameterListSyntax ParameterList(SeparatedSyntaxList<ParameterSyntax> parameters = default(SeparatedSyntaxList<ParameterSyntax>))
    Parameters
    Type Name Description
    SeparatedSyntaxList<ParameterSyntax> parameters
    Returns
    Type Description
    ParameterListSyntax
    | Improve this Doc View Source

    ParameterList(SyntaxToken, SeparatedSyntaxList<ParameterSyntax>, SyntaxToken)

    Creates a new ParameterListSyntax node.

    Declaration
    public static ParameterListSyntax ParameterList(SyntaxToken openParenthesisToken, SeparatedSyntaxList<ParameterSyntax> parameters, SyntaxToken closeParenthesisToken)
    Parameters
    Type Name Description
    SyntaxToken openParenthesisToken
    SeparatedSyntaxList<ParameterSyntax> parameters
    SyntaxToken closeParenthesisToken
    Returns
    Type Description
    ParameterListSyntax
    | Improve this Doc View Source

    ParenthesizedExpression(ExpressionSyntax)

    Creates a new ParenthesizedExpressionSyntax instance.

    Declaration
    public static ParenthesizedExpressionSyntax ParenthesizedExpression(ExpressionSyntax expression)
    Parameters
    Type Name Description
    ExpressionSyntax expression
    Returns
    Type Description
    ParenthesizedExpressionSyntax
    | Improve this Doc View Source

    ParenthesizedExpression(SyntaxToken, ExpressionSyntax, SyntaxToken)

    Creates a new ParenthesizedExpressionSyntax node.

    Declaration
    public static ParenthesizedExpressionSyntax ParenthesizedExpression(SyntaxToken openParenthesisToken, ExpressionSyntax expression, SyntaxToken closeParenthesisToken)
    Parameters
    Type Name Description
    SyntaxToken openParenthesisToken
    ExpressionSyntax expression
    SyntaxToken closeParenthesisToken
    Returns
    Type Description
    ParenthesizedExpressionSyntax
    | Improve this Doc View Source

    ParenthesizedType(TypeSyntax)

    Creates a new ParenthesizedTypeSyntax instance.

    Declaration
    public static ParenthesizedTypeSyntax ParenthesizedType(TypeSyntax type)
    Parameters
    Type Name Description
    TypeSyntax type
    Returns
    Type Description
    ParenthesizedTypeSyntax
    | Improve this Doc View Source

    ParenthesizedType(SyntaxToken, TypeSyntax, SyntaxToken)

    Creates a new ParenthesizedTypeSyntax node.

    Declaration
    public static ParenthesizedTypeSyntax ParenthesizedType(SyntaxToken openParenthesisToken, TypeSyntax type, SyntaxToken closeParenthesisToken)
    Parameters
    Type Name Description
    SyntaxToken openParenthesisToken
    TypeSyntax type
    SyntaxToken closeParenthesisToken
    Returns
    Type Description
    ParenthesizedTypeSyntax
    | Improve this Doc View Source

    ParseCompilationUnit(SourceText, LuaParseOptions)

    Parse a CompilationUnitSyntax using the grammar rule for an entire compilation unit (file). To produce a SyntaxTree instance, use ParseText(SourceText, LuaParseOptions, String, CancellationToken) instead.

    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
    | Improve this Doc View Source

    ParseCompilationUnit(String, Int32, LuaParseOptions)

    Parse a CompilationUnitSyntax using the grammar rule for an entire compilation unit (file). To produce a SyntaxTree instance, use ParseText(String, LuaParseOptions, String, Encoding, CancellationToken) instead.

    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
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    ParseLeadingTrivia(SourceText, LuaParseOptions)

    Parse a list of trivia rules for leading trivia.

    Declaration
    public static SyntaxTriviaList ParseLeadingTrivia(SourceText text, LuaParseOptions options)
    Parameters
    Type Name Description
    SourceText text
    LuaParseOptions options
    Returns
    Type Description
    SyntaxTriviaList
    | Improve this Doc View Source

    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
    Type Description
    SyntaxTriviaList
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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
    Type Description
    SyntaxTree
    | Improve this Doc View Source

    ParseSyntaxTree(String, ParseOptions, String, 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.Text.Encoding encoding
    CancellationToken cancellationToken
    Returns
    Type Description
    SyntaxTree
    | Improve this Doc View Source

    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
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    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
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    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
    Type Description
    IEnumerable<SyntaxToken>
    | Improve this Doc View Source

    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
    Type Description
    IEnumerable<SyntaxToken>
    | Improve this Doc View Source

    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
    Type Name Description
    SourceText text
    LuaParseOptions options
    Returns
    Type Description
    SyntaxTriviaList
    | Improve this Doc View Source

    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
    Type Description
    SyntaxTriviaList
    | Improve this Doc View Source

    ParseType(SourceText, LuaParseOptions, Boolean)

    Parse a TypeSyntax 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
    | Improve this Doc View Source

    ParseType(String, Int32, LuaParseOptions, Boolean)

    Parse a TypeSyntax 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
    | Improve this Doc View Source

    RepeatUntilStatement(StatementListSyntax, ExpressionSyntax)

    Creates a new RepeatUntilStatementSyntax instance.

    Declaration
    public static RepeatUntilStatementSyntax RepeatUntilStatement(StatementListSyntax body, ExpressionSyntax condition)
    Parameters
    Type Name Description
    StatementListSyntax body
    ExpressionSyntax condition
    Returns
    Type Description
    RepeatUntilStatementSyntax
    | Improve this Doc View Source

    RepeatUntilStatement(SyntaxToken, StatementListSyntax, SyntaxToken, ExpressionSyntax, SyntaxToken)

    Creates a new RepeatUntilStatementSyntax node.

    Declaration
    public static RepeatUntilStatementSyntax RepeatUntilStatement(SyntaxToken repeatKeyword, StatementListSyntax body, SyntaxToken untilKeyword, ExpressionSyntax condition, SyntaxToken semicolonToken)
    Parameters
    Type Name Description
    SyntaxToken repeatKeyword
    StatementListSyntax body
    SyntaxToken untilKeyword
    ExpressionSyntax condition
    SyntaxToken semicolonToken
    Returns
    Type Description
    RepeatUntilStatementSyntax
    | Improve this Doc View Source

    ReturnStatement(SeparatedSyntaxList<ExpressionSyntax>)

    Creates a new ReturnStatementSyntax instance.

    Declaration
    public static ReturnStatementSyntax ReturnStatement(SeparatedSyntaxList<ExpressionSyntax> expressions = default(SeparatedSyntaxList<ExpressionSyntax>))
    Parameters
    Type Name Description
    SeparatedSyntaxList<ExpressionSyntax> expressions
    Returns
    Type Description
    ReturnStatementSyntax
    | Improve this Doc View Source

    ReturnStatement(SyntaxToken, SeparatedSyntaxList<ExpressionSyntax>, SyntaxToken)

    Creates a new ReturnStatementSyntax node.

    Declaration
    public static ReturnStatementSyntax ReturnStatement(SyntaxToken returnKeyword, SeparatedSyntaxList<ExpressionSyntax> expressions, SyntaxToken semicolonToken)
    Parameters
    Type Name Description
    SyntaxToken returnKeyword
    SeparatedSyntaxList<ExpressionSyntax> expressions
    SyntaxToken semicolonToken
    Returns
    Type Description
    ReturnStatementSyntax
    | Improve this Doc View Source

    SeparatedList<TNode>()

    Creates an empty separated list.

    Declaration
    public static SeparatedSyntaxList<TNode> SeparatedList<TNode>()
        where TNode : SyntaxNode
    Returns
    Type Description
    SeparatedSyntaxList<TNode>
    Type Parameters
    Name Description
    TNode

    The specific type of the element nodes.

    | Improve this Doc View Source

    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 Description
    SeparatedSyntaxList<TNode>
    Type Parameters
    Name Description
    TNode

    The specific type of the element nodes.

    | Improve this Doc View Source

    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 Description
    SeparatedSyntaxList<TNode>
    Type Parameters
    Name Description
    TNode

    The specific type of the element nodes.

    | Improve this Doc View Source

    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
    Type Name Description
    SyntaxNodeOrTokenList nodesAndTokens

    The list of nodes and tokens.

    Returns
    Type Description
    SeparatedSyntaxList<TNode>
    Type Parameters
    Name Description
    TNode

    The specific type of the element nodes.

    | Improve this Doc View Source

    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 Description
    SeparatedSyntaxList<TNode>
    Type Parameters
    Name Description
    TNode

    The specific type of the element nodes.

    | Improve this Doc View Source

    SimpleFunctionName(SyntaxToken)

    Creates a new SimpleFunctionNameSyntax node.

    Declaration
    public static SimpleFunctionNameSyntax SimpleFunctionName(SyntaxToken name)
    Parameters
    Type Name Description
    SyntaxToken name
    Returns
    Type Description
    SimpleFunctionNameSyntax
    | Improve this Doc View Source

    SimpleTypeName(SyntaxToken)

    Creates a new SimpleTypeNameSyntax instance.

    Declaration
    public static SimpleTypeNameSyntax SimpleTypeName(SyntaxToken identifierToken)
    Parameters
    Type Name Description
    SyntaxToken identifierToken
    Returns
    Type Description
    SimpleTypeNameSyntax
    | Improve this Doc View Source

    SimpleTypeName(SyntaxToken, TypeArgumentListSyntax)

    Creates a new SimpleTypeNameSyntax node.

    Declaration
    public static SimpleTypeNameSyntax SimpleTypeName(SyntaxToken identifierToken, TypeArgumentListSyntax typeArgumentList)
    Parameters
    Type Name Description
    SyntaxToken identifierToken
    TypeArgumentListSyntax typeArgumentList
    Returns
    Type Description
    SimpleTypeNameSyntax
    | Improve this Doc View Source

    SimpleTypeName(String)

    Creates a new SimpleTypeNameSyntax instance.

    Declaration
    public static SimpleTypeNameSyntax SimpleTypeName(string identifierToken)
    Parameters
    Type Name Description
    System.String identifierToken
    Returns
    Type Description
    SimpleTypeNameSyntax
    | Improve this Doc View Source

    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 Description
    SyntaxList<TNode>
    Type Parameters
    Name Description
    TNode

    The specific type of the element nodes.

    | Improve this Doc View Source

    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 Description
    SeparatedSyntaxList<TNode>
    Type Parameters
    Name Description
    TNode

    The specific type of the element nodes.

    | Improve this Doc View Source

    SkippedTokensTrivia()

    Creates a new SkippedTokensTriviaSyntax instance.

    Declaration
    public static SkippedTokensTriviaSyntax SkippedTokensTrivia()
    Returns
    Type Description
    SkippedTokensTriviaSyntax
    | Improve this Doc View Source

    SkippedTokensTrivia(SyntaxTokenList)

    Declaration
    public static SkippedTokensTriviaSyntax SkippedTokensTrivia(SyntaxTokenList tokens)
    Parameters
    Type Name Description
    SyntaxTokenList tokens
    Returns
    Type Description
    SkippedTokensTriviaSyntax
    | Improve this Doc View Source

    StatementList()

    Creates a new StatementListSyntax instance.

    Declaration
    public static StatementListSyntax StatementList()
    Returns
    Type Description
    StatementListSyntax
    | Improve this Doc View Source

    StatementList(IEnumerable<StatementSyntax>)

    Creates a new StatementListSyntax instance.

    Declaration
    public static StatementListSyntax StatementList(IEnumerable<StatementSyntax> statements)
    Parameters
    Type Name Description
    IEnumerable<StatementSyntax> statements
    Returns
    Type Description
    StatementListSyntax
    | Improve this Doc View Source

    StatementList(StatementSyntax[])

    Creates a new StatementListSyntax instance.

    Declaration
    public static StatementListSyntax StatementList(params StatementSyntax[] statements)
    Parameters
    Type Name Description
    StatementSyntax[] statements
    Returns
    Type Description
    StatementListSyntax
    | Improve this Doc View Source

    StatementList(SyntaxList<StatementSyntax>)

    Creates a new StatementListSyntax node.

    Declaration
    public static StatementListSyntax StatementList(SyntaxList<StatementSyntax> statements)
    Parameters
    Type Name Description
    SyntaxList<StatementSyntax> statements
    Returns
    Type Description
    StatementListSyntax
    | Improve this Doc View Source

    StringFunctionArgument(LiteralExpressionSyntax)

    Creates a new StringFunctionArgumentSyntax node.

    Declaration
    public static StringFunctionArgumentSyntax StringFunctionArgument(LiteralExpressionSyntax expression)
    Parameters
    Type Name Description
    LiteralExpressionSyntax expression
    Returns
    Type Description
    StringFunctionArgumentSyntax
    | Improve this Doc View Source

    SyntaxTree(SyntaxNode, ParseOptions, String, 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.Text.Encoding encoding
    Returns
    Type Description
    SyntaxTree
    | Improve this Doc View Source

    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
    Type Name Description
    SyntaxKind kind

    A SyntaxKind representing the specific kind of SyntaxTrivia(SyntaxKind, String). One of ShebangTrivia, EndOfLineTrivia, SingleLineCommentTrivia, MultiLineCommentTrivia, WhitespaceTrivia

    System.String text

    The actual text of this token.

    Returns
    Type Description
    SyntaxTrivia
    | Improve this Doc View Source

    TableConstructorExpression(SeparatedSyntaxList<TableFieldSyntax>)

    Creates a new TableConstructorExpressionSyntax instance.

    Declaration
    public static TableConstructorExpressionSyntax TableConstructorExpression(SeparatedSyntaxList<TableFieldSyntax> fields = default(SeparatedSyntaxList<TableFieldSyntax>))
    Parameters
    Type Name Description
    SeparatedSyntaxList<TableFieldSyntax> fields
    Returns
    Type Description
    TableConstructorExpressionSyntax
    | Improve this Doc View Source

    TableConstructorExpression(SyntaxToken, SeparatedSyntaxList<TableFieldSyntax>, SyntaxToken)

    Creates a new TableConstructorExpressionSyntax node.

    Declaration
    public static TableConstructorExpressionSyntax TableConstructorExpression(SyntaxToken openBraceToken, SeparatedSyntaxList<TableFieldSyntax> fields, SyntaxToken closeBraceToken)
    Parameters
    Type Name Description
    SyntaxToken openBraceToken
    SeparatedSyntaxList<TableFieldSyntax> fields
    SyntaxToken closeBraceToken
    Returns
    Type Description
    TableConstructorExpressionSyntax
    | Improve this Doc View Source

    TableConstructorFunctionArgument(TableConstructorExpressionSyntax)

    Creates a new TableConstructorFunctionArgumentSyntax node.

    Declaration
    public static TableConstructorFunctionArgumentSyntax TableConstructorFunctionArgument(TableConstructorExpressionSyntax tableConstructor)
    Parameters
    Type Name Description
    TableConstructorExpressionSyntax tableConstructor
    Returns
    Type Description
    TableConstructorFunctionArgumentSyntax
    | Improve this Doc View Source

    TableType(SeparatedSyntaxList<TableTypeElementSyntax>)

    Creates a new TableTypeSyntax instance.

    Declaration
    public static TableTypeSyntax TableType(SeparatedSyntaxList<TableTypeElementSyntax> elements = default(SeparatedSyntaxList<TableTypeElementSyntax>))
    Parameters
    Type Name Description
    SeparatedSyntaxList<TableTypeElementSyntax> elements
    Returns
    Type Description
    TableTypeSyntax
    | Improve this Doc View Source

    TableType(SyntaxToken, SeparatedSyntaxList<TableTypeElementSyntax>, SyntaxToken)

    Creates a new TableTypeSyntax node.

    Declaration
    public static TableTypeSyntax TableType(SyntaxToken openBraceToken, SeparatedSyntaxList<TableTypeElementSyntax> elements, SyntaxToken closeBraceToken)
    Parameters
    Type Name Description
    SyntaxToken openBraceToken
    SeparatedSyntaxList<TableTypeElementSyntax> elements
    SyntaxToken closeBraceToken
    Returns
    Type Description
    TableTypeSyntax
    | Improve this Doc View Source

    TableTypeIndexer(TypeSyntax, TypeSyntax)

    Creates a new TableTypeIndexerSyntax instance.

    Declaration
    public static TableTypeIndexerSyntax TableTypeIndexer(TypeSyntax indexType, TypeSyntax valueType)
    Parameters
    Type Name Description
    TypeSyntax indexType
    TypeSyntax valueType
    Returns
    Type Description
    TableTypeIndexerSyntax
    | Improve this Doc View Source

    TableTypeIndexer(SyntaxToken, TypeSyntax, SyntaxToken, SyntaxToken, TypeSyntax)

    Creates a new TableTypeIndexerSyntax node.

    Declaration
    public static TableTypeIndexerSyntax TableTypeIndexer(SyntaxToken openBracketToken, TypeSyntax indexType, SyntaxToken closeBracketToken, SyntaxToken colonToken, TypeSyntax valueType)
    Parameters
    Type Name Description
    SyntaxToken openBracketToken
    TypeSyntax indexType
    SyntaxToken closeBracketToken
    SyntaxToken colonToken
    TypeSyntax valueType
    Returns
    Type Description
    TableTypeIndexerSyntax
    | Improve this Doc View Source

    TableTypeProperty(SyntaxToken, TypeSyntax)

    Creates a new TableTypePropertySyntax instance.

    Declaration
    public static TableTypePropertySyntax TableTypeProperty(SyntaxToken identifier, TypeSyntax valueType)
    Parameters
    Type Name Description
    SyntaxToken identifier
    TypeSyntax valueType
    Returns
    Type Description
    TableTypePropertySyntax
    | Improve this Doc View Source

    TableTypeProperty(SyntaxToken, SyntaxToken, TypeSyntax)

    Creates a new TableTypePropertySyntax node.

    Declaration
    public static TableTypePropertySyntax TableTypeProperty(SyntaxToken identifier, SyntaxToken colonToken, TypeSyntax valueType)
    Parameters
    Type Name Description
    SyntaxToken identifier
    SyntaxToken colonToken
    TypeSyntax valueType
    Returns
    Type Description
    TableTypePropertySyntax
    | Improve this Doc View Source

    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
    Type Description
    TableTypePropertySyntax
    | Improve this Doc View Source

    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
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    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
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    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
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    TokenList()

    Creates an empty list of tokens.

    Declaration
    public static SyntaxTokenList TokenList()
    Returns
    Type Description
    SyntaxTokenList
    | Improve this Doc View Source

    TokenList(IEnumerable<SyntaxToken>)

    Creates a list of tokens.

    Declaration
    public static SyntaxTokenList TokenList(IEnumerable<SyntaxToken> tokens)
    Parameters
    Type Name Description
    IEnumerable<SyntaxToken> tokens
    Returns
    Type Description
    SyntaxTokenList
    | Improve this Doc View Source

    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
    Type Description
    SyntaxTokenList
    | Improve this Doc View Source

    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
    Type Description
    SyntaxTokenList
    | Improve this Doc View Source

    Trivia(StructuredTriviaSyntax)

    Creates a trivia from a StructuredTriviaSyntax node.

    Declaration
    public static SyntaxTrivia Trivia(StructuredTriviaSyntax node)
    Parameters
    Type Name Description
    StructuredTriviaSyntax node
    Returns
    Type Description
    SyntaxTrivia
    | Improve this Doc View Source

    TriviaList()

    Creates an empty list of trivia.

    Declaration
    public static SyntaxTriviaList TriviaList()
    Returns
    Type Description
    SyntaxTriviaList
    | Improve this Doc View Source

    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
    Type Description
    SyntaxTriviaList
    | Improve this Doc View Source

    TriviaList(SyntaxTrivia)

    Creates a singleton list of trivia.

    Declaration
    public static SyntaxTriviaList TriviaList(SyntaxTrivia trivia)
    Parameters
    Type Name Description
    SyntaxTrivia trivia

    A single trivia.

    Returns
    Type Description
    SyntaxTriviaList
    | Improve this Doc View Source

    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
    Type Description
    SyntaxTriviaList
    | Improve this Doc View Source

    TypeArgumentList(SeparatedSyntaxList<TypeSyntax>)

    Creates a new TypeArgumentListSyntax instance.

    Declaration
    public static TypeArgumentListSyntax TypeArgumentList(SeparatedSyntaxList<TypeSyntax> arguments = default(SeparatedSyntaxList<TypeSyntax>))
    Parameters
    Type Name Description
    SeparatedSyntaxList<TypeSyntax> arguments
    Returns
    Type Description
    TypeArgumentListSyntax
    | Improve this Doc View Source

    TypeArgumentList(SyntaxToken, SeparatedSyntaxList<TypeSyntax>, SyntaxToken)

    Creates a new TypeArgumentListSyntax node.

    Declaration
    public static TypeArgumentListSyntax TypeArgumentList(SyntaxToken lessThanToken, SeparatedSyntaxList<TypeSyntax> arguments, SyntaxToken greaterThanToken)
    Parameters
    Type Name Description
    SyntaxToken lessThanToken
    SeparatedSyntaxList<TypeSyntax> arguments
    SyntaxToken greaterThanToken
    Returns
    Type Description
    TypeArgumentListSyntax
    | Improve this Doc View Source

    TypeBinding(TypeSyntax)

    Creates a new TypeBindingSyntax instance.

    Declaration
    public static TypeBindingSyntax TypeBinding(TypeSyntax type)
    Parameters
    Type Name Description
    TypeSyntax type
    Returns
    Type Description
    TypeBindingSyntax
    | Improve this Doc View Source

    TypeBinding(SyntaxToken, TypeSyntax)

    Creates a new TypeBindingSyntax node.

    Declaration
    public static TypeBindingSyntax TypeBinding(SyntaxToken colonToken, TypeSyntax type)
    Parameters
    Type Name Description
    SyntaxToken colonToken
    TypeSyntax type
    Returns
    Type Description
    TypeBindingSyntax
    | Improve this Doc View Source

    TypeCastExpression(ExpressionSyntax, TypeSyntax)

    Creates a new TypeCastExpressionSyntax instance.

    Declaration
    public static TypeCastExpressionSyntax TypeCastExpression(ExpressionSyntax expression, TypeSyntax type)
    Parameters
    Type Name Description
    ExpressionSyntax expression
    TypeSyntax type
    Returns
    Type Description
    TypeCastExpressionSyntax
    | Improve this Doc View Source

    TypeCastExpression(ExpressionSyntax, SyntaxToken, TypeSyntax)

    Creates a new TypeCastExpressionSyntax node.

    Declaration
    public static TypeCastExpressionSyntax TypeCastExpression(ExpressionSyntax expression, SyntaxToken colonColonToken, TypeSyntax type)
    Parameters
    Type Name Description
    ExpressionSyntax expression
    SyntaxToken colonColonToken
    TypeSyntax type
    Returns
    Type Description
    TypeCastExpressionSyntax
    | Improve this Doc View Source

    TypeDeclarationStatement(SyntaxToken, TypeParameterListSyntax, TypeSyntax)

    Creates a new TypeDeclarationStatementSyntax instance.

    Declaration
    public static TypeDeclarationStatementSyntax TypeDeclarationStatement(SyntaxToken name, TypeParameterListSyntax typeParameterList, TypeSyntax type)
    Parameters
    Type Name Description
    SyntaxToken name
    TypeParameterListSyntax typeParameterList
    TypeSyntax type
    Returns
    Type Description
    TypeDeclarationStatementSyntax
    | Improve this Doc View Source

    TypeDeclarationStatement(SyntaxToken, TypeSyntax)

    Creates a new TypeDeclarationStatementSyntax instance.

    Declaration
    public static TypeDeclarationStatementSyntax TypeDeclarationStatement(SyntaxToken name, TypeSyntax type)
    Parameters
    Type Name Description
    SyntaxToken name
    TypeSyntax type
    Returns
    Type Description
    TypeDeclarationStatementSyntax
    | Improve this Doc View Source

    TypeDeclarationStatement(SyntaxToken, SyntaxToken, SyntaxToken, TypeParameterListSyntax, SyntaxToken, TypeSyntax, SyntaxToken)

    Creates a new TypeDeclarationStatementSyntax node.

    Declaration
    public static TypeDeclarationStatementSyntax TypeDeclarationStatement(SyntaxToken exportKeyword, SyntaxToken typeKeyword, SyntaxToken name, TypeParameterListSyntax typeParameterList, SyntaxToken equalsToken, TypeSyntax type, SyntaxToken semicolonToken)
    Parameters
    Type Name Description
    SyntaxToken exportKeyword
    SyntaxToken typeKeyword
    SyntaxToken name
    TypeParameterListSyntax typeParameterList
    SyntaxToken equalsToken
    TypeSyntax type
    SyntaxToken semicolonToken
    Returns
    Type Description
    TypeDeclarationStatementSyntax
    | Improve this Doc View Source

    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
    Type Description
    TypeDeclarationStatementSyntax
    | Improve this Doc View Source

    TypedIdentifierName(IdentifierNameSyntax)

    Creates a new TypedIdentifierNameSyntax instance.

    Declaration
    public static TypedIdentifierNameSyntax TypedIdentifierName(IdentifierNameSyntax identifierName)
    Parameters
    Type Name Description
    IdentifierNameSyntax identifierName
    Returns
    Type Description
    TypedIdentifierNameSyntax
    | Improve this Doc View Source

    TypedIdentifierName(IdentifierNameSyntax, TypeBindingSyntax)

    Creates a new TypedIdentifierNameSyntax node.

    Declaration
    public static TypedIdentifierNameSyntax TypedIdentifierName(IdentifierNameSyntax identifierName, TypeBindingSyntax typeBinding)
    Parameters
    Type Name Description
    IdentifierNameSyntax identifierName
    TypeBindingSyntax typeBinding
    Returns
    Type Description
    TypedIdentifierNameSyntax
    | Improve this Doc View Source

    TypedIdentifierName(String)

    Creates a new TypedIdentifierNameSyntax instance.

    Declaration
    public static TypedIdentifierNameSyntax TypedIdentifierName(string identifierName)
    Parameters
    Type Name Description
    System.String identifierName
    Returns
    Type Description
    TypedIdentifierNameSyntax
    | Improve this Doc View Source

    TypeofType(ExpressionSyntax)

    Creates a new TypeofTypeSyntax instance.

    Declaration
    public static TypeofTypeSyntax TypeofType(ExpressionSyntax expression)
    Parameters
    Type Name Description
    ExpressionSyntax expression
    Returns
    Type Description
    TypeofTypeSyntax
    | Improve this Doc View Source

    TypeofType(SyntaxToken, SyntaxToken, ExpressionSyntax, SyntaxToken)

    Creates a new TypeofTypeSyntax node.

    Declaration
    public static TypeofTypeSyntax TypeofType(SyntaxToken typeofKeyword, SyntaxToken openParenthesisToken, ExpressionSyntax expression, SyntaxToken closeParenthesisToken)
    Parameters
    Type Name Description
    SyntaxToken typeofKeyword
    SyntaxToken openParenthesisToken
    ExpressionSyntax expression
    SyntaxToken closeParenthesisToken
    Returns
    Type Description
    TypeofTypeSyntax
    | Improve this Doc View Source

    TypePack(SeparatedSyntaxList<TypeSyntax>)

    Creates a new TypePackSyntax instance.

    Declaration
    public static TypePackSyntax TypePack(SeparatedSyntaxList<TypeSyntax> types = default(SeparatedSyntaxList<TypeSyntax>))
    Parameters
    Type Name Description
    SeparatedSyntaxList<TypeSyntax> types
    Returns
    Type Description
    TypePackSyntax
    | Improve this Doc View Source

    TypePack(SyntaxToken, SeparatedSyntaxList<TypeSyntax>, SyntaxToken)

    Creates a new TypePackSyntax node.

    Declaration
    public static TypePackSyntax TypePack(SyntaxToken openParenthesisToken, SeparatedSyntaxList<TypeSyntax> types, SyntaxToken closeParenthesisToken)
    Parameters
    Type Name Description
    SyntaxToken openParenthesisToken
    SeparatedSyntaxList<TypeSyntax> types
    SyntaxToken closeParenthesisToken
    Returns
    Type Description
    TypePackSyntax
    | Improve this Doc View Source

    TypeParameter(SyntaxToken)

    Creates a new TypeParameterSyntax instance.

    Declaration
    public static TypeParameterSyntax TypeParameter(SyntaxToken identifier)
    Parameters
    Type Name Description
    SyntaxToken identifier
    Returns
    Type Description
    TypeParameterSyntax
    | Improve this Doc View Source

    TypeParameter(SyntaxToken, EqualsTypeSyntax)

    Creates a new TypeParameterSyntax instance.

    Declaration
    public static TypeParameterSyntax TypeParameter(SyntaxToken identifier, EqualsTypeSyntax equalsType)
    Parameters
    Type Name Description
    SyntaxToken identifier
    EqualsTypeSyntax equalsType
    Returns
    Type Description
    TypeParameterSyntax
    | Improve this Doc View Source

    TypeParameter(SyntaxToken, SyntaxToken, EqualsTypeSyntax)

    Creates a new TypeParameterSyntax node.

    Declaration
    public static TypeParameterSyntax TypeParameter(SyntaxToken identifier, SyntaxToken dotDotDotToken, EqualsTypeSyntax equalsType)
    Parameters
    Type Name Description
    SyntaxToken identifier
    SyntaxToken dotDotDotToken
    EqualsTypeSyntax equalsType
    Returns
    Type Description
    TypeParameterSyntax
    | Improve this Doc View Source

    TypeParameter(String)

    Creates a new TypeParameterSyntax instance.

    Declaration
    public static TypeParameterSyntax TypeParameter(string identifier)
    Parameters
    Type Name Description
    System.String identifier
    Returns
    Type Description
    TypeParameterSyntax
    | Improve this Doc View Source

    TypeParameterList(SeparatedSyntaxList<TypeParameterSyntax>)

    Creates a new TypeParameterListSyntax instance.

    Declaration
    public static TypeParameterListSyntax TypeParameterList(SeparatedSyntaxList<TypeParameterSyntax> names = default(SeparatedSyntaxList<TypeParameterSyntax>))
    Parameters
    Type Name Description
    SeparatedSyntaxList<TypeParameterSyntax> names
    Returns
    Type Description
    TypeParameterListSyntax
    | Improve this Doc View Source

    TypeParameterList(SyntaxToken, SeparatedSyntaxList<TypeParameterSyntax>, SyntaxToken)

    Creates a new TypeParameterListSyntax node.

    Declaration
    public static TypeParameterListSyntax TypeParameterList(SyntaxToken lessThanToken, SeparatedSyntaxList<TypeParameterSyntax> names, SyntaxToken greaterThanToken)
    Parameters
    Type Name Description
    SyntaxToken lessThanToken
    SeparatedSyntaxList<TypeParameterSyntax> names
    SyntaxToken greaterThanToken
    Returns
    Type Description
    TypeParameterListSyntax
    | Improve this Doc View Source

    UnaryExpression(SyntaxKind, SyntaxToken, ExpressionSyntax)

    Creates a new UnaryExpressionSyntax node.

    Declaration
    public static UnaryExpressionSyntax UnaryExpression(SyntaxKind kind, SyntaxToken operatorToken, ExpressionSyntax operand)
    Parameters
    Type Name Description
    SyntaxKind kind
    SyntaxToken operatorToken
    ExpressionSyntax operand
    Returns
    Type Description
    UnaryExpressionSyntax
    | Improve this Doc View Source

    UnionType(TypeSyntax, TypeSyntax)

    Creates a new UnionTypeSyntax instance.

    Declaration
    public static UnionTypeSyntax UnionType(TypeSyntax left, TypeSyntax right)
    Parameters
    Type Name Description
    TypeSyntax left
    TypeSyntax right
    Returns
    Type Description
    UnionTypeSyntax
    | Improve this Doc View Source

    UnionType(TypeSyntax, SyntaxToken, TypeSyntax)

    Creates a new UnionTypeSyntax node.

    Declaration
    public static UnionTypeSyntax UnionType(TypeSyntax left, SyntaxToken pipeToken, TypeSyntax right)
    Parameters
    Type Name Description
    TypeSyntax left
    SyntaxToken pipeToken
    TypeSyntax right
    Returns
    Type Description
    UnionTypeSyntax
    | Improve this Doc View Source

    UnkeyedTableField(ExpressionSyntax)

    Creates a new UnkeyedTableFieldSyntax node.

    Declaration
    public static UnkeyedTableFieldSyntax UnkeyedTableField(ExpressionSyntax value)
    Parameters
    Type Name Description
    ExpressionSyntax value
    Returns
    Type Description
    UnkeyedTableFieldSyntax
    | Improve this Doc View Source

    VarArgExpression()

    Creates a new VarArgExpressionSyntax instance.

    Declaration
    public static VarArgExpressionSyntax VarArgExpression()
    Returns
    Type Description
    VarArgExpressionSyntax
    | Improve this Doc View Source

    VarArgExpression(SyntaxToken)

    Creates a new VarArgExpressionSyntax node.

    Declaration
    public static VarArgExpressionSyntax VarArgExpression(SyntaxToken varArgToken)
    Parameters
    Type Name Description
    SyntaxToken varArgToken
    Returns
    Type Description
    VarArgExpressionSyntax
    | Improve this Doc View Source

    VarArgParameter(TypeBindingSyntax)

    Creates a new VarArgParameterSyntax instance.

    Declaration
    public static VarArgParameterSyntax VarArgParameter(TypeBindingSyntax typeBinding = null)
    Parameters
    Type Name Description
    TypeBindingSyntax typeBinding
    Returns
    Type Description
    VarArgParameterSyntax
    | Improve this Doc View Source

    VarArgParameter(SyntaxToken, TypeBindingSyntax)

    Creates a new VarArgParameterSyntax node.

    Declaration
    public static VarArgParameterSyntax VarArgParameter(SyntaxToken varArgToken, TypeBindingSyntax typeBinding)
    Parameters
    Type Name Description
    SyntaxToken varArgToken
    TypeBindingSyntax typeBinding
    Returns
    Type Description
    VarArgParameterSyntax
    | Improve this Doc View Source

    VariableAttribute(SyntaxToken)

    Creates a new VariableAttributeSyntax instance.

    Declaration
    public static VariableAttributeSyntax VariableAttribute(SyntaxToken identifier)
    Parameters
    Type Name Description
    SyntaxToken identifier
    Returns
    Type Description
    VariableAttributeSyntax
    | Improve this Doc View Source

    VariableAttribute(SyntaxToken, SyntaxToken, SyntaxToken)

    Creates a new VariableAttributeSyntax node.

    Declaration
    public static VariableAttributeSyntax VariableAttribute(SyntaxToken lessThanToken, SyntaxToken identifier, SyntaxToken greaterThanToken)
    Parameters
    Type Name Description
    SyntaxToken lessThanToken
    SyntaxToken identifier
    SyntaxToken greaterThanToken
    Returns
    Type Description
    VariableAttributeSyntax
    | Improve this Doc View Source

    VariableAttribute(String)

    Creates a new VariableAttributeSyntax instance.

    Declaration
    public static VariableAttributeSyntax VariableAttribute(string identifier)
    Parameters
    Type Name Description
    System.String identifier
    Returns
    Type Description
    VariableAttributeSyntax
    | Improve this Doc View Source

    VariadicTypePack(TypeSyntax)

    Creates a new VariadicTypePackSyntax instance.

    Declaration
    public static VariadicTypePackSyntax VariadicTypePack(TypeSyntax type)
    Parameters
    Type Name Description
    TypeSyntax type
    Returns
    Type Description
    VariadicTypePackSyntax
    | Improve this Doc View Source

    VariadicTypePack(SyntaxToken, TypeSyntax)

    Creates a new VariadicTypePackSyntax node.

    Declaration
    public static VariadicTypePackSyntax VariadicTypePack(SyntaxToken dotDotDotToken, TypeSyntax type)
    Parameters
    Type Name Description
    SyntaxToken dotDotDotToken
    TypeSyntax type
    Returns
    Type Description
    VariadicTypePackSyntax
    | Improve this Doc View Source

    WhileStatement(ExpressionSyntax, StatementListSyntax)

    Creates a new WhileStatementSyntax instance.

    Declaration
    public static WhileStatementSyntax WhileStatement(ExpressionSyntax condition, StatementListSyntax body)
    Parameters
    Type Name Description
    ExpressionSyntax condition
    StatementListSyntax body
    Returns
    Type Description
    WhileStatementSyntax
    | Improve this Doc View Source

    WhileStatement(SyntaxToken, ExpressionSyntax, SyntaxToken, StatementListSyntax, SyntaxToken, SyntaxToken)

    Creates a new WhileStatementSyntax node.

    Declaration
    public static WhileStatementSyntax WhileStatement(SyntaxToken whileKeyword, ExpressionSyntax condition, SyntaxToken doKeyword, StatementListSyntax body, SyntaxToken endKeyword, SyntaxToken semicolonToken)
    Parameters
    Type Name Description
    SyntaxToken whileKeyword
    ExpressionSyntax condition
    SyntaxToken doKeyword
    StatementListSyntax body
    SyntaxToken endKeyword
    SyntaxToken semicolonToken
    Returns
    Type Description
    WhileStatementSyntax
    | Improve this Doc View Source

    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
    Type Description
    SyntaxTrivia
    • Improve this Doc
    • View Source
    ☀
    ☾
    In This Article
    Back to top

    Copyright (c) LorettaDevs

    Generated by DocFX

    ☀
    ☾