sexpr

package
v0.0.0-...-8300b4a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2024 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnmatchedParentheses = errors.New("unmatched parentheses")
	ErrNumberSyntaxError    = errors.New("number syntax error")
	ErrStringSyntaxError    = errors.New("string syntax error")
	ErrScopeSyntaxError     = errors.New("scope syntax error")
)

Functions

func WriteString

func WriteString(e Expr) string

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

func (*Builder) Atom

func (b *Builder) Atom(kind Kind, value string)

func (*Builder) Copy

func (b *Builder) Copy(e Expr)

func (*Builder) Expr

func (b *Builder) Expr() Expr

func (*Builder) ListEnd

func (b *Builder) ListEnd()

func (*Builder) ListStart

func (b *Builder) ListStart()

type Expr

type Expr struct {
	// contains filtered or unexported fields
}

func Read

func Read(src []byte) (Expr, []byte, error)

func (Expr) All

func (e Expr) All() iter.Seq2[int, Expr]

func (Expr) Bind

func (e Expr) Bind(parts ...*Expr) bool

func (Expr) Empty

func (e Expr) Empty() bool

func (Expr) Head

func (e Expr) Head() Expr

func (Expr) Kind

func (e Expr) Kind() Kind

func (Expr) Position

func (e Expr) Position() int

func (Expr) Scope

func (e Expr) Scope() string

func (Expr) Tail

func (e Expr) Tail() Expr

func (Expr) Text

func (e Expr) Text() string

func (Expr) UnsafeScope

func (e Expr) UnsafeScope() string

func (Expr) UnsafeText

func (e Expr) UnsafeText() string

type Kind

type Kind int
const (
	List Kind = iota
	String
	Number
	Scope
	Symbol
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL