parser

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: AGPL-3.0 Imports: 6 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 BlockNode

type BlockNode struct {
	Entries []*EntryNode
	// contains filtered or unexported fields
}

func (*BlockNode) Kind

func (t *BlockNode) Kind() KindNode

func (*BlockNode) Position

func (t *BlockNode) Position() diag.Position

type DocumentNode

type DocumentNode struct {
	Entries []*EntryNode
}

type EntryNode

type EntryNode struct {
	Key        *lexer.Token
	NestedKeys []*lexer.Token
	Value      ValueNode
}

type InlineNode

type InlineNode struct {
	Value *lexer.Token
}

func (*InlineNode) Kind

func (t *InlineNode) Kind() KindNode

func (*InlineNode) Position

func (t *InlineNode) Position() diag.Position

type KindNode

type KindNode int
const (
	KN_Inline KindNode = iota
	KN_Block
)

type Parser

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

func New

func New(source TokenSource) *Parser

func (*Parser) Next added in v0.1.4

func (p *Parser) Next() (*EntryNode, error)

func (*Parser) Parse

func (p *Parser) Parse() (*DocumentNode, error)

type TokenSource

type TokenSource interface {
	NextToken() (lexer.Token, error)
}

type ValueNode

type ValueNode interface {
	Kind() KindNode
	Position() diag.Position
}

Jump to

Keyboard shortcuts

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