lib-ruby-parser (C++ bindings)  4.0.1+ruby-3.1.1
C++ bindings for lib-ruby-parser library
lib_ruby_parser::XHeredoc 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 executable here-document literal (both with and without interpolation)

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

Member Data Documentation

◆ expression_l

Loc lib_ruby_parser::XHeredoc::expression_l

Location of the executable here-document identifier

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

Note: This is the only node (with Heredoc) 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::XHeredoc::heredoc_body_l

Location of the executable here-document body

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

◆ heredoc_end_l

Loc lib_ruby_parser::XHeredoc::heredoc_end_l

Location of the executable here-document end

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

◆ parts

NodeList lib_ruby_parser::XHeredoc::parts

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


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