Versions in this module Expand all Collapse all v0 v0.2.0 May 31, 2023 Changes in this version + const DefaultListLimit + const DefaultNestingLimit + var ErrEOF = errors.New("unexpected EOF while reading") + var ErrListTooLong = errors.New("list too long") + var ErrNumberFormat = errors.New("invalid number format") + var ErrPairFormat = errors.New("invalid pair format") + var ErrSkip = errors.New("skip s-expression") + var ErrTooDeeplyNested = errors.New("too deeply nested") + func ReadComment(rd *Reader, _ rune) (sxpf.Object, error) + func UnmatchedDelimiter(rd *Reader, firstCh rune) (sxpf.Object, error) + func WithDefaultSymbolFactory(rd *Reader) + type Error struct + Begin Position + Cause error + End Position + func (e Error) Error() string + func (e Error) Format(s fmt.State, _ rune) + func (e Error) Is(other error) bool + func (e Error) Unwrap() error + type Macro func(*Reader, rune) (sxpf.Object, error) + type MacroMap map[rune]Macro + type Option func(*Reader) + func WithListLimit(length uint) Option + func WithNestingLimit(depth uint) Option + func WithSymbolFactory(sf sxpf.SymbolFactory) Option + type Position struct + Col int + Line int + Name string + func (rp *Position) String() string + type Reader struct + func MakeReader(r io.Reader, opts ...Option) *Reader + func (*Reader) IsSpace(ch rune) bool + func (rd *Reader) AnnotateError(err error, begin Position) error + func (rd *Reader) IsTerminal(ch rune) bool + func (rd *Reader) Name() string + func (rd *Reader) NextRune() (rune, error) + func (rd *Reader) Position() Position + func (rd *Reader) Read() (sxpf.Object, error) + func (rd *Reader) ReadAll() (objs []sxpf.Object, _ error) + func (rd *Reader) ReadToken(firstCh rune, isTerminal func(rune) bool) (string, error) + func (rd *Reader) SetMacro(initCh rune, macro Macro) + func (rd *Reader) SkipSpace() (rune, error) + func (rd *Reader) SymbolFactory() sxpf.SymbolFactory + func (rd *Reader) Unread(chs ...rune)