Skip to main content

Module ast

Module ast 

Source

Structs§

ParsedDoc
Owns a parsed PHP document: the bumpalo arena, source snapshot, and Program.

Functions§

format_type_hint
Format a TypeHint as a PHP type string, e.g. ?int, string|null.
name_range
Build an LSP Range for a name that is a sub-slice of source.
offset_to_position
Convert a byte offset into source to an LSP Position (0-based line/char).
span_to_range
Convert a Span (byte-offset pair) to an LSP Range.
str_offset
Return the byte offset of substr within source.