snbt

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrOutOfRange    = errors.New("out of range")
	ErrStopIteration = errors.New("stop iteration")
	ErrUnexpected    = errors.New("unexpected error")
)

Functions

func SetLogger added in v0.2.0

func SetLogger(l liblog.Logger)

Types

type Parser

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

func NewParser

func NewParser(snbt string) *Parser

func (*Parser) Char

func (p *Parser) Char(index int) (rune, error)

func (*Parser) Compact

func (p *Parser) Compact() error

func (*Parser) CurrToken

func (p *Parser) CurrToken() *Token

func (*Parser) Next

func (p *Parser) Next() error

func (*Parser) PrevToken

func (p *Parser) PrevToken() *Token

func (*Parser) Slice

func (p *Parser) Slice(start int, end int) ([]byte, error)

type SnbtError added in v0.2.0

type SnbtError struct {
	Op  string
	Err error
}

func (*SnbtError) Error added in v0.2.0

func (e *SnbtError) Error() string

func (*SnbtError) Unwrap added in v0.2.0

func (e *SnbtError) Unwrap() error

type Token

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

func (*Token) Char

func (t *Token) Char() rune

func (*Token) Index

func (t *Token) Index() int

Jump to

Keyboard shortcuts

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