nodeid

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package nodeid provides a deterministic, immutable AST node-id path builder. Each Builder holds an immutable path string; Child and Index return new Builders so callers can never mutate shared state.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

Builder holds an immutable path string identifying a specific AST node.

func New

func New(root string) Builder

New creates a root Builder whose path is root.

func (Builder) Child

func (b Builder) Child(name string) Builder

Child returns a new Builder with path b.path + "/" + name.

func (Builder) Index

func (b Builder) Index(i int) Builder

Index returns a new Builder with path b.path + ":" + i.

func (Builder) String

func (b Builder) String() string

String returns the path string.

Jump to

Keyboard shortcuts

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