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

#include <nodes.hpp>

Public Attributes

NodeList elements
 A list of elements. More...
 
MaybeLoc begin_l
 
MaybeLoc end_l
 
Loc expression_l
 

Detailed Description

Represents an array pattern with trailing comma used in pattern matching

It's slightly different from ArrayPattern, trailing comma at the end works as , *

Member Data Documentation

◆ begin_l

MaybeLoc lib_ruby_parser::ArrayPatternWithTail::begin_l

Location of the open bracket

[1, ^a, 3 => foo,]
^

None for pattern like 1, 2, without brackets

◆ elements

NodeList lib_ruby_parser::ArrayPatternWithTail::elements

A list of elements.

◆ end_l

MaybeLoc lib_ruby_parser::ArrayPatternWithTail::end_l

Location of the closing bracket

[1, ^a, 3 => foo,]
^

None for pattern like 1, 2, without brackets

◆ expression_l

Loc lib_ruby_parser::ArrayPatternWithTail::expression_l

Location of the full expression

[1, ^a, 3 => foo,]
^^^^^^^^^^^^^^^^^^

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