Documentation
¶
Index ¶
- func Decorate(f *ast.File, fset *token.FileSet) *dst.File
- func Fprint(w io.Writer, f *dst.File) error
- func Parse(src interface{}) (*dst.File, error)
- func Print(f *dst.File) error
- func Restore(file *dst.File) (*ast.File, *token.FileSet)
- func RestoreNamed(name string, file *dst.File, fset *token.FileSet) *ast.File
- type CommentFragment
- type DecorationFragment
- type Fragger
- func (f *Fragger) AddComment(text string, pos token.Pos)
- func (f *Fragger) AddDecoration(n ast.Node, name string)
- func (f *Fragger) AddNewline(pos token.Pos)
- func (f *Fragger) AddStart(n ast.Node, pos token.Pos)
- func (f *Fragger) AddString(n ast.Node, s string, pos token.Pos)
- func (f *Fragger) AddToken(n ast.Node, t token.Token, pos token.Pos)
- func (f *Fragger) Fragment(file *ast.File, fset *token.FileSet)
- func (f *Fragger) Link() map[ast.Node]map[string][]string
- func (f *Fragger) ProcessNode(n ast.Node)
- type Fragment
- type NewlineFragment
- type StringFragment
- type TokenFragment
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CommentFragment ¶
func (CommentFragment) Position ¶
func (v CommentFragment) Position() token.Pos
type DecorationFragment ¶
func (DecorationFragment) Position ¶
func (v DecorationFragment) Position() token.Pos
type Fragger ¶
type Fragger struct {
Fragments []Fragment
// contains filtered or unexported fields
}
func (*Fragger) AddNewline ¶
func (*Fragger) ProcessNode ¶
type NewlineFragment ¶
func (NewlineFragment) Position ¶
func (v NewlineFragment) Position() token.Pos
type StringFragment ¶
func (StringFragment) Position ¶
func (v StringFragment) Position() token.Pos
Click to show internal directories.
Click to hide internal directories.