// Code generated by mknode.go. DO NOT EDIT. package ir import "fmt" func (n *AddStringExpr) String() string { return fmt.Sprint(n) } func (n *AddStringExpr) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *AddStringExpr) copy() Node { c := *n c.init = c.init.Copy() c.list = c.list.Copy() return &c } func (n *AddStringExpr) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDoList(n.list, err, do) return err } func (n *AddStringExpr) editChildren(edit func(Node) Node) { editList(n.init, edit) editList(n.list, edit) } func (n *AddrExpr) String() string { return fmt.Sprint(n) } func (n *AddrExpr) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *AddrExpr) copy() Node { c := *n c.init = c.init.Copy() return &c } func (n *AddrExpr) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDo(n.X, err, do) err = maybeDo(n.Alloc, err, do) return err } func (n *AddrExpr) editChildren(edit func(Node) Node) { editList(n.init, edit) n.X = maybeEdit(n.X, edit) n.Alloc = maybeEdit(n.Alloc, edit) } func (n *ArrayType) String() string { return fmt.Sprint(n) } func (n *ArrayType) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *ArrayType) copy() Node { c := *n return &c } func (n *ArrayType) doChildren(do func(Node) error) error { var err error err = maybeDo(n.Len, err, do) err = maybeDo(n.Elem, err, do) return err } func (n *ArrayType) editChildren(edit func(Node) Node) { n.Len = maybeEdit(n.Len, edit) n.Elem = maybeEdit(n.Elem, edit) } func (n *AssignListStmt) String() string { return fmt.Sprint(n) } func (n *AssignListStmt) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *AssignListStmt) copy() Node { c := *n c.init = c.init.Copy() c.Lhs = c.Lhs.Copy() c.Rhs = c.Rhs.Copy() return &c } func (n *AssignListStmt) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDoList(n.Lhs, err, do) err = maybeDoList(n.Rhs, err, do) return err } func (n *AssignListStmt) editChildren(edit func(Node) Node) { editList(n.init, edit) editList(n.Lhs, edit) editList(n.Rhs, edit) } func (n *AssignOpStmt) String() string { return fmt.Sprint(n) } func (n *AssignOpStmt) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *AssignOpStmt) copy() Node { c := *n c.init = c.init.Copy() return &c } func (n *AssignOpStmt) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDo(n.X, err, do) err = maybeDo(n.Y, err, do) return err } func (n *AssignOpStmt) editChildren(edit func(Node) Node) { editList(n.init, edit) n.X = maybeEdit(n.X, edit) n.Y = maybeEdit(n.Y, edit) } func (n *AssignStmt) String() string { return fmt.Sprint(n) } func (n *AssignStmt) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *AssignStmt) copy() Node { c := *n c.init = c.init.Copy() return &c } func (n *AssignStmt) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDo(n.X, err, do) err = maybeDo(n.Y, err, do) return err } func (n *AssignStmt) editChildren(edit func(Node) Node) { editList(n.init, edit) n.X = maybeEdit(n.X, edit) n.Y = maybeEdit(n.Y, edit) } func (n *BinaryExpr) String() string { return fmt.Sprint(n) } func (n *BinaryExpr) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *BinaryExpr) copy() Node { c := *n c.init = c.init.Copy() return &c } func (n *BinaryExpr) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDo(n.X, err, do) err = maybeDo(n.Y, err, do) return err } func (n *BinaryExpr) editChildren(edit func(Node) Node) { editList(n.init, edit) n.X = maybeEdit(n.X, edit) n.Y = maybeEdit(n.Y, edit) } func (n *BlockStmt) String() string { return fmt.Sprint(n) } func (n *BlockStmt) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *BlockStmt) copy() Node { c := *n c.init = c.init.Copy() c.list = c.list.Copy() return &c } func (n *BlockStmt) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDoList(n.list, err, do) return err } func (n *BlockStmt) editChildren(edit func(Node) Node) { editList(n.init, edit) editList(n.list, edit) } func (n *BranchStmt) String() string { return fmt.Sprint(n) } func (n *BranchStmt) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *BranchStmt) copy() Node { c := *n c.init = c.init.Copy() return &c } func (n *BranchStmt) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) return err } func (n *BranchStmt) editChildren(edit func(Node) Node) { editList(n.init, edit) } func (n *CallExpr) String() string { return fmt.Sprint(n) } func (n *CallExpr) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *CallExpr) copy() Node { c := *n c.init = c.init.Copy() c.Args = c.Args.Copy() c.Rargs = c.Rargs.Copy() c.body = c.body.Copy() return &c } func (n *CallExpr) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDo(n.X, err, do) err = maybeDoList(n.Args, err, do) err = maybeDoList(n.Rargs, err, do) err = maybeDoList(n.body, err, do) return err } func (n *CallExpr) editChildren(edit func(Node) Node) { editList(n.init, edit) n.X = maybeEdit(n.X, edit) editList(n.Args, edit) editList(n.Rargs, edit) editList(n.body, edit) } func (n *CallPartExpr) String() string { return fmt.Sprint(n) } func (n *CallPartExpr) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *CallPartExpr) copy() Node { c := *n c.init = c.init.Copy() return &c } func (n *CallPartExpr) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDo(n.X, err, do) return err } func (n *CallPartExpr) editChildren(edit func(Node) Node) { editList(n.init, edit) n.X = maybeEdit(n.X, edit) } func (n *CaseStmt) String() string { return fmt.Sprint(n) } func (n *CaseStmt) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *CaseStmt) copy() Node { c := *n c.init = c.init.Copy() c.Vars = c.Vars.Copy() c.list = c.list.Copy() c.body = c.body.Copy() return &c } func (n *CaseStmt) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDoList(n.Vars, err, do) err = maybeDoList(n.list, err, do) err = maybeDo(n.Comm, err, do) err = maybeDoList(n.body, err, do) return err } func (n *CaseStmt) editChildren(edit func(Node) Node) { editList(n.init, edit) editList(n.Vars, edit) editList(n.list, edit) n.Comm = maybeEdit(n.Comm, edit) editList(n.body, edit) } func (n *ChanType) String() string { return fmt.Sprint(n) } func (n *ChanType) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *ChanType) copy() Node { c := *n return &c } func (n *ChanType) doChildren(do func(Node) error) error { var err error err = maybeDo(n.Elem, err, do) return err } func (n *ChanType) editChildren(edit func(Node) Node) { n.Elem = maybeEdit(n.Elem, edit) } func (n *ClosureExpr) String() string { return fmt.Sprint(n) } func (n *ClosureExpr) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *ClosureExpr) copy() Node { c := *n c.init = c.init.Copy() return &c } func (n *ClosureExpr) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) return err } func (n *ClosureExpr) editChildren(edit func(Node) Node) { editList(n.init, edit) } func (n *ClosureRead) String() string { return fmt.Sprint(n) } func (n *ClosureRead) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *ClosureRead) copy() Node { c := *n c.init = c.init.Copy() return &c } func (n *ClosureRead) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) return err } func (n *ClosureRead) editChildren(edit func(Node) Node) { editList(n.init, edit) } func (n *CompLitExpr) String() string { return fmt.Sprint(n) } func (n *CompLitExpr) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *CompLitExpr) copy() Node { c := *n c.init = c.init.Copy() c.list = c.list.Copy() return &c } func (n *CompLitExpr) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDo(n.Ntype, err, do) err = maybeDoList(n.list, err, do) return err } func (n *CompLitExpr) editChildren(edit func(Node) Node) { editList(n.init, edit) n.Ntype = toNtype(maybeEdit(n.Ntype, edit)) editList(n.list, edit) } func (n *ConstExpr) String() string { return fmt.Sprint(n) } func (n *ConstExpr) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *ConstExpr) copy() Node { c := *n c.init = c.init.Copy() return &c } func (n *ConstExpr) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) return err } func (n *ConstExpr) editChildren(edit func(Node) Node) { editList(n.init, edit) } func (n *ConvExpr) String() string { return fmt.Sprint(n) } func (n *ConvExpr) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *ConvExpr) copy() Node { c := *n c.init = c.init.Copy() return &c } func (n *ConvExpr) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDo(n.X, err, do) return err } func (n *ConvExpr) editChildren(edit func(Node) Node) { editList(n.init, edit) n.X = maybeEdit(n.X, edit) } func (n *Decl) String() string { return fmt.Sprint(n) } func (n *Decl) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *Decl) copy() Node { c := *n return &c } func (n *Decl) doChildren(do func(Node) error) error { var err error err = maybeDo(n.X, err, do) return err } func (n *Decl) editChildren(edit func(Node) Node) { n.X = maybeEdit(n.X, edit) } func (n *DeferStmt) String() string { return fmt.Sprint(n) } func (n *DeferStmt) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *DeferStmt) copy() Node { c := *n c.init = c.init.Copy() return &c } func (n *DeferStmt) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDo(n.Call, err, do) return err } func (n *DeferStmt) editChildren(edit func(Node) Node) { editList(n.init, edit) n.Call = maybeEdit(n.Call, edit) } func (n *ForStmt) String() string { return fmt.Sprint(n) } func (n *ForStmt) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *ForStmt) copy() Node { c := *n c.init = c.init.Copy() c.Late = c.Late.Copy() c.body = c.body.Copy() return &c } func (n *ForStmt) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDo(n.Cond, err, do) err = maybeDoList(n.Late, err, do) err = maybeDo(n.Post, err, do) err = maybeDoList(n.body, err, do) return err } func (n *ForStmt) editChildren(edit func(Node) Node) { editList(n.init, edit) n.Cond = maybeEdit(n.Cond, edit) editList(n.Late, edit) n.Post = maybeEdit(n.Post, edit) editList(n.body, edit) } func (n *Func) String() string { return fmt.Sprint(n) } func (n *Func) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *Func) copy() Node { c := *n c.body = c.body.Copy() return &c } func (n *Func) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.body, err, do) return err } func (n *Func) editChildren(edit func(Node) Node) { editList(n.body, edit) } func (n *FuncType) String() string { return fmt.Sprint(n) } func (n *FuncType) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *FuncType) copy() Node { c := *n if c.Recv != nil { c.Recv = c.Recv.copy() } c.Params = copyFields(c.Params) c.Results = copyFields(c.Results) return &c } func (n *FuncType) doChildren(do func(Node) error) error { var err error err = maybeDoField(n.Recv, err, do) err = maybeDoFields(n.Params, err, do) err = maybeDoFields(n.Results, err, do) return err } func (n *FuncType) editChildren(edit func(Node) Node) { editField(n.Recv, edit) editFields(n.Params, edit) editFields(n.Results, edit) } func (n *GoStmt) String() string { return fmt.Sprint(n) } func (n *GoStmt) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *GoStmt) copy() Node { c := *n c.init = c.init.Copy() return &c } func (n *GoStmt) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDo(n.Call, err, do) return err } func (n *GoStmt) editChildren(edit func(Node) Node) { editList(n.init, edit) n.Call = maybeEdit(n.Call, edit) } func (n *IfStmt) String() string { return fmt.Sprint(n) } func (n *IfStmt) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *IfStmt) copy() Node { c := *n c.init = c.init.Copy() c.body = c.body.Copy() c.Else = c.Else.Copy() return &c } func (n *IfStmt) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDo(n.Cond, err, do) err = maybeDoList(n.body, err, do) err = maybeDoList(n.Else, err, do) return err } func (n *IfStmt) editChildren(edit func(Node) Node) { editList(n.init, edit) n.Cond = maybeEdit(n.Cond, edit) editList(n.body, edit) editList(n.Else, edit) } func (n *IndexExpr) String() string { return fmt.Sprint(n) } func (n *IndexExpr) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *IndexExpr) copy() Node { c := *n c.init = c.init.Copy() return &c } func (n *IndexExpr) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDo(n.X, err, do) err = maybeDo(n.Index, err, do) return err } func (n *IndexExpr) editChildren(edit func(Node) Node) { editList(n.init, edit) n.X = maybeEdit(n.X, edit) n.Index = maybeEdit(n.Index, edit) } func (n *InlineMarkStmt) String() string { return fmt.Sprint(n) } func (n *InlineMarkStmt) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *InlineMarkStmt) copy() Node { c := *n c.init = c.init.Copy() return &c } func (n *InlineMarkStmt) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) return err } func (n *InlineMarkStmt) editChildren(edit func(Node) Node) { editList(n.init, edit) } func (n *InlinedCallExpr) String() string { return fmt.Sprint(n) } func (n *InlinedCallExpr) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *InlinedCallExpr) copy() Node { c := *n c.init = c.init.Copy() c.body = c.body.Copy() c.ReturnVars = c.ReturnVars.Copy() return &c } func (n *InlinedCallExpr) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDoList(n.body, err, do) err = maybeDoList(n.ReturnVars, err, do) return err } func (n *InlinedCallExpr) editChildren(edit func(Node) Node) { editList(n.init, edit) editList(n.body, edit) editList(n.ReturnVars, edit) } func (n *InterfaceType) String() string { return fmt.Sprint(n) } func (n *InterfaceType) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *InterfaceType) copy() Node { c := *n c.Methods = copyFields(c.Methods) return &c } func (n *InterfaceType) doChildren(do func(Node) error) error { var err error err = maybeDoFields(n.Methods, err, do) return err } func (n *InterfaceType) editChildren(edit func(Node) Node) { editFields(n.Methods, edit) } func (n *KeyExpr) String() string { return fmt.Sprint(n) } func (n *KeyExpr) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *KeyExpr) copy() Node { c := *n c.init = c.init.Copy() return &c } func (n *KeyExpr) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDo(n.Key, err, do) err = maybeDo(n.Value, err, do) return err } func (n *KeyExpr) editChildren(edit func(Node) Node) { editList(n.init, edit) n.Key = maybeEdit(n.Key, edit) n.Value = maybeEdit(n.Value, edit) } func (n *LabelStmt) String() string { return fmt.Sprint(n) } func (n *LabelStmt) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *LabelStmt) copy() Node { c := *n c.init = c.init.Copy() return &c } func (n *LabelStmt) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) return err } func (n *LabelStmt) editChildren(edit func(Node) Node) { editList(n.init, edit) } func (n *MakeExpr) String() string { return fmt.Sprint(n) } func (n *MakeExpr) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *MakeExpr) copy() Node { c := *n c.init = c.init.Copy() return &c } func (n *MakeExpr) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDo(n.Len, err, do) err = maybeDo(n.Cap, err, do) return err } func (n *MakeExpr) editChildren(edit func(Node) Node) { editList(n.init, edit) n.Len = maybeEdit(n.Len, edit) n.Cap = maybeEdit(n.Cap, edit) } func (n *MapType) String() string { return fmt.Sprint(n) } func (n *MapType) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *MapType) copy() Node { c := *n return &c } func (n *MapType) doChildren(do func(Node) error) error { var err error err = maybeDo(n.Key, err, do) err = maybeDo(n.Elem, err, do) return err } func (n *MapType) editChildren(edit func(Node) Node) { n.Key = maybeEdit(n.Key, edit) n.Elem = maybeEdit(n.Elem, edit) } func (n *MethodExpr) String() string { return fmt.Sprint(n) } func (n *MethodExpr) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *MethodExpr) copy() Node { c := *n c.init = c.init.Copy() return &c } func (n *MethodExpr) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDo(n.X, err, do) err = maybeDo(n.M, err, do) return err } func (n *MethodExpr) editChildren(edit func(Node) Node) { editList(n.init, edit) n.X = maybeEdit(n.X, edit) n.M = maybeEdit(n.M, edit) } func (n *Name) String() string { return fmt.Sprint(n) } func (n *Name) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *Name) copy() Node { c := *n return &c } func (n *Name) doChildren(do func(Node) error) error { var err error return err } func (n *Name) editChildren(edit func(Node) Node) { } func (n *NilExpr) String() string { return fmt.Sprint(n) } func (n *NilExpr) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *NilExpr) copy() Node { c := *n c.init = c.init.Copy() return &c } func (n *NilExpr) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) return err } func (n *NilExpr) editChildren(edit func(Node) Node) { editList(n.init, edit) } func (n *ParenExpr) String() string { return fmt.Sprint(n) } func (n *ParenExpr) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *ParenExpr) copy() Node { c := *n c.init = c.init.Copy() return &c } func (n *ParenExpr) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDo(n.X, err, do) return err } func (n *ParenExpr) editChildren(edit func(Node) Node) { editList(n.init, edit) n.X = maybeEdit(n.X, edit) } func (n *PkgName) String() string { return fmt.Sprint(n) } func (n *PkgName) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *PkgName) copy() Node { c := *n return &c } func (n *PkgName) doChildren(do func(Node) error) error { var err error return err } func (n *PkgName) editChildren(edit func(Node) Node) { } func (n *RangeStmt) String() string { return fmt.Sprint(n) } func (n *RangeStmt) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *RangeStmt) copy() Node { c := *n c.init = c.init.Copy() c.Vars = c.Vars.Copy() c.body = c.body.Copy() return &c } func (n *RangeStmt) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDoList(n.Vars, err, do) err = maybeDo(n.X, err, do) err = maybeDoList(n.body, err, do) return err } func (n *RangeStmt) editChildren(edit func(Node) Node) { editList(n.init, edit) editList(n.Vars, edit) n.X = maybeEdit(n.X, edit) editList(n.body, edit) } func (n *ResultExpr) String() string { return fmt.Sprint(n) } func (n *ResultExpr) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *ResultExpr) copy() Node { c := *n c.init = c.init.Copy() return &c } func (n *ResultExpr) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) return err } func (n *ResultExpr) editChildren(edit func(Node) Node) { editList(n.init, edit) } func (n *ReturnStmt) String() string { return fmt.Sprint(n) } func (n *ReturnStmt) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *ReturnStmt) copy() Node { c := *n c.init = c.init.Copy() c.Results = c.Results.Copy() return &c } func (n *ReturnStmt) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDoList(n.Results, err, do) return err } func (n *ReturnStmt) editChildren(edit func(Node) Node) { editList(n.init, edit) editList(n.Results, edit) } func (n *SelectStmt) String() string { return fmt.Sprint(n) } func (n *SelectStmt) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *SelectStmt) copy() Node { c := *n c.init = c.init.Copy() c.Cases = c.Cases.Copy() c.Compiled = c.Compiled.Copy() return &c } func (n *SelectStmt) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDoList(n.Cases, err, do) err = maybeDoList(n.Compiled, err, do) return err } func (n *SelectStmt) editChildren(edit func(Node) Node) { editList(n.init, edit) editList(n.Cases, edit) editList(n.Compiled, edit) } func (n *SelectorExpr) String() string { return fmt.Sprint(n) } func (n *SelectorExpr) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *SelectorExpr) copy() Node { c := *n c.init = c.init.Copy() return &c } func (n *SelectorExpr) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDo(n.X, err, do) return err } func (n *SelectorExpr) editChildren(edit func(Node) Node) { editList(n.init, edit) n.X = maybeEdit(n.X, edit) } func (n *SendStmt) String() string { return fmt.Sprint(n) } func (n *SendStmt) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *SendStmt) copy() Node { c := *n c.init = c.init.Copy() return &c } func (n *SendStmt) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDo(n.Chan, err, do) err = maybeDo(n.Value, err, do) return err } func (n *SendStmt) editChildren(edit func(Node) Node) { editList(n.init, edit) n.Chan = maybeEdit(n.Chan, edit) n.Value = maybeEdit(n.Value, edit) } func (n *SliceExpr) String() string { return fmt.Sprint(n) } func (n *SliceExpr) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *SliceExpr) copy() Node { c := *n c.init = c.init.Copy() c.list = c.list.Copy() return &c } func (n *SliceExpr) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDo(n.X, err, do) err = maybeDoList(n.list, err, do) return err } func (n *SliceExpr) editChildren(edit func(Node) Node) { editList(n.init, edit) n.X = maybeEdit(n.X, edit) editList(n.list, edit) } func (n *SliceHeaderExpr) String() string { return fmt.Sprint(n) } func (n *SliceHeaderExpr) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *SliceHeaderExpr) copy() Node { c := *n c.init = c.init.Copy() c.lenCap = c.lenCap.Copy() return &c } func (n *SliceHeaderExpr) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDo(n.Ptr, err, do) err = maybeDoList(n.lenCap, err, do) return err } func (n *SliceHeaderExpr) editChildren(edit func(Node) Node) { editList(n.init, edit) n.Ptr = maybeEdit(n.Ptr, edit) editList(n.lenCap, edit) } func (n *SliceType) String() string { return fmt.Sprint(n) } func (n *SliceType) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *SliceType) copy() Node { c := *n return &c } func (n *SliceType) doChildren(do func(Node) error) error { var err error err = maybeDo(n.Elem, err, do) return err } func (n *SliceType) editChildren(edit func(Node) Node) { n.Elem = maybeEdit(n.Elem, edit) } func (n *StarExpr) String() string { return fmt.Sprint(n) } func (n *StarExpr) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *StarExpr) copy() Node { c := *n c.init = c.init.Copy() return &c } func (n *StarExpr) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDo(n.X, err, do) return err } func (n *StarExpr) editChildren(edit func(Node) Node) { editList(n.init, edit) n.X = maybeEdit(n.X, edit) } func (n *StructType) String() string { return fmt.Sprint(n) } func (n *StructType) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *StructType) copy() Node { c := *n c.Fields = copyFields(c.Fields) return &c } func (n *StructType) doChildren(do func(Node) error) error { var err error err = maybeDoFields(n.Fields, err, do) return err } func (n *StructType) editChildren(edit func(Node) Node) { editFields(n.Fields, edit) } func (n *SwitchStmt) String() string { return fmt.Sprint(n) } func (n *SwitchStmt) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *SwitchStmt) copy() Node { c := *n c.init = c.init.Copy() c.Cases = c.Cases.Copy() c.Compiled = c.Compiled.Copy() return &c } func (n *SwitchStmt) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDo(n.Tag, err, do) err = maybeDoList(n.Cases, err, do) err = maybeDoList(n.Compiled, err, do) return err } func (n *SwitchStmt) editChildren(edit func(Node) Node) { editList(n.init, edit) n.Tag = maybeEdit(n.Tag, edit) editList(n.Cases, edit) editList(n.Compiled, edit) } func (n *TypeAssertExpr) String() string { return fmt.Sprint(n) } func (n *TypeAssertExpr) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *TypeAssertExpr) copy() Node { c := *n c.init = c.init.Copy() c.Itab = c.Itab.Copy() return &c } func (n *TypeAssertExpr) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDo(n.X, err, do) err = maybeDo(n.Ntype, err, do) err = maybeDoList(n.Itab, err, do) return err } func (n *TypeAssertExpr) editChildren(edit func(Node) Node) { editList(n.init, edit) n.X = maybeEdit(n.X, edit) n.Ntype = maybeEdit(n.Ntype, edit) editList(n.Itab, edit) } func (n *TypeSwitchGuard) String() string { return fmt.Sprint(n) } func (n *TypeSwitchGuard) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *TypeSwitchGuard) copy() Node { c := *n return &c } func (n *TypeSwitchGuard) doChildren(do func(Node) error) error { var err error if n.name != nil { err = maybeDo(n.name, err, do) } err = maybeDo(n.X, err, do) return err } func (n *TypeSwitchGuard) editChildren(edit func(Node) Node) { if n.name != nil { n.name = edit(n.name).(*Name) } n.X = maybeEdit(n.X, edit) } func (n *UnaryExpr) String() string { return fmt.Sprint(n) } func (n *UnaryExpr) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *UnaryExpr) copy() Node { c := *n c.init = c.init.Copy() return &c } func (n *UnaryExpr) doChildren(do func(Node) error) error { var err error err = maybeDoList(n.init, err, do) err = maybeDo(n.X, err, do) return err } func (n *UnaryExpr) editChildren(edit func(Node) Node) { editList(n.init, edit) n.X = maybeEdit(n.X, edit) } func (n *typeNode) String() string { return fmt.Sprint(n) } func (n *typeNode) Format(s fmt.State, verb rune) { FmtNode(n, s, verb) } func (n *typeNode) copy() Node { c := *n return &c } func (n *typeNode) doChildren(do func(Node) error) error { var err error return err } func (n *typeNode) editChildren(edit func(Node) Node) { }