package
Version:
v0.4.0
Opens a new window with list of versions in this module.
Published: Mar 2, 2026
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Graphemes splits input into Unicode grapheme clusters.
IsControl returns true for control characters except newline and tab.
IsZeroWidth returns true for invisible zero-width runes.
Token represents a lexical unit with byte offsets in the original content.
Classify upgrades lexical tokens into semantic token classes.
Lex tokenizes input in one pass while preserving byte offsets.
TokenType identifies lexical and semantic token categories.
const (
TokenUnknown TokenType = iota
TokenWord
TokenNumber
TokenWhitespace
TokenNewline
TokenSymbol
TokenURL
TokenEmail
TokenPath
TokenString
TokenCodeBlock
TokenPlaceholder
TokenBase64
TokenShellCommand
TokenZeroWidth
TokenControlChar
)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.