Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Mangle ¶
Mangle returns a Emacs-style public symbol name. Mangle("pkg", "name") => "goism-pkg.name".
func MangleMethod ¶
MangleMethod is like Mangle, but intended to be used for method names. MangleMethod("pkg", "recv", "name") => "goism-pkg.recv.name"
func ManglePriv ¶
ManglePriv returns a Emacs-style private symbol name. Used for symbols that are automatically generated by the goism. ManglePriv("pkg", "name") => "goism--pkg.name".
Types ¶
type FuncTable ¶
type FuncTable struct {
// contains filtered or unexported fields
}
FuncTable contains all functions that are used in a package that is being translated.
func NewFuncTable ¶
NewFuncTable creates initialized function table.
func (*FuncTable) Inserter ¶
func (ftab *FuncTable) Inserter() *FuncTableInserter
Inserter returns FuncTableInserter that can be used to add function table entries.
func (*FuncTable) LookupFunc ¶
LookupFunc returns stored function or nil if no entry is found.
func (*FuncTable) LookupMethod ¶
LookupMethod returns stored method or nil if no entry is found.
type FuncTableInserter ¶
type FuncTableInserter struct {
// contains filtered or unexported fields
}
FuncTableInserter collects functions to fill FunctionTable.
func (*FuncTableInserter) GetAllFuncs ¶
func (ins *FuncTableInserter) GetAllFuncs() []*sexp.Func
GetAllFuncs returns all functons ever inserted into function table. Returned slice elements are sorted with in-source declaration order.
func (*FuncTableInserter) GetMasterFuncs ¶
func (ins *FuncTableInserter) GetMasterFuncs() []*sexp.Func
GetMasterFuncs returns functions that are defined inside master package. Returned slice elements are sorted with in-source declaration order.
type Itab ¶
type Itab struct { Name string // Symbol name ImplName string // Implementation type name Iface *types.Interface }
Itab contains information about interface table variable.
type ItabEnv ¶
type ItabEnv struct {
// contains filtered or unexported fields
}
ItabEnv used to store interface dynamic type info.