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

Represents a rescue block. More...

#include <nodes.hpp>

Public Attributes

Nodebody
 Body of the block that is wrapped into rescue (i.e. the part that may throw an error) More...
 
NodeList rescue_bodies
 A list of rescue handlers (see RescueBody node) More...
 
Nodeelse_
 
MaybeLoc else_l
 
Loc expression_l
 

Detailed Description

Represents a rescue block.

Member Data Documentation

◆ body

Node* lib_ruby_parser::Rescue::body

Body of the block that is wrapped into rescue (i.e. the part that may throw an error)

◆ else_

Node* lib_ruby_parser::Rescue::else_

Else branch.

None if there's no else branch

◆ else_l

MaybeLoc lib_ruby_parser::Rescue::else_l

Location of the else keyword

begin; 1; rescue StandardError => e; 2; else; 3; end
^^^^

None if there's no else branch

◆ expression_l

Loc lib_ruby_parser::Rescue::expression_l

Location of the full expression

begin; 1; rescue StandardError => e; 2; else; 3; end
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Note: begin/end keywords belong to KwBegin node

◆ rescue_bodies

NodeList lib_ruby_parser::Rescue::rescue_bodies

A list of rescue handlers (see RescueBody node)


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