Documentation ¶
Overview ¶
Package grinder defines the API for individual grinding bits.
Index ¶
- Constants
- func Diff(old, new string) []byte
- func GrindFuncDecls(ctxt *Context, pkg *Package, ...)
- type Context
- type EditBuffer
- func (b *EditBuffer) Apply() string
- func (b *EditBuffer) CopyLine(startp, endp, insertp token.Pos)
- func (b *EditBuffer) Delete(startp, endp token.Pos)
- func (b *EditBuffer) DeleteLine(startp, endp token.Pos)
- func (b *EditBuffer) Insert(p token.Pos, text string)
- func (b *EditBuffer) NumEdits() int
- func (b *EditBuffer) TextAt(start, end token.Pos) string
- type Func
- type Package
Constants ¶
View Source
const ( Insert = 1 + iota Delete )
Variables ¶
This section is empty.
Functions ¶
func GrindFuncDecls ¶
Types ¶
type EditBuffer ¶
type EditBuffer struct {
// contains filtered or unexported fields
}
func NewEditBuffer ¶
func NewEditBuffer(pkg *Package, filename string, f *ast.File) *EditBuffer
func (*EditBuffer) Apply ¶
func (b *EditBuffer) Apply() string
func (*EditBuffer) CopyLine ¶
func (b *EditBuffer) CopyLine(startp, endp, insertp token.Pos)
func (*EditBuffer) Delete ¶
func (b *EditBuffer) Delete(startp, endp token.Pos)
func (*EditBuffer) DeleteLine ¶
func (b *EditBuffer) DeleteLine(startp, endp token.Pos)
func (*EditBuffer) NumEdits ¶
func (b *EditBuffer) NumEdits() int
Click to show internal directories.
Click to hide internal directories.