Documentation ¶
Index ¶
- type CurCtx
- func (cx *CurCtx) Contains(typ ast.Node) bool
- func (cx *CurCtx) Each(f func(ast.Node))
- func (cx *CurCtx) FuncDeclName() (name string, isMethod bool)
- func (cx *CurCtx) FuncName() string
- func (cx *CurCtx) MethodName() string
- func (cx *CurCtx) Print(x ast.Node) (string, error)
- func (cx *CurCtx) Set(destPtr interface{}) bool
- func (cx *CurCtx) Some(f func(ast.Node) bool) bool
- type CurScope
- type DocNode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CurCtx ¶
type CurCtx struct { Ctx *mg.Ctx View *mg.View Scope CurScope PkgName string IsTestFile bool Line []byte Src []byte Pos int TokenPos token.Pos AstFile *ast.File TokenFile *token.File Doc *DocNode GenDecl *ast.GenDecl ImportSpec *ast.ImportSpec Comment *ast.Comment BlockStmt *ast.BlockStmt CallExpr *ast.CallExpr BasicLit *ast.BasicLit Nodes []ast.Node Node ast.Node // contains filtered or unexported fields }
func NewViewCurCtx ¶
func (*CurCtx) FuncDeclName ¶
FuncDeclName returns the name of the FuncDecl iff the cursor is on a func declariton's name. isMethod is true if the declaration is a method.
func (*CurCtx) FuncName ¶
FuncName returns the name of function iff the cursor is on a func declariton's name
func (*CurCtx) MethodName ¶
FuncName returns the name of function iff the cursor is on a method declariton's name
Click to show internal directories.
Click to hide internal directories.