toc

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Type directive.Type = "toc"

Variables

This section is empty.

Functions

This section is empty.

Types

type Branch

type Branch[T any] struct {
	// contains filtered or unexported fields
}

func NewBranch

func NewBranch[T any](branches ...*Branch[T]) *Branch[T]

func (*Branch[T]) Add

func (b *Branch[T]) Add(branch *Branch[T]) *Branch[T]

func (*Branch[T]) Branches

func (b *Branch[T]) Branches() []*Branch[T]

func (*Branch[T]) Get

func (b *Branch[T]) Get() T

func (*Branch[T]) Level

func (b *Branch[T]) Level() int

func (*Branch[T]) Parent

func (b *Branch[T]) Parent() *Branch[T]

func (*Branch[T]) ParentAt

func (b *Branch[T]) ParentAt(level int) *Branch[T]

func (*Branch[T]) Remove

func (b *Branch[T]) Remove(branch *Branch[T]) (*Branch[T], bool)

func (*Branch[T]) Set

func (b *Branch[T]) Set(v T)

func (*Branch[T]) Walk

func (b *Branch[T]) Walk(walk func(branch *Branch[T]))

type NodeTransformer

type NodeTransformer struct {
}

func (*NodeTransformer) PostTransform

func (t *NodeTransformer) PostTransform(doc *ast.Document, reader text.Reader, pc parser.Context) error

Transform implements directive.NodeTransformer.

func (*NodeTransformer) Transform

func (t *NodeTransformer) Transform(node *directive.Node, reader text.Reader, pc parser.Context) error

Transform implements directive.NodeTransformer.

Jump to

Keyboard shortcuts

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