parser

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbstractSyntaxTree

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

type AstBuilder

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

func NewAstBuilder

func NewAstBuilder() *AstBuilder

func (*AstBuilder) AbstractSyntaxTree

func (builder *AstBuilder) AbstractSyntaxTree() *AbstractSyntaxTree

func (*AstBuilder) Build

func (builder *AstBuilder) Build(tokens []token.Token) error

Build parses tokens, builds yaml.Node, and inserts the built nodes to AstBuilder.AbstractSyntaxTree

Build maintains an internal state, which enables it to continuously build over multiple invocations

type Frame

type Frame interface {
	NodeType() yaml.NodeType

	// Build a yaml.NodeType from tokens argument
	Build([]token.Token) error

	// Builder building the underlying Node
	Builder() yaml.NodeBuilder

	// IndentationLevel is usually set by the indentation preceding the first token
	// parsed into this Frame
	IndentationLevel() int
}

Frame is a stateful yaml.Node building session

Jump to

Keyboard shortcuts

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