Skip to main content

Crate perl_symbol_cursor

Crate perl_symbol_cursor 

Source
Expand description

Cursor-oriented symbol extraction for Perl source text.

This microcrate focuses on a single responsibility: extracting symbol names and ranges around a cursor position.

Enums§

CursorSymbolKind
Symbol sigil categories used for cursor extraction.

Functions§

byte_offset_utf16
Convert a UTF-16 column index to a byte offset for a single line.
extract_symbol_from_source
Extract a symbol and its kind from source at position.
get_symbol_range_at_position
Get symbol range at position, including a leading sigil when present.
is_modchar
Return true when byte is a module/name character ([A-Za-z0-9_:]).
is_word_boundary
Check if a match at pos..pos+word_len is bounded by non-word chars.
token_under_cursor
Extract the module/symbol token under the cursor (UTF-16 aware).