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

Represents a single rescue handler (i.e. rescue E => e ...) More...

#include <nodes.hpp>

Public Attributes

Nodeexc_list
 
Nodeexc_var
 
Nodebody
 Body of the handler. More...
 
Loc keyword_l
 
MaybeLoc assoc_l
 
MaybeLoc begin_l
 
Loc expression_l
 

Detailed Description

Represents a single rescue handler (i.e. rescue E => e ...)

Member Data Documentation

◆ assoc_l

MaybeLoc lib_ruby_parser::RescueBody::assoc_l

Location of the => operator

begin; 1; rescue E => e; 2; end
^^

None if exception is not captured.

◆ begin_l

MaybeLoc lib_ruby_parser::RescueBody::begin_l

Location of the then keyword

begin; 1; rescue E => e then; 2; end
^^^^

then is optional, so begin_l can be None

◆ body

Node* lib_ruby_parser::RescueBody::body

Body of the handler.

◆ exc_list

Node* lib_ruby_parser::RescueBody::exc_list

A list of exception classes

None if no classes specified (i.e. rescue => e; ... or just rescue; ...)

◆ exc_var

Node* lib_ruby_parser::RescueBody::exc_var

Variable that captures exception

None if no variable specified (i.e. rescue E; ... or just rescue; ...)

◆ expression_l

Loc lib_ruby_parser::RescueBody::expression_l

Location of the full expression

begin; 1; rescue E => e then; 2; end
^^^^^^^^^^^^^^^^^^^^^

◆ keyword_l

Loc lib_ruby_parser::RescueBody::keyword_l

Location of the rescue keyword

begin; 1; rescue E => e; 2; end
^^^^^^

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