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

#include <nodes.hpp>

Public Attributes

NodeList elements
 Inner part of the find pattern. More...
 
MaybeLoc begin_l
 
MaybeLoc end_l
 
Loc expression_l
 

Detailed Description

Represents a find pattern using in pattern matching (i.e. in [*x, 1 => a, *y])

It's different from ArrayPattern/ConstPattern because it supports multiple wildcard pattern

Member Data Documentation

◆ begin_l

MaybeLoc lib_ruby_parser::FindPattern::begin_l

Location of the begin

case foo; in [*x, 1 => a, *y]; end
^

None if there are no brackets/parentheses

◆ elements

NodeList lib_ruby_parser::FindPattern::elements

Inner part of the find pattern.

◆ end_l

MaybeLoc lib_ruby_parser::FindPattern::end_l

Location of the end

case foo; in [*x, 1 => a, *y]; end
^

None if there are no brackets/parentheses

◆ expression_l

Loc lib_ruby_parser::FindPattern::expression_l

Location of the full expression

case foo; in [*x, 1 => a, *y]; end
^^^^^^^^^^^^^^^^

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