parse

package
v1.5.37 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter(parent HasElements, callback func(parent HasElements, el asciidoc.Element) (remove bool, replace asciidoc.Set, shortCircuit bool)) (shortCircuit bool)

func FindAll

func FindAll[T any](parent asciidoc.HasElements) iter.Seq[T]

func FindFirst

func FindFirst[T any](parent asciidoc.HasElements) T

func HexOrDec

func HexOrDec(s string) (uint64, error)

func Position

func Position(el asciidoc.Element) string

func Skim

func Skim[T any](elements asciidoc.Set) iter.Seq[T]

func SkimFunc

func SkimFunc[T any](elements asciidoc.Set, callback func(t T) bool) bool

func SkimList

func SkimList[T any](elements asciidoc.Set) []T

func Traverse

func Traverse[T any](parent HasElements, els asciidoc.Set, callback TraverseCallback[T])

Types

type HasElements

type HasElements interface {
	SetElements(asciidoc.Set)
	Elements() asciidoc.Set
}

type SearchShould

type SearchShould uint8
const (
	SearchShouldContinue SearchShould = iota
	SearchShouldStop
	SearchShouldSkip
)

type TraverseCallback

type TraverseCallback[T any] func(el T, parent HasElements, index int) SearchShould

Jump to

Keyboard shortcuts

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