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

Represents an in pattern branch of the pattern matching. More...

#include <nodes.hpp>

Public Attributes

Nodepattern
 Value that is used for matching. More...
 
Nodeguard
 
Nodebody
 Body of the branch that is invoked if value matches pattern. More...
 
Loc keyword_l
 
Loc begin_l
 
Loc expression_l
 

Detailed Description

Represents an in pattern branch of the pattern matching.

Member Data Documentation

◆ begin_l

Loc lib_ruby_parser::InPattern::begin_l

Location of the then keyword

case value; in pattern then; end
^^^^

◆ body

Node* lib_ruby_parser::InPattern::body

Body of the branch that is invoked if value matches pattern.

◆ expression_l

Loc lib_ruby_parser::InPattern::expression_l

Location of the full expression

case value; in pattern then; 42; end
^^^^^^^^^^^^^^^^^^^

◆ guard

Node* lib_ruby_parser::InPattern::guard

Guard that is used for matching

Optional, so can be None

◆ keyword_l

Loc lib_ruby_parser::InPattern::keyword_l

Location of the in keyword

case value; in pattern; end
^^

◆ pattern

Node* lib_ruby_parser::InPattern::pattern

Value that is used for matching.


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