Skip to main contentModule ast
Source - ParsedDoc
- Owns a parsed PHP document: the bumpalo arena, source snapshot, and Program.
- SourceView
- Bundles source text with its precomputed line-start table.
Copy so inner functions can pass it by value without lifetime annotation churn.
- 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.
- MethodReturnsMap
- Cached per-doc map of
class_name -> method_name -> return_class_name.
Exposed here (rather than in type_map) because it lives on ParsedDoc.