|
Ruby 4.1.0dev (2026-10-26 revision 3e6368577177b3c3e2119fec09fb0f69edccabee)
|
IfNode. More...
#include <ast.h>
Data Fields | |
| pm_node_t | base |
| The embedded base node. | |
| pm_location_t | if_keyword_loc |
| IfNode::if_keyword_loc. | |
| PM_NODE_ALIGNAS struct pm_node * | predicate |
| IfNode::predicate. | |
| pm_location_t | then_keyword_loc |
| IfNode::then_keyword_loc. | |
| PM_NODE_ALIGNAS struct pm_statements_node * | statements |
| IfNode::statements. | |
| PM_NODE_ALIGNAS struct pm_node * | subsequent |
| IfNode::subsequent. | |
| pm_location_t | end_keyword_loc |
| IfNode::end_keyword_loc. | |
Data Fields inherited from pm_node | |
| pm_node_type_t | type |
| This represents the type of the node. | |
| pm_node_flags_t | flags |
| This represents any flags on the node. | |
| uint32_t | node_id |
| The unique identifier for this node, which is deterministic based on the source. | |
| pm_location_t | location |
| This is the location of the node in the source. | |
IfNode.
Represents the use of the if keyword, either in the block form or the modifier form, or a ternary expression.
bar if foo ^^^^^^^^^^ if foo then bar end ^^^^^^^^^^^^^^^^^^^ foo ? bar : baz ^^^^^^^^^^^^^^^
Type: PM_IF_NODE
| pm_location_t pm_if_node::end_keyword_loc |
| pm_location_t pm_if_node::if_keyword_loc |
| PM_NODE_ALIGNAS struct pm_node* pm_if_node::predicate |
| PM_NODE_ALIGNAS struct pm_statements_node* pm_if_node::statements |
| PM_NODE_ALIGNAS struct pm_node* pm_if_node::subsequent |
| pm_location_t pm_if_node::then_keyword_loc |