Class IfCondition
In an if (or while) condition this represents:
`
if (auto x = readln)
^^^^^^^^^^^^^^^
if (a == b || c == d)
^^^^^^^^^^^^^^^^
`
Fields
Name | Type | Description |
---|---|---|
expression
|
Expression | In 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_
|
bool | In an assignment-condition, this is true if scope is used to construct
the variable.
|
type
|
Type | In 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
Name | Description |
---|---|
accept
(visitor)
|