Class IfCondition

In an if (or while) condition this represents: ` if (auto x = readln) ^^^^^^^^^^^^^^^

class IfCondition
  : BaseNode ;

if (a == b || c == d) ^^^^^^^^^^^^^^^^ `

Fields

NameTypeDescription
expression ExpressionIn an assignment-condition, this is the part after the equals sign. Otherwise this is any other expression that is evaluated to be a boolean. (e.g. UnaryExpression, AndAndExpression, CmpExpression, etc.)
identifier TokenStructure!(ubyte,"import dparse.lexer:TokenTriviaFields,TriviaToken; mixin TokenTriviaFields;")In an assignment-condition, in if (auto x = ...) this is the x
scope_ boolIn an assignment-condition, this is true if scope is used to construct the variable.
type TypeIn an assignment-condition, this is the optional explicit type
typeCtors ubyte[]In an assignment-condition, these are the optional type constructors
tokens const(TokenStructure!(ubyte,"import dparse.lexer:TokenTriviaFields,TriviaToken; mixin TokenTriviaFields;"))[]List of tokens consumed by this AST node

Methods

NameDescription
accept (visitor)