Documentation
¶
Index ¶
- Variables
- func ASTGetTypeName(expr ast.Expr, fset *token.FileSet) string
- func CustomHandleTypeName(typName string) string
- func GetDeclAndCompletion(funcName string, params, results []*Field, funcRefType reflect.Type) (string, string)
- func GetProjectAstPackages() (map[string]*ast.Package, *token.FileSet, error)
- func GetProjectPath() string
- func GetTypeNameWithPkgPath(typ reflect.Type) (pkgPath string, pkgPathName string)
- func RegisterHook(hook func(h *DocumentHelper))
- func ShrinkTypeVerboseName(i string) string
- type CacheAstBundle
- type DeprecateFunction
- type DocumentHelper
- func (h *DocumentHelper) Callback()
- func (h *DocumentHelper) GetAllLibs() []string
- func (h *DocumentHelper) HelpInfo() string
- func (h *DocumentHelper) InjectInterfaceDocumentManually(interfacePath, sourceCodePath string) error
- func (h *DocumentHelper) LibFuncAutoCompletion(libName, funcName string) string
- func (h *DocumentHelper) LibFuncDefinitionStr(libName, funcName string) string
- func (h *DocumentHelper) LibFuncHelpInfo(libName, funcName string) string
- func (h *DocumentHelper) LibHelpInfo(name string) string
- func (h *DocumentHelper) ShowHelpInfo()
- func (h *DocumentHelper) ShowLibFuncHelpInfo(libName, funcName string)
- func (h *DocumentHelper) ShowLibHelpInfo(name string)
- type Field
- type FuncDecl
- type LibInstance
- type ScriptLib
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CustomHandleTypeName ¶
func GetDeclAndCompletion ¶
func GetProjectAstPackages ¶
func GetProjectPath ¶
func GetProjectPath() string
func GetTypeNameWithPkgPath ¶
func RegisterHook ¶
func RegisterHook(hook func(h *DocumentHelper))
Types ¶
type CacheAstBundle ¶
type CacheAstBundle struct {
// contains filtered or unexported fields
}
func GetCacheAstBundle ¶
func GetCacheAstBundle(fileName string, src string) (*CacheAstBundle, error)
type DeprecateFunction ¶
type DocumentHelper ¶
type DocumentHelper struct {
Libs map[string]*ScriptLib
Functions map[string]*FuncDecl
Instances map[string]*LibInstance
StructMethods map[string]*ScriptLib // 结构体方法,名字 -> 所有结构体与结构体指针方法
DeprecatedFunctions []*DeprecateFunction
// contains filtered or unexported fields
}
func (*DocumentHelper) Callback ¶
func (h *DocumentHelper) Callback()
func (*DocumentHelper) GetAllLibs ¶
func (h *DocumentHelper) GetAllLibs() []string
func (*DocumentHelper) HelpInfo ¶
func (h *DocumentHelper) HelpInfo() string
func (*DocumentHelper) InjectInterfaceDocumentManually ¶
func (h *DocumentHelper) InjectInterfaceDocumentManually(interfacePath, sourceCodePath string) error
func (*DocumentHelper) LibFuncAutoCompletion ¶
func (h *DocumentHelper) LibFuncAutoCompletion(libName, funcName string) string
func (*DocumentHelper) LibFuncDefinitionStr ¶
func (h *DocumentHelper) LibFuncDefinitionStr(libName, funcName string) string
func (*DocumentHelper) LibFuncHelpInfo ¶
func (h *DocumentHelper) LibFuncHelpInfo(libName, funcName string) string
func (*DocumentHelper) LibHelpInfo ¶
func (h *DocumentHelper) LibHelpInfo(name string) string
func (*DocumentHelper) ShowHelpInfo ¶
func (h *DocumentHelper) ShowHelpInfo()
func (*DocumentHelper) ShowLibFuncHelpInfo ¶
func (h *DocumentHelper) ShowLibFuncHelpInfo(libName, funcName string)
func (*DocumentHelper) ShowLibHelpInfo ¶
func (h *DocumentHelper) ShowLibHelpInfo(name string)
type FuncDecl ¶
type FuncDecl struct {
LibName string
MethodName string
Document string
Decl string
Params []*Field
Results []*Field
VSCodeSnippets string
}
func ForceFuncToFuncDecl ¶
func FuncToFuncDecl ¶
Get description and declaration of a func
type LibInstance ¶
func AnyTypeToLibInstance ¶
func AnyTypeToLibInstance(libName, name string, typ reflect.Type, value interface{}) *LibInstance
func (*LibInstance) String ¶
func (i *LibInstance) String() string
Click to show internal directories.
Click to hide internal directories.