package
Version:
v0.0.0-...-7aee52b
Opens a new window with list of versions in this module.
Published: Aug 28, 2026
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package scanner tokenizes Writ source for the parser and for editors.
IsBuiltin reports whether name is a core builtin (including true/false/nil).
IsCoreBuiltin reports whether name is a callable core builtin.
true, false, and nil are builtins but not callable.
IsIntLit reports whether word is a signed integer literal.
IsKeyword reports whether name is a special form.
IsNumLit reports whether word is an integer or decimal float literal.
IsSlot reports whether word is a short-fn slot (#1, #2, …).
Words returns keywords and builtins, sorted, for completion.
Token is a source token. Text is the exact source slice.
Scan splits src into tokens with positions. It does not fail on
unterminated strings or ticks; the parser reports those.
Tokenize splits src into highlighting tokens.
TokenKind classifies a source token.
const (
TokWS TokenKind = iota
TokParen
TokString
TokNumber
TokKeyword
TokBuiltin
TokSymbol
TokLParen
TokRParen
TokLBracket
TokRBracket
TokQuote
TokUnquote
TokSplice
TokTick
TokEOF
)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.