directive

package module
v0.0.0-...-2c4dd6d Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

README

Directive

Scripting to-go

Example

name "something"
other_name "something else"
version "30"
[author "diane" "john" "anonymous"]

@note { freq "440"; duration "1.beat" }

measure {
    [note {} {} {} {}]
}

EBNF

document           = { directive | repeated_directive }
directive          = [ "@" ], identifier, value, [ ";" ]
repeated_directive = "[", [ "@" ], identifier, values "]"

identifier         = /([a-zA-Z][a-zA-Z0-9_]+)/
values             = { value, [","] }
value              = object | string
object             = "{", { directive | repeated_directive }, "}"
string             = /"((?:[^"\\]|\\.)*)"/

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(data []byte, target interface{}) (err error)

Types

type Executer

type Executer interface {
	Execute(target interface{}) (err error)
}

func Prepare

func Prepare(data []byte) (e Executer, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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