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

#include <nodes.hpp>

Public Attributes

NodeList parts
 A list of string parts (static literals and interpolated expressions) More...
 
Loc heredoc_body_l
 
Loc heredoc_end_l
 
Loc expression_l
 

Detailed Description

Represents a here-document literal (both with and without interpolation)

It's similar to Dstr in terms of abstract syntax tree, but has different source maps.

Member Data Documentation

◆ expression_l

Loc lib_ruby_parser::Heredoc::expression_l

Location of the here-document identifier

<<-HERE\n a\n #{42}\nHERE
^^^^^^^

Note: This is the only node (with XHeredoc) that has expression_l smaller that all other sub-locations merged. The reason for that is that it's possible to add more code after here-document ID:

<<-HERE + "rest"
content
HERE

◆ heredoc_body_l

Loc lib_ruby_parser::Heredoc::heredoc_body_l

Location of the here-document body

<<-HERE\n a\n #{42}\nHERE
^^^^^^^^^^^^^^^

◆ heredoc_end_l

Loc lib_ruby_parser::Heredoc::heredoc_end_l

Location of the here-document end

<<-HERE\n a\n #{42}\nHERE
^^^^

◆ parts

NodeList lib_ruby_parser::Heredoc::parts

A list of string parts (static literals and interpolated expressions)


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