Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewReader ¶
func NewReader(opts ...ReaderOption) lisp.Reader
NewReader returns a new lisp.Reader. With no options, returns a standard reader. Pass WithFormatPreserving() for tooling use. Readers ignore one leading UTF-8 BOM and reject BOMs elsewhere. Tokens must fit the fixed 128 KiB scanner window, including string quotes; exhaustion produces a scan-error at the token start. Decimal numbers must be delimited from adjacent symbol constituents (hexadecimal uses #x, octal uses #o).
Types ¶
type ReaderOption ¶ added in v1.17.0
type ReaderOption func(*readerConfig)
ReaderOption configures a Reader created by NewReader.
func WithFormatPreserving ¶ added in v1.17.0
func WithFormatPreserving() ReaderOption
WithFormatPreserving enables format-preserving mode. When enabled, the parser populates LVal.Meta with SourceMeta containing comments, bracket types, blank lines, and original literal text.