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

Represents a block of code with ensure (i.e. begin; ensure; end) More...

#include <nodes.hpp>

Public Attributes

Nodebody
 
Nodeensure
 
Loc keyword_l
 
Loc expression_l
 

Detailed Description

Represents a block of code with ensure (i.e. begin; ensure; end)

Member Data Documentation

◆ body

Node* lib_ruby_parser::Ensure::body

Block of code that is wrapped into ensure Note: that's the body of the ensure block

Int("1") for begin; 1; ensure; 2; end

◆ ensure

Node* lib_ruby_parser::Ensure::ensure

Body of the ensure block

Int("2") for begin; 1; ensure; 2; end

◆ expression_l

Loc lib_ruby_parser::Ensure::expression_l

Location of the full expression

begin; 1; rescue; 2; else; 3; ensure; 4; end
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Note: begin/end belong to KwBegin node.

◆ keyword_l

Loc lib_ruby_parser::Ensure::keyword_l

Location of the ensure keyword

begin; ensure; end
^^^^^^

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