Ruby 4.1.0dev (2026-03-01 revision 19b636d3ecc8a824437e0d6abd7fe0c24b594ce0)
Data Fields
pm_location_t Struct Reference

This struct represents a slice in the source code, defined by an offset and a length. More...

#include <ast.h>

Data Fields

uint32_t start
 The offset of the location from the start of the source.
 
uint32_t length
 The length of the location.
 

Detailed Description

This struct represents a slice in the source code, defined by an offset and a length.

Note that we have confirmation that we can represent all locations within Ruby source files using 32-bit integers per:

https://bugs.ruby-lang.org/issues/20488#note-1

Definition at line 540 of file ast.h.

Field Documentation

◆ length

uint32_t pm_location_t::length

The length of the location.

Definition at line 545 of file ast.h.

Referenced by pm_dump_json().

◆ start

uint32_t pm_location_t::start

The offset of the location from the start of the source.

Definition at line 542 of file ast.h.

Referenced by pm_diagnostic_list_append(), and pm_diagnostic_list_append_format().


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