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

Represents a hash literal (i.e. { foo: 42 }) More...

#include <nodes.hpp>

Public Attributes

NodeList pairs
 A list of key-value pairs. More...
 
MaybeLoc begin_l
 
MaybeLoc end_l
 
Loc expression_l
 

Detailed Description

Represents a hash literal (i.e. { foo: 42 })

Member Data Documentation

◆ begin_l

MaybeLoc lib_ruby_parser::Hash::begin_l

Location of the open parenthesis

{ a: 1 }
^

None if hash literal is implicit, e.g. foo(key: "value")

◆ end_l

MaybeLoc lib_ruby_parser::Hash::end_l

Location of the closing parenthesis

{ a: 1 }
^

None if hash literal is implicit, e.g. foo(key: "value")

◆ expression_l

Loc lib_ruby_parser::Hash::expression_l

Location of the full expression

{ a: 1 }
^^^^^^^^

◆ pairs

NodeList lib_ruby_parser::Hash::pairs

A list of key-value pairs.


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