parsing

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Type  string  `'.' @Ident`
	Units float64 `('(' @Number? ')')?`
}

type Command

type Command struct {
	Type       string     `@Command`
	Properties []Property `('(' (@@ (',' @@)*)? ')')?`
}

type Element

type Element struct {
	Type       string     `@Element`
	Properties []Property `('(' (@@ (',' @@)*)? ')')?`
	Actions    []Action   `( @@+ )?`
}

type Entry

type Entry struct {
	Element Element `@@`
	Command Command `| @@`
}

type Property

type Property struct {
	Key   string `@Ident '='`
	Value string `@String`
}

type Schematic

type Schematic struct {
	Entries []Entry `@@*`
}

func MustReadSchematic

func MustReadSchematic(schemFileContents []byte, schemFilePath string) (schematic *Schematic)

Jump to

Keyboard shortcuts

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