ast

package
v0.11.48 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: GPL-3.0 Imports: 7 Imported by: ? 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

func LookupMappingValue

func LookupMappingValue(mapping *yaml.Node, key string) (*yaml.Node, *yaml.Node, bool)

func NodeRange

func NodeRange(node *yaml.Node) protocol.Range

func SequenceItems

func SequenceItems(node *yaml.Node) []*yaml.Node

Types

type Document

type Document struct {
	URI    string
	Source []byte
	Root   *yaml.Node
}

func Parse

func Parse(uri string, content []byte) (*Document, error)

func ParseRecovering

func ParseRecovering(uri string, content []byte) (*Document, []protocol.Diagnostic, error)

func (*Document) ContentRoot

func (d *Document) ContentRoot() *yaml.Node

func (*Document) Location

func (d *Document) Location(node *yaml.Node) protocol.Location

func (*Document) TopLevelMap

func (d *Document) TopLevelMap() *yaml.Node

func (*Document) TopLevelSection

func (d *Document) TopLevelSection(name string) (*yaml.Node, *yaml.Node, bool)

type MappingEntry

type MappingEntry struct {
	Key   *yaml.Node
	Value *yaml.Node
}

func MappingEntries

func MappingEntries(mapping *yaml.Node) []MappingEntry

Jump to

Keyboard shortcuts

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