Documentation ¶
Index ¶
- Constants
- Variables
- func GeneratePluginFile(file *ast.File) string
- func GetExprString(e ast.Expr) string
- func GetTypeString(expr ast.Expr, name string, param bool) string
- func InsertStr(a []string, index int, value string) []string
- func IsSameType(a ast.Expr, b []ast.Expr, param bool) bool
- func MakeConstSpec(const_spec *ast.ValueSpec, tabs uint) string
- func MakeVarSpec(var_spec *ast.ValueSpec, tabs uint) string
- func ReplaceName(s *string, typ, rep string) bool
- func WriteParams(flist *ast.FieldList) []string
- func WriteStructMembs(flist *ast.FieldList) []string
- func WriteTabStr(count uint) string
- type EStruct
- type FuncBlock
- type MethodMap
- type SMPlugin
- type TypeString
Constants ¶
View Source
const ( Header string = "" /* 235-byte string literal not displayed */ GENFLAG_NEWLINE = 1 GENFLAG_SEMICOLON = 2 )
Variables ¶
View Source
var ( FuncNames = map[string]string{ "len": "sizeof", "main": "OnPluginStart", } IdenNames = map[string]string{ "nil": "null", } )
Functions ¶
func GeneratePluginFile ¶
func GetExprString ¶
func GetTypeString ¶
*
- SP params -> [const] TypeName ([]... | &) VarName ([N]...)
- SP vars -> TypeName VarName ([(N)]...)
- SP ret -> TypeName ([])
func ReplaceName ¶
func WriteParams ¶
func WriteStructMembs ¶
func WriteTabStr ¶
Types ¶
type FuncBlock ¶
type SMPlugin ¶
type SMPlugin struct {
Includes, Globals []string
Structs map[string]EStruct
//MethodMaps []MethodMap
Funcs []FuncBlock
}
func (*SMPlugin) MakeFuncDecl ¶
func (*SMPlugin) MakeTypeSpec ¶
type TypeString ¶
type TypeString struct {
TypeName, LhsBracks, Name, RhsBracks string
}
func (TypeString) Join ¶
func (ts TypeString) Join(param, is_ref, is_array bool) string
Click to show internal directories.
Click to hide internal directories.