generate

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2019 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &base.Command{
	UsageLine: "generate [dir]",
	Short:     `generate code required by the game framework`,
	Long:      `generate code so that assets and objects can be referenced by constant IDs`,
	Flag:      flag.NewFlagSet("generate", flag.ExitOnError),
	Run:       run,
}

Functions

func Run

func Run(args Arguments) (err error)

Types

type Arguments

type Arguments struct {
	Directory string
	Verbose   bool
}

type Asset

type Asset struct {
	Name string
	Path string
}

type AssetKind

type AssetKind struct {
	Name   string
	Assets []Asset
}

type File

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

File holds a single parsed file and associated data.

type Generator

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

Generator holds the state of the analysis. Primarily used to buffer the output for format.Source.

func (*Generator) Headerf

func (g *Generator) Headerf(format string, args ...interface{})

func (*Generator) Printf

func (g *Generator) Printf(format string, args ...interface{})

type Package

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

type Parser

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

type Struct

type Struct struct {
	Name    string
	Struct  *types.Struct
	ID      string
	Node    *ast.TypeSpec
	FileSet *token.FileSet
}

Jump to

Keyboard shortcuts

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