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

Represents a hash pattern used in pattern matching (i.e. in { a: 1 }) More...

#include <nodes.hpp>

Public Attributes

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

Detailed Description

Represents a hash pattern used in pattern matching (i.e. in { a: 1 })

Member Data Documentation

◆ begin_l

MaybeLoc lib_ruby_parser::HashPattern::begin_l

Location of the open parenthesis

case foo; in { a: 1 }; end
^

None if there are no parentheses

◆ elements

NodeList lib_ruby_parser::HashPattern::elements

A list of inner patterns.

◆ end_l

MaybeLoc lib_ruby_parser::HashPattern::end_l

Location of the open parenthesis

case foo; in { a: 1 }; end
^

None if there are no parentheses

◆ expression_l

Loc lib_ruby_parser::HashPattern::expression_l

Location of the full expression

case foo; in { a: 1 }; end
^^^^^^^^

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