language

package
v0.1.4-beta.4 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2026 License: ISC Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const BODY_SUBSTITUTION = "%[...]"

Variables

View Source
var Registry = map[string][]string{}

Functions

func Add

func Add(path string, lines []string) error

Types

type Definition

type Definition struct {
	File *internal.JsonFile
	Env  internal.Env
}

type GeneratorTemplate

type GeneratorTemplate struct {
	Dir         string
	Iterators   map[string]internal.Rows
	Definitions map[string]Definition
}

func NewGeneratorTemplate

func NewGeneratorTemplate(root string, manifest *internal.JsonFile) (*GeneratorTemplate, error)

type InlineTemplate

type InlineTemplate struct {
	RequiredArgs []string
	Call         func(writer io.Writer, reader io.Reader, args []string) error
}

func NewInlineTemplate

func NewInlineTemplate(dir string, manifest *internal.JsonFile) (*InlineTemplate, error)

func (*InlineTemplate) IsArgPassthrough

func (template *InlineTemplate) IsArgPassthrough() bool

type Line

type Line struct {
	Parent   *Line
	Contents string
	Nested   []*Line
}

func (*Line) Append

func (line *Line) Append(nested *Line)

func (*Line) ExtractResource

func (line *Line) ExtractResource() string

func (*Line) Format

func (line *Line) Format(parent, location string) *Line

func (*Line) String

func (line *Line) String() string

func (*Line) Write

func (line *Line) Write(writer io.Writer, indent int)

type Mcfunction

type Mcfunction struct {
	Path    string
	Scanner *bufio.Scanner
	// contains filtered or unexported fields
}

func NewMcfunction

func NewMcfunction(path string, scanner *bufio.Scanner) *Mcfunction

func (*Mcfunction) BuildTree

func (fn *Mcfunction) BuildTree() *Mcfunction

func (*Mcfunction) GenerateFiles

func (fn *Mcfunction) GenerateFiles(lines []string) (map[string][]string, error)

func (*Mcfunction) Parse

func (fn *Mcfunction) Parse(templates map[string]*InlineTemplate) ([]string, error)

func (*Mcfunction) ParseAndSave

func (fn *Mcfunction) ParseAndSave(templates map[string]*InlineTemplate) error

Jump to

Keyboard shortcuts

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