gen

package
v0.0.0-...-fcffdc5 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(tree *DefinedTree, out io.Writer) error

func GenerateTo

func GenerateTo(tree *DefinedTree, outPath string) (err error)

Types

type DefinedField

type DefinedField struct {
	Name string
	Type dtype.DType
}

func (DefinedField) LongName

func (d DefinedField) LongName() string

type DefinedImpl

type DefinedImpl struct {
	Name     string
	This     string
	Usr      string
	Params   []string
	Body     string
	Settings types.ProcSettings
	DefIndex uint
	DefFinal bool
}

type DefinedInit

type DefinedInit struct {
	Name      string
	Value     string
	SourceLoc tokenizer.SourceLocation
}

type DefinedProc

type DefinedProc struct {
	Name string
}

type DefinedTree

type DefinedTree struct {
	Package       string
	PackageImport string
	Types         []DefinedType
	WorldName     string
	WorldMob      path.TypePath
	Imports       []string
	Maps          []string
}

func (*DefinedTree) AddImport

func (t *DefinedTree) AddImport(name string)

func (*DefinedTree) AllImports

func (d *DefinedTree) AllImports() (imports []string)

func (*DefinedTree) Exists

func (t *DefinedTree) Exists(path path.TypePath) bool

func (*DefinedTree) Extends

func (d *DefinedTree) Extends(subpath path.TypePath, superpath path.TypePath) bool

func (*DefinedTree) GetTypeByPath

func (t *DefinedTree) GetTypeByPath(path path.TypePath) *DefinedType

func (DefinedTree) GlobalProcedureExists

func (t DefinedTree) GlobalProcedureExists(name string) bool

func (*DefinedTree) LookupIndexedImpl

func (d *DefinedTree) LookupIndexedImpl(path path.TypePath, proc string, defIndex uint) *DefinedImpl

func (*DefinedTree) ParentOf

func (t *DefinedTree) ParentOf(path path.TypePath) path.TypePath

func (*DefinedTree) ResolveField

func (t *DefinedTree) ResolveField(typePath path.TypePath, name string) (dType dtype.DType, found bool)

func (*DefinedTree) ResolveFieldExact

func (t *DefinedTree) ResolveFieldExact(typePath path.TypePath, name string) (dType dtype.DType, found bool)

func (DefinedTree) ResolveProcedure

func (t DefinedTree) ResolveProcedure(typePath path.TypePath, name string) (predefs.ProcedureInfo, bool)

func (DefinedTree) ResolveProcedureExact

func (t DefinedTree) ResolveProcedureExact(typePath path.TypePath, name string) (predefs.ProcedureInfo, bool)

type DefinedType

type DefinedType struct {
	TypePath path.TypePath
	BasePath path.TypePath

	Fields []DefinedField
	Procs  []DefinedProc
	Impls  []*DefinedImpl
	Inits  []DefinedInit

	Verbs []string
	// contains filtered or unexported fields
}

func (*DefinedType) DataStructName

func (d *DefinedType) DataStructName() string

func (*DefinedType) IsDefined

func (d *DefinedType) IsDefined() bool

func (*DefinedType) IsOverride

func (d *DefinedType) IsOverride() bool

func (*DefinedType) ParentPath

func (d *DefinedType) ParentPath() path.TypePath

Jump to

Keyboard shortcuts

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