hook

package
v1.73.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

Package hook breaks the lisp/codewalk import cycle. Only lisp injects these adapters, and internal/codewalk consumes them after lisp initializes.

Index

Constants

This section is empty.

Variables

View Source
var Forms any

Forms holds the form-only runtime visitor adapter.

View Source
var Occurrences any

Occurrences holds func(*lisp.CodeWalker, int, *lisp.LVal) bool.

View Source
var PackageForms any

PackageForms holds func([]*lisp.LVal) []*lisp.LVal.

View Source
var Walk any

Walk holds the source adapter accepting a walker, Options, and a form. Its typed signature is recovered by internal/codewalk.

Functions

This section is empty.

Types

type Binding

type Binding struct {
	NameIndex    int
	FormalsIndex int
}

Binding describes application-defined binding syntax. The caller validates both indices; a negative NameIndex means the form declares no name.

type Node

type Node[V, E any] struct {
	Node     *V
	Owner    *V
	Formals  *V
	Init     *V
	Op       string
	Depth    int
	Head     bool
	Bound    bool
	Function bool
	Outer    bool
	Template bool
	Event    E
}

Node carries source-only metadata without depending on lisp. Both sides instantiate exactly this type, so the bridge does not copy each event.

type Options

type Options[V, E any] struct {
	Visit            func(*Node[V, E]) bool
	BindingForm      func(*V) *Binding
	Reference        func(*V)
	Form             func(*V, string, int) bool
	End              func(int)
	EndDepth         *int
	SkipLiterals     bool
	DeclarationsOnly bool
}

Options carries source visitor policy across the import-cycle bridge.

Jump to

Keyboard shortcuts

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