Expand description
Text-line cursor and boundary helpers (previously perl-text-line).
Text-line cursor helpers.
This crate has a single responsibility: map cursor offsets to line boundaries and provide conservative token-boundary primitives for single-line scanning.
Functionsยง
- is_
identifier_ byte - Return
truewhenbyteis an identifier character ([A-Za-z0-9_]). - is_
keyword_ boundary - Return
truewhen tokenkeywordbytes in[start, start + len)are bounded on both sides by non-identifier bytes. - line_
bounds_ at - Return the byte span of the line containing
cursor_pos. - skip_
ascii_ whitespace - Advance
idxwhile bytes at the cursor are ASCII whitespace.