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

Const pattern used in pattern matching (e.g. in A(1, 2)) More...

#include <nodes.hpp>

Public Attributes

Nodeconst_
 Constant that is used, Const("Foo") for in For(42) More...
 
Nodepattern
 
Loc begin_l
 
Loc end_l
 
Loc expression_l
 

Detailed Description

Const pattern used in pattern matching (e.g. in A(1, 2))

Member Data Documentation

◆ begin_l

Loc lib_ruby_parser::ConstPattern::begin_l

Location of the open parenthesis

case 1; in Foo(42); end
^

◆ const_

Node* lib_ruby_parser::ConstPattern::const_

Constant that is used, Const("Foo") for in For(42)

◆ end_l

Loc lib_ruby_parser::ConstPattern::end_l

Location of the closing parenthesis

case 1; in Foo(42); end
^

◆ expression_l

Loc lib_ruby_parser::ConstPattern::expression_l

Location of the full expression

case 1; in Foo(42); end
^^^^^^^

◆ pattern

Node* lib_ruby_parser::ConstPattern::pattern

Inner part of the constant pattern

ArrayPattern(vec![ Int("1") ]) for Foo(1)


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