datatype

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataType

type DataType struct {
	Type               types.Type
	PointerIndirection int
	// contains filtered or unexported fields
}

func CreateDataTypeFrom

func CreateDataTypeFrom(t types.Type, packageSource *packages.Package, allDeclaredInterfaces []declaredinterface.DeclaredInterface) DataType

func CreateDataTypeFromExpr

func CreateDataTypeFromExpr(expr ast.Expr, packageSource *packages.Package, allDeclaredInterfaces []declaredinterface.DeclaredInterface) DataType

func (*DataType) ActualGoType

func (d *DataType) ActualGoType() string

func (*DataType) ActualTemplateArg added in v0.0.5

func (d *DataType) ActualTemplateArg() string

func (*DataType) ConvertGoTypeToLua

func (d *DataType) ConvertGoTypeToLua(variable string) string

func (*DataType) ConvertGoTypeToLuaWithTableLevel added in v0.0.17

func (d *DataType) ConvertGoTypeToLuaWithTableLevel(variable string, tableLevel int) string

func (*DataType) ConvertLuaTypeToGo

func (d *DataType) ConvertLuaTypeToGo(variable string, source string, paramNum int) string

func (*DataType) ConvertLuaTypeToGoSliceEllipses

func (d *DataType) ConvertLuaTypeToGoSliceEllipses(t *types.Slice, variableToCreate string, luaVariable string, paramNum int) string

func (*DataType) ConvertLuaTypeToGoWithFunctionParam added in v0.0.16

func (d *DataType) ConvertLuaTypeToGoWithFunctionParam(variable string, source string, paramNum, functionParam int) string

func (*DataType) ConvertLuaTypeToGoWithTableLevel added in v0.0.16

func (d *DataType) ConvertLuaTypeToGoWithTableLevel(variable string, source string, paramNum, tableLevel int) string

func (*DataType) IsError

func (d *DataType) IsError() bool

func (*DataType) LuaParamType

func (d *DataType) LuaParamType() string

func (*DataType) LuaType added in v0.0.4

func (d *DataType) LuaType(isFunctionReturn bool) string

func (*DataType) Package

func (d *DataType) Package() string

func (*DataType) ReferenceOrDereferenceForAssignmentToField added in v0.0.2

func (d *DataType) ReferenceOrDereferenceForAssignmentToField() string

func (*DataType) TemplateArg added in v0.0.2

func (d *DataType) TemplateArg() string

type FunctionType added in v0.0.17

type FunctionType struct {
	ActualFnName string
	LuaFnName    string
	SourceFnName string
	Receiver     bool
	Params       []Param
	Ret          []DataType
}

func CreateFunction added in v0.0.17

func CreateFunction(typ *types.Signature, actualFnName, luaFnName, goBindFnName string, packageSource *packages.Package, allDeclaredInterfaces []declaredinterface.DeclaredInterface) FunctionType

func CreateFunctionFromExpr added in v0.0.17

func CreateFunctionFromExpr(fn *ast.FuncDecl, luaFnName, goBindFnName string, packageSource *packages.Package, allDeclaredInterfaces []declaredinterface.DeclaredInterface) FunctionType

func (*FunctionType) GenerateLuaFunctionParamRetDefinitions added in v0.0.17

func (f *FunctionType) GenerateLuaFunctionParamRetDefinitions() string

func (*FunctionType) GenerateLuaFunctionParamStubs added in v0.0.17

func (f *FunctionType) GenerateLuaFunctionParamStubs() string

func (*FunctionType) GenerateLuaFunctionWrapper added in v0.0.17

func (f *FunctionType) GenerateLuaFunctionWrapper(out io.Writer, userDataCheckFnName string)

func (*FunctionType) GenerateParamValues added in v0.0.17

func (f *FunctionType) GenerateParamValues(prefix string) string

func (*FunctionType) GenerateReturnValues added in v0.0.17

func (f *FunctionType) GenerateReturnValues(prefix string) string

func (*FunctionType) NumReturns added in v0.0.17

func (f *FunctionType) NumReturns() int

type GenUtil added in v0.0.16

type GenUtil struct{}

func (GenUtil) Concat added in v0.0.16

func (GenUtil) Concat(l, r string) string

func (GenUtil) GenerateCastError added in v0.0.16

func (GenUtil) GenerateCastError(funcParam, tableLevel, assignNum int, declaredGoType, luaVariable string) string

type Param added in v0.0.17

type Param struct {
	IsEllipses bool
	ParamNum   int
	LuaName    string
	DataType
}

func (*Param) ConvertLuaTypeToGo added in v0.0.17

func (p *Param) ConvertLuaTypeToGo(variableToCreate string, luaVariable string, paramNum int) string

func (*Param) LuaType added in v0.0.17

func (p *Param) LuaType(isFunctionReturn bool) string

Jump to

Keyboard shortcuts

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