Line scanning and parsing for TOON format.
Converts TOON text into structured line objects with depth tracking. Provides cursor-based navigation for parsing.
Line scanning and parsing for TOON format. Converts TOON text into structured line objects with depth tracking. Provides cursor-based navigation for parsing.
(advance-cursor cursor)(advance-cursor cursor n)Advance cursor by n positions (default: 1).
Advance cursor by n positions (default: 1).
(at-end? cursor)Check if cursor is at end of lines.
Check if cursor is at end of lines.
(blank-line-info line-number indent depth)Create blank line info record.
Create blank line info record.
(create-cursor lines blank-lines)Create a cursor from lines and blank-lines vectors.
Create a cursor from lines and blank-lines vectors.
(cursor-from-scan-result {:keys [lines blank-lines]})Create a cursor from a scan result.
Create a cursor from a scan result.
(get-blank-lines-in-range cursor start end)Get blank lines within line number range [start, end].
Get blank lines within line number range [start, end].
(has-more-at-depth? cursor target-depth)Check if there are more lines at target depth.
Check if there are more lines at target depth.
(next-cursor cursor)Get current line and advance cursor. Returns [line new-cursor].
Get current line and advance cursor. Returns [line new-cursor].
(parsed-line raw depth indent content line-number)Create a parsed line record.
Create a parsed line record.
(peek-at-depth cursor target-depth)Get current line if it matches target depth.
Get current line if it matches target depth.
(peek-cursor cursor)Get current line without advancing.
Get current line without advancing.
(scan-result lines blank-lines)Create scan result containing lines and blank lines.
Create scan result containing lines and blank lines.
(to-parsed-lines input)(to-parsed-lines input indent-size)(to-parsed-lines input indent-size strict)Parse TOON text into structured lines.
Parameters:
Returns: ScanResult with {:lines, :blank-lines}
Parse TOON text into structured lines.
Parameters:
- input: TOON text string
- indent-size: Spaces per indent level (default: 2)
- strict: Enable strict validation (default: true)
Returns:
ScanResult with {:lines, :blank-lines}cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |