Search Results for

    Show / Hide Table of Contents

    Class IfStatementSyntax

    Represents an if statement.

    Inheritance
    System.Object
    SyntaxNode
    LuaSyntaxNode
    StatementSyntax
    IfStatementSyntax
    Implements
    IFormattable
    Inherited Members
    LuaSyntaxNode.Kind()
    LuaSyntaxNode.Language
    LuaSyntaxNode.GetLeadingTrivia()
    LuaSyntaxNode.GetTrailingTrivia()
    LuaSyntaxNode.DeserializeFrom(Stream, CancellationToken)
    LuaSyntaxNode.GetLocation()
    LuaSyntaxNode.GetDiagnostics()
    LuaSyntaxNode.GetFirstToken(Boolean, Boolean, Boolean, Boolean)
    LuaSyntaxNode.GetLastToken(Boolean, Boolean, Boolean, Boolean)
    LuaSyntaxNode.FindToken(Int32, Boolean)
    LuaSyntaxNode.FindTrivia(Int32, Func<SyntaxTrivia, Boolean>)
    LuaSyntaxNode.FindTrivia(Int32, Boolean)
    SyntaxNode.RawKind
    SyntaxNode.SyntaxTree
    SyntaxNode.FullSpan
    SyntaxNode.Span
    SyntaxNode.SpanStart
    SyntaxNode.ToString()
    SyntaxNode.ToFullString()
    SyntaxNode.WriteTo(TextWriter)
    SyntaxNode.GetText(Encoding, SourceHashAlgorithm)
    SyntaxNode.IsEquivalentTo(SyntaxNode)
    SyntaxNode.IsIncrementallyIdenticalTo(SyntaxNode)
    SyntaxNode.IsMissing
    SyntaxNode.IsPartOfStructuredTrivia()
    SyntaxNode.IsStructuredTrivia
    SyntaxNode.HasStructuredTrivia
    SyntaxNode.ContainsSkippedText
    SyntaxNode.ContainsDirectives
    SyntaxNode.ContainsDiagnostics
    SyntaxNode.Contains(SyntaxNode)
    SyntaxNode.HasLeadingTrivia
    SyntaxNode.HasTrailingTrivia
    SyntaxNode.GetReference()
    SyntaxNode.Parent
    SyntaxNode.ParentTrivia
    SyntaxNode.ChildNodesAndTokens()
    SyntaxNode.ChildThatContainsPosition(Int32)
    SyntaxNode.ChildNodes()
    SyntaxNode.Ancestors(Boolean)
    SyntaxNode.AncestorsAndSelf(Boolean)
    SyntaxNode.FirstAncestorOrSelf<TNode>(Nullable<Func<TNode, Boolean>>, Boolean)
    SyntaxNode.FirstAncestorOrSelf<TNode, TArg>(Func<TNode, TArg, Boolean>, TArg, Boolean)
    SyntaxNode.DescendantNodes(Nullable<Func<SyntaxNode, Boolean>>, Boolean)
    SyntaxNode.DescendantNodes(TextSpan, Nullable<Func<SyntaxNode, Boolean>>, Boolean)
    SyntaxNode.DescendantNodesAndSelf(Nullable<Func<SyntaxNode, Boolean>>, Boolean)
    SyntaxNode.DescendantNodesAndSelf(TextSpan, Nullable<Func<SyntaxNode, Boolean>>, Boolean)
    SyntaxNode.DescendantNodesAndTokens(Nullable<Func<SyntaxNode, Boolean>>, Boolean)
    SyntaxNode.DescendantNodesAndTokens(TextSpan, Nullable<Func<SyntaxNode, Boolean>>, Boolean)
    SyntaxNode.DescendantNodesAndTokensAndSelf(Nullable<Func<SyntaxNode, Boolean>>, Boolean)
    SyntaxNode.DescendantNodesAndTokensAndSelf(TextSpan, Nullable<Func<SyntaxNode, Boolean>>, Boolean)
    SyntaxNode.FindNode(TextSpan, Boolean, Boolean)
    SyntaxNode.ChildTokens()
    SyntaxNode.DescendantTokens(Nullable<Func<SyntaxNode, Boolean>>, Boolean)
    SyntaxNode.DescendantTokens(TextSpan, Nullable<Func<SyntaxNode, Boolean>>, Boolean)
    SyntaxNode.FindTrivia(Int32, Nullable<Func<SyntaxTrivia, Boolean>>)
    SyntaxNode.DescendantTrivia(Nullable<Func<SyntaxNode, Boolean>>, Boolean)
    SyntaxNode.DescendantTrivia(TextSpan, Nullable<Func<SyntaxNode, Boolean>>, Boolean)
    SyntaxNode.ContainsAnnotations
    SyntaxNode.HasAnnotations(String)
    SyntaxNode.HasAnnotations(IEnumerable<String>)
    SyntaxNode.HasAnnotation(SyntaxAnnotation)
    SyntaxNode.GetAnnotations(String)
    SyntaxNode.GetAnnotations(IEnumerable<String>)
    SyntaxNode.GetAnnotatedNodesAndTokens(String)
    SyntaxNode.GetAnnotatedNodesAndTokens(String[])
    SyntaxNode.GetAnnotatedNodesAndTokens(SyntaxAnnotation)
    SyntaxNode.GetAnnotatedNodes(SyntaxAnnotation)
    SyntaxNode.GetAnnotatedNodes(String)
    SyntaxNode.GetAnnotatedTokens(SyntaxAnnotation)
    SyntaxNode.GetAnnotatedTokens(String)
    SyntaxNode.GetAnnotatedTrivia(String)
    SyntaxNode.GetAnnotatedTrivia(String[])
    SyntaxNode.GetAnnotatedTrivia(SyntaxAnnotation)
    SyntaxNode.CopyAnnotationsTo<T>(T)
    SyntaxNode.IsEquivalentTo(SyntaxNode, Boolean)
    SyntaxNode.SerializeTo(Stream, CancellationToken)
    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)
    Namespace: Loretta.CodeAnalysis.Lua.Syntax
    Assembly: Loretta.CodeAnalysis.Lua.dll
    Syntax
    public sealed class IfStatementSyntax : StatementSyntax
    Remarks

    This node is associated with the following syntax kinds:

    • IfStatement

    Properties

    | Improve this Doc View Source

    Body

    The if's body.

    Declaration
    public StatementListSyntax Body { get; }
    Property Value
    Type Description
    StatementListSyntax
    | Improve this Doc View Source

    Condition

    The if's condition.

    Declaration
    public ExpressionSyntax Condition { get; }
    Property Value
    Type Description
    ExpressionSyntax
    | Improve this Doc View Source

    ElseClause

    The else clause.

    Declaration
    public ElseClauseSyntax ElseClause { get; }
    Property Value
    Type Description
    ElseClauseSyntax
    | Improve this Doc View Source

    ElseIfClauses

    The elseif clauses.

    Declaration
    public SyntaxList<ElseIfClauseSyntax> ElseIfClauses { get; }
    Property Value
    Type Description
    SyntaxList<ElseIfClauseSyntax>
    | Improve this Doc View Source

    EndKeyword

    The 'end' keyword.

    Declaration
    public SyntaxToken EndKeyword { get; }
    Property Value
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    IfKeyword

    The 'if' keyword.

    Declaration
    public SyntaxToken IfKeyword { get; }
    Property Value
    Type Description
    SyntaxToken
    | Improve this Doc View Source

    SemicolonToken

    The semicolon at the end of the statement (if any).

    Declaration
    public override SyntaxToken SemicolonToken { get; }
    Property Value
    Type Description
    SyntaxToken
    Overrides
    StatementSyntax.SemicolonToken
    | Improve this Doc View Source

    ThenKeyword

    The 'then' keyword.

    Declaration
    public SyntaxToken ThenKeyword { get; }
    Property Value
    Type Description
    SyntaxToken

    Methods

    | Improve this Doc View Source

    Accept(LuaSyntaxVisitor)

    Declaration
    public override void Accept(LuaSyntaxVisitor visitor)
    Parameters
    Type Name Description
    LuaSyntaxVisitor visitor
    Overrides
    LuaSyntaxNode.Accept(LuaSyntaxVisitor)
    | Improve this Doc View Source

    Accept<TResult>(LuaSyntaxVisitor<TResult>)

    Declaration
    public override TResult Accept<TResult>(LuaSyntaxVisitor<TResult> visitor)
    Parameters
    Type Name Description
    LuaSyntaxVisitor<TResult> visitor
    Returns
    Type Description
    TResult
    Type Parameters
    Name Description
    TResult
    Overrides
    Loretta.CodeAnalysis.Lua.LuaSyntaxNode.Accept<TResult>(Loretta.CodeAnalysis.Lua.LuaSyntaxVisitor<TResult>)
    | Improve this Doc View Source

    AddBodyStatements(StatementSyntax[])

    Declaration
    public IfStatementSyntax AddBodyStatements(params StatementSyntax[] items)
    Parameters
    Type Name Description
    StatementSyntax[] items
    Returns
    Type Description
    IfStatementSyntax
    | Improve this Doc View Source

    AddElseIfClauses(ElseIfClauseSyntax[])

    Declaration
    public IfStatementSyntax AddElseIfClauses(params ElseIfClauseSyntax[] items)
    Parameters
    Type Name Description
    ElseIfClauseSyntax[] items
    Returns
    Type Description
    IfStatementSyntax
    | Improve this Doc View Source

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

    Declaration
    public IfStatementSyntax Update(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

    WithBody(StatementListSyntax)

    Declaration
    public IfStatementSyntax WithBody(StatementListSyntax body)
    Parameters
    Type Name Description
    StatementListSyntax body
    Returns
    Type Description
    IfStatementSyntax
    | Improve this Doc View Source

    WithCondition(ExpressionSyntax)

    Declaration
    public IfStatementSyntax WithCondition(ExpressionSyntax condition)
    Parameters
    Type Name Description
    ExpressionSyntax condition
    Returns
    Type Description
    IfStatementSyntax
    | Improve this Doc View Source

    WithElseClause(ElseClauseSyntax)

    Declaration
    public IfStatementSyntax WithElseClause(ElseClauseSyntax elseClause)
    Parameters
    Type Name Description
    ElseClauseSyntax elseClause
    Returns
    Type Description
    IfStatementSyntax
    | Improve this Doc View Source

    WithElseIfClauses(SyntaxList<ElseIfClauseSyntax>)

    Declaration
    public IfStatementSyntax WithElseIfClauses(SyntaxList<ElseIfClauseSyntax> elseIfClauses)
    Parameters
    Type Name Description
    SyntaxList<ElseIfClauseSyntax> elseIfClauses
    Returns
    Type Description
    IfStatementSyntax
    | Improve this Doc View Source

    WithEndKeyword(SyntaxToken)

    Declaration
    public IfStatementSyntax WithEndKeyword(SyntaxToken endKeyword)
    Parameters
    Type Name Description
    SyntaxToken endKeyword
    Returns
    Type Description
    IfStatementSyntax
    | Improve this Doc View Source

    WithIfKeyword(SyntaxToken)

    Declaration
    public IfStatementSyntax WithIfKeyword(SyntaxToken ifKeyword)
    Parameters
    Type Name Description
    SyntaxToken ifKeyword
    Returns
    Type Description
    IfStatementSyntax
    | Improve this Doc View Source

    WithSemicolonToken(SyntaxToken)

    Declaration
    public IfStatementSyntax WithSemicolonToken(SyntaxToken semicolonToken)
    Parameters
    Type Name Description
    SyntaxToken semicolonToken
    Returns
    Type Description
    IfStatementSyntax
    | Improve this Doc View Source

    WithThenKeyword(SyntaxToken)

    Declaration
    public IfStatementSyntax WithThenKeyword(SyntaxToken thenKeyword)
    Parameters
    Type Name Description
    SyntaxToken thenKeyword
    Returns
    Type Description
    IfStatementSyntax

    Implements

    IFormattable

    Extension Methods

    LuaExtensions.IsKind(SyntaxNode, SyntaxKind)
    LuaExtensions.Kind(SyntaxNode)
    • Improve this Doc
    • View Source
    ☀
    ☾
    In This Article
    Back to top

    Copyright (c) LorettaDevs

    Generated by DocFX

    ☀
    ☾