Documentation
¶
Overview ¶
Package ast provides a mockable wrapper for go/ast.
Index ¶
- type Impl
- func (*Impl) FileExports(src *ast.File) bool
- func (*Impl) FilterDecl(decl ast.Decl, f ast.Filter) bool
- func (*Impl) FilterFile(src *ast.File, f ast.Filter) bool
- func (*Impl) FilterPackage(pkg *ast.Package, f ast.Filter) bool
- func (*Impl) Fprint(w io.Writer, fset *token.FileSet, x any, f ast.FieldFilter) error
- func (*Impl) Inspect(node ast.Node, f func(ast.Node) bool)
- func (*Impl) IsExported(name string) bool
- func (*Impl) MergePackageFiles(pkg *ast.Package, mode ast.MergeMode) *ast.File
- func (*Impl) NewCommentMap(fset *token.FileSet, node ast.Node, comments []*ast.CommentGroup) ast.CommentMap
- func (*Impl) NewIdent(name string) *ast.Ident
- func (*Impl) NewObj(kind ast.ObjKind, name string) *ast.Object
- func (*Impl) NewPackage(fset *token.FileSet, files map[string]*ast.File, importer ast.Importer, ...) (*ast.Package, error)
- func (*Impl) NewScope(outer *ast.Scope) *ast.Scope
- func (*Impl) NotNilFilter(__v string, v_v reflect.Value) bool
- func (*Impl) PackageExports(pkg *ast.Package) bool
- func (*Impl) Print(fset *token.FileSet, x any) error
- func (*Impl) SortImports(fset *token.FileSet, f *ast.File)
- func (*Impl) Walk(v ast.Visitor, node ast.Node)
- type Interface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Impl ¶
type Impl struct{}
func (*Impl) IsExported ¶
func (*Impl) MergePackageFiles ¶
func (*Impl) NewCommentMap ¶
func (*Impl) NewCommentMap(fset *token.FileSet, node ast.Node, comments []*ast.CommentGroup) ast.CommentMap
func (*Impl) NewPackage ¶
type Interface ¶
type Interface interface { FileExports(src *ast.File) bool FilterDecl(decl ast.Decl, f ast.Filter) bool FilterFile(src *ast.File, f ast.Filter) bool FilterPackage(pkg *ast.Package, f ast.Filter) bool Fprint(w io.Writer, fset *token.FileSet, x any, f ast.FieldFilter) error Inspect(node ast.Node, f func(ast.Node) bool) IsExported(name string) bool MergePackageFiles(pkg *ast.Package, mode ast.MergeMode) *ast.File NewCommentMap(fset *token.FileSet, node ast.Node, comments []*ast.CommentGroup) ast.CommentMap NewIdent(name string) *ast.Ident NewObj(kind ast.ObjKind, name string) *ast.Object NewPackage(fset *token.FileSet, files map[string]*ast.File, importer ast.Importer, universe *ast.Scope) (*ast.Package, error) NewScope(outer *ast.Scope) *ast.Scope NotNilFilter(_ string, v reflect.Value) bool PackageExports(pkg *ast.Package) bool Print(fset *token.FileSet, x any) error SortImports(fset *token.FileSet, f *ast.File) Walk(v ast.Visitor, node ast.Node) }
Click to show internal directories.
Click to hide internal directories.