lib-ruby-parser (C++ bindings)  4.0.1+ruby-3.1.1
C++ bindings for lib-ruby-parser library
lib_ruby_parser::IfMod Class Reference

Represents an if/unless modifier (i.e. stmt if cond) More...

#include <nodes.hpp>

Public Attributes

Nodecond
 Condition of the modifier. More...
 
Nodeif_true
 
Nodeif_false
 
Loc keyword_l
 
Loc expression_l
 

Detailed Description

Represents an if/unless modifier (i.e. stmt if cond)

Member Data Documentation

◆ cond

Node* lib_ruby_parser::IfMod::cond

Condition of the modifier.

◆ expression_l

Loc lib_ruby_parser::IfMod::expression_l

Location of the full expression

stmt if cond
^^^^^^^^^^^^
stmt unless cond
^^^^^^^^^^^^^^^^

◆ if_false

Node* lib_ruby_parser::IfMod::if_false

False-branch of the modifier.

Always set for unless modifier. Always None for if modifier.

◆ if_true

Node* lib_ruby_parser::IfMod::if_true

True-branch of the modifier.

Always set for if modifier. Always None for unless modifier.

◆ keyword_l

Loc lib_ruby_parser::IfMod::keyword_l

Location of the if/unless keyword

stmt if cond
^^
stmt unless cond
^^^^^^

The documentation for this class was generated from the following file: