ast

package
v1.5.18 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Node

type Node interface {
	// Return the type of node
	Type() Type

	// Parent node
	Parent() Node

	// Return children of the node
	Children() []Node

	// Return the underlying value, or nil if not applicable
	Value() any

	// Append a child node
	AppendChild(Node)
}

func NewArray

func NewArray(parent Node) Node

Create a new block

func NewBool

func NewBool(parent Node, v bool) Node

func NewDict

func NewDict(parent Node) Node

Create a new map[string]Node dictionary

func NewIdent

func NewIdent(parent Node, v string) Node

func NewNull

func NewNull(parent Node) Node

func NewNumber

func NewNumber(parent Node, v string) Node

func NewString

func NewString(parent Node, v string) Node

type Type

type Type int
const (
	// Value types
	Null   Type = iota // Null value
	Ident              // Identifier
	String             // String literal
	Number             // Number literal
	Bool               // Boolean literal
	Array              // Array of values
	Dict               // Dict of values
)

func (Type) String

func (t Type) String() string

Jump to

Keyboard shortcuts

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