parser

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

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) 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