mergeop

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSymbolExists = errors.New("symbol exists")

Functions

func QuoteY

func QuoteY(node *ir.Node) (*ir.Node, error)

func Register

func Register(s Symbol) error

func SplitChild

func SplitChild(opDoc *ir.Node) (tag string, args []string, child *ir.Node, err error)

func UnquoteY

func UnquoteY(node *ir.Node) (*ir.Node, error)

Types

type MatchFunc

type MatchFunc func(*ir.Node, *ir.Node) (bool, error)

type Name

type Name interface {
	String() string
	IsMatch() bool
	IsPatch() bool
}

type Op

type Op interface {
	Match(doc *ir.Node, f MatchFunc) (bool, error)
	Patch(doc *ir.Node, mf MatchFunc, pf PatchFunc, df libdiff.DiffFunc) (*ir.Node, error)
	String() string
}

type PatchFunc

type PatchFunc func(*ir.Node, *ir.Node) (*ir.Node, error)

type Symbol

type Symbol interface {
	Name
	Instance(child *ir.Node, args []string) (Op, error)
}

func AddTag

func AddTag() Symbol

func All

func All() Symbol

func And

func And() Symbol

func ArrayDiff

func ArrayDiff() Symbol

func Delete

func Delete() Symbol

func Dive

func Dive() Symbol

func Embed

func Embed() Symbol

func Field

func Field() Symbol

func Glob

func Glob() Symbol

func If

func If() Symbol

func Insert

func Insert() Symbol

func JSONPatch

func JSONPatch() Symbol

func KeyedList

func KeyedList() Symbol

func Let

func Let() Symbol

func Lookup

func Lookup(s string) Symbol

func Not

func Not() Symbol

func Nullify

func Nullify() Symbol

func Or

func Or() Symbol

func Pass

func Pass() Symbol

func Pipe

func Pipe() Symbol

func Quote

func Quote() Symbol

func RemoveTag

func RemoveTag() Symbol

func Rename

func Rename() Symbol

func Replace

func Replace() Symbol

func Retag

func Retag() Symbol

func StrDiff

func StrDiff() Symbol

func Subtree

func Subtree() Symbol

func Symbols

func Symbols() []Symbol

func Tag

func Tag() Symbol

func Type

func Type() Symbol

func Unquote

func Unquote() Symbol

Jump to

Keyboard shortcuts

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