patchwork

package
v0.0.0-...-27ab5e1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithFileSet

func WithFileSet(fset *token.FileSet) func(*Patchwork)

WithFileSet :

func WithLookup

func WithLookup(lookup *lookup.Lookup) func(*Patchwork)

WithLookup :

Types

type File

type File struct {
	*Patchwork
	File *ast.File
}

File :

func (*File) Append

func (pf *File) Append(r *lookup.Result) (ok bool, err error)

Append :

func (*File) AppendOrReplace

func (pf *File) AppendOrReplace(r *lookup.Result) (ok bool, err error)

AppendOrReplace : upsert

func (*File) FprintCode

func (pf *File) FprintCode(w io.Writer) error

FprintCode :

func (*File) Lookup

func (pf *File) Lookup(name string) *lookup.Result

Lookup :

func (*File) LookupAllMethods

func (pf *File) LookupAllMethods(obname string) []*lookup.Result

LookupAllMethods :

func (*File) PrintAST

func (pf *File) PrintAST() error

PrintAST :

func (*File) PrintCode

func (pf *File) PrintCode() error

PrintCode :

func (*File) Replace

func (pf *File) Replace(r *lookup.Result) (ok bool, err error)

Replace :

func (*File) Wrap

func (pf *File) Wrap(pw *Patchwork) *File

Wrap : xxx

type Patchwork

type Patchwork struct {
	Fset *token.FileSet
	// contains filtered or unexported fields
}

Patchwork : (todo rename)

func NewPatchwork

func NewPatchwork(opts ...func(*Patchwork)) *Patchwork

NewPatchwork :

func (*Patchwork) MustParseFile

func (pw *Patchwork) MustParseFile(filename string, source interface{}) *File

MustParseFile :

func (*Patchwork) ParseAST

func (pw *Patchwork) ParseAST(filename string, file *ast.File) (*File, error)

ParseAST :

func (*Patchwork) ParseFile

func (pw *Patchwork) ParseFile(filename string, source interface{}) (*File, error)

ParseFile :

Jump to

Keyboard shortcuts

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