Show / Hide Table of Contents

Class IfStmt

Statement representing a conditional IF block with optional ELSE branch.

Inheritance
object
AstNode
StatementNode
IfStmt
Inherited Members
AstNode.Line
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: VM.Parser
Assembly: VM.dll
Syntax
public class IfStmt : StatementNode

Fields

Condition

Declaration
public required ExprNode Condition
Field Value
Type Description
ExprNode

ElseBranch

Declaration
public List<StatementNode> ElseBranch
Field Value
Type Description
List<StatementNode>

ThenBranch

Declaration
public List<StatementNode> ThenBranch
Field Value
Type Description
List<StatementNode>

Methods

Accept<T>(IAstVisitor<T>)

Accepts a visitor that returns a value.

Declaration
public override T Accept<T>(IAstVisitor<T> visitor)
Parameters
Type Name Description
IAstVisitor<T> visitor
Returns
Type Description
T
Type Parameters
Name Description
T
Overrides
AstNode.Accept<T>(IAstVisitor<T>)

ToString()

Returns a string representation of the AST node for debugging.

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
AstNode.ToString()
In this article
Back to top Generated by DocFX