1 // Code generated by mknode.go. DO NOT EDIT.
7 func (n *AddStringExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
8 func (n *AddStringExpr) copy() Node {
10 c.init = copyNodes(c.init)
11 c.List = copyNodes(c.List)
14 func (n *AddStringExpr) doChildren(do func(Node) bool) bool {
15 if doNodes(n.init, do) {
18 if doNodes(n.List, do) {
21 if n.Prealloc != nil && do(n.Prealloc) {
26 func (n *AddStringExpr) editChildren(edit func(Node) Node) {
27 editNodes(n.init, edit)
28 editNodes(n.List, edit)
29 if n.Prealloc != nil {
30 n.Prealloc = edit(n.Prealloc).(*Name)
33 func (n *AddStringExpr) editChildrenWithHidden(edit func(Node) Node) {
34 editNodes(n.init, edit)
35 editNodes(n.List, edit)
36 if n.Prealloc != nil {
37 n.Prealloc = edit(n.Prealloc).(*Name)
41 func (n *AddrExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
42 func (n *AddrExpr) copy() Node {
44 c.init = copyNodes(c.init)
47 func (n *AddrExpr) doChildren(do func(Node) bool) bool {
48 if doNodes(n.init, do) {
51 if n.X != nil && do(n.X) {
54 if n.Prealloc != nil && do(n.Prealloc) {
59 func (n *AddrExpr) editChildren(edit func(Node) Node) {
60 editNodes(n.init, edit)
62 n.X = edit(n.X).(Node)
64 if n.Prealloc != nil {
65 n.Prealloc = edit(n.Prealloc).(*Name)
68 func (n *AddrExpr) editChildrenWithHidden(edit func(Node) Node) {
69 editNodes(n.init, edit)
71 n.X = edit(n.X).(Node)
73 if n.Prealloc != nil {
74 n.Prealloc = edit(n.Prealloc).(*Name)
78 func (n *AssignListStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
79 func (n *AssignListStmt) copy() Node {
81 c.init = copyNodes(c.init)
82 c.Lhs = copyNodes(c.Lhs)
83 c.Rhs = copyNodes(c.Rhs)
86 func (n *AssignListStmt) doChildren(do func(Node) bool) bool {
87 if doNodes(n.init, do) {
90 if doNodes(n.Lhs, do) {
93 if doNodes(n.Rhs, do) {
98 func (n *AssignListStmt) editChildren(edit func(Node) Node) {
99 editNodes(n.init, edit)
100 editNodes(n.Lhs, edit)
101 editNodes(n.Rhs, edit)
103 func (n *AssignListStmt) editChildrenWithHidden(edit func(Node) Node) {
104 editNodes(n.init, edit)
105 editNodes(n.Lhs, edit)
106 editNodes(n.Rhs, edit)
109 func (n *AssignOpStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
110 func (n *AssignOpStmt) copy() Node {
112 c.init = copyNodes(c.init)
115 func (n *AssignOpStmt) doChildren(do func(Node) bool) bool {
116 if doNodes(n.init, do) {
119 if n.X != nil && do(n.X) {
122 if n.Y != nil && do(n.Y) {
127 func (n *AssignOpStmt) editChildren(edit func(Node) Node) {
128 editNodes(n.init, edit)
130 n.X = edit(n.X).(Node)
133 n.Y = edit(n.Y).(Node)
136 func (n *AssignOpStmt) editChildrenWithHidden(edit func(Node) Node) {
137 editNodes(n.init, edit)
139 n.X = edit(n.X).(Node)
142 n.Y = edit(n.Y).(Node)
146 func (n *AssignStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
147 func (n *AssignStmt) copy() Node {
149 c.init = copyNodes(c.init)
152 func (n *AssignStmt) doChildren(do func(Node) bool) bool {
153 if doNodes(n.init, do) {
156 if n.X != nil && do(n.X) {
159 if n.Y != nil && do(n.Y) {
164 func (n *AssignStmt) editChildren(edit func(Node) Node) {
165 editNodes(n.init, edit)
167 n.X = edit(n.X).(Node)
170 n.Y = edit(n.Y).(Node)
173 func (n *AssignStmt) editChildrenWithHidden(edit func(Node) Node) {
174 editNodes(n.init, edit)
176 n.X = edit(n.X).(Node)
179 n.Y = edit(n.Y).(Node)
183 func (n *BasicLit) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
184 func (n *BasicLit) copy() Node {
186 c.init = copyNodes(c.init)
189 func (n *BasicLit) doChildren(do func(Node) bool) bool {
190 if doNodes(n.init, do) {
195 func (n *BasicLit) editChildren(edit func(Node) Node) {
196 editNodes(n.init, edit)
198 func (n *BasicLit) editChildrenWithHidden(edit func(Node) Node) {
199 editNodes(n.init, edit)
202 func (n *BinaryExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
203 func (n *BinaryExpr) copy() Node {
205 c.init = copyNodes(c.init)
208 func (n *BinaryExpr) doChildren(do func(Node) bool) bool {
209 if doNodes(n.init, do) {
212 if n.X != nil && do(n.X) {
215 if n.Y != nil && do(n.Y) {
220 func (n *BinaryExpr) editChildren(edit func(Node) Node) {
221 editNodes(n.init, edit)
223 n.X = edit(n.X).(Node)
226 n.Y = edit(n.Y).(Node)
229 func (n *BinaryExpr) editChildrenWithHidden(edit func(Node) Node) {
230 editNodes(n.init, edit)
232 n.X = edit(n.X).(Node)
235 n.Y = edit(n.Y).(Node)
238 n.RType = edit(n.RType).(Node)
242 func (n *BlockStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
243 func (n *BlockStmt) copy() Node {
245 c.init = copyNodes(c.init)
246 c.List = copyNodes(c.List)
249 func (n *BlockStmt) doChildren(do func(Node) bool) bool {
250 if doNodes(n.init, do) {
253 if doNodes(n.List, do) {
258 func (n *BlockStmt) editChildren(edit func(Node) Node) {
259 editNodes(n.init, edit)
260 editNodes(n.List, edit)
262 func (n *BlockStmt) editChildrenWithHidden(edit func(Node) Node) {
263 editNodes(n.init, edit)
264 editNodes(n.List, edit)
267 func (n *BranchStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
268 func (n *BranchStmt) copy() Node {
270 c.init = copyNodes(c.init)
273 func (n *BranchStmt) doChildren(do func(Node) bool) bool {
274 if doNodes(n.init, do) {
279 func (n *BranchStmt) editChildren(edit func(Node) Node) {
280 editNodes(n.init, edit)
282 func (n *BranchStmt) editChildrenWithHidden(edit func(Node) Node) {
283 editNodes(n.init, edit)
286 func (n *CallExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
287 func (n *CallExpr) copy() Node {
289 c.init = copyNodes(c.init)
290 c.Args = copyNodes(c.Args)
291 c.KeepAlive = copyNames(c.KeepAlive)
294 func (n *CallExpr) doChildren(do func(Node) bool) bool {
295 if doNodes(n.init, do) {
298 if n.Fun != nil && do(n.Fun) {
301 if doNodes(n.Args, do) {
304 if doNames(n.KeepAlive, do) {
309 func (n *CallExpr) editChildren(edit func(Node) Node) {
310 editNodes(n.init, edit)
312 n.Fun = edit(n.Fun).(Node)
314 editNodes(n.Args, edit)
315 editNames(n.KeepAlive, edit)
317 func (n *CallExpr) editChildrenWithHidden(edit func(Node) Node) {
318 editNodes(n.init, edit)
320 n.Fun = edit(n.Fun).(Node)
322 editNodes(n.Args, edit)
324 n.RType = edit(n.RType).(Node)
326 editNames(n.KeepAlive, edit)
329 func (n *CaseClause) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
330 func (n *CaseClause) copy() Node {
332 c.init = copyNodes(c.init)
333 c.List = copyNodes(c.List)
334 c.RTypes = copyNodes(c.RTypes)
335 c.Body = copyNodes(c.Body)
338 func (n *CaseClause) doChildren(do func(Node) bool) bool {
339 if doNodes(n.init, do) {
342 if n.Var != nil && do(n.Var) {
345 if doNodes(n.List, do) {
348 if doNodes(n.RTypes, do) {
351 if doNodes(n.Body, do) {
356 func (n *CaseClause) editChildren(edit func(Node) Node) {
357 editNodes(n.init, edit)
359 n.Var = edit(n.Var).(*Name)
361 editNodes(n.List, edit)
362 editNodes(n.RTypes, edit)
363 editNodes(n.Body, edit)
365 func (n *CaseClause) editChildrenWithHidden(edit func(Node) Node) {
366 editNodes(n.init, edit)
368 n.Var = edit(n.Var).(*Name)
370 editNodes(n.List, edit)
371 editNodes(n.RTypes, edit)
372 editNodes(n.Body, edit)
375 func (n *ClosureExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
376 func (n *ClosureExpr) copy() Node {
378 c.init = copyNodes(c.init)
381 func (n *ClosureExpr) doChildren(do func(Node) bool) bool {
382 if doNodes(n.init, do) {
385 if n.Prealloc != nil && do(n.Prealloc) {
390 func (n *ClosureExpr) editChildren(edit func(Node) Node) {
391 editNodes(n.init, edit)
392 if n.Prealloc != nil {
393 n.Prealloc = edit(n.Prealloc).(*Name)
396 func (n *ClosureExpr) editChildrenWithHidden(edit func(Node) Node) {
397 editNodes(n.init, edit)
398 if n.Prealloc != nil {
399 n.Prealloc = edit(n.Prealloc).(*Name)
403 func (n *CommClause) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
404 func (n *CommClause) copy() Node {
406 c.init = copyNodes(c.init)
407 c.Body = copyNodes(c.Body)
410 func (n *CommClause) doChildren(do func(Node) bool) bool {
411 if doNodes(n.init, do) {
414 if n.Comm != nil && do(n.Comm) {
417 if doNodes(n.Body, do) {
422 func (n *CommClause) editChildren(edit func(Node) Node) {
423 editNodes(n.init, edit)
425 n.Comm = edit(n.Comm).(Node)
427 editNodes(n.Body, edit)
429 func (n *CommClause) editChildrenWithHidden(edit func(Node) Node) {
430 editNodes(n.init, edit)
432 n.Comm = edit(n.Comm).(Node)
434 editNodes(n.Body, edit)
437 func (n *CompLitExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
438 func (n *CompLitExpr) copy() Node {
440 c.init = copyNodes(c.init)
441 c.List = copyNodes(c.List)
444 func (n *CompLitExpr) doChildren(do func(Node) bool) bool {
445 if doNodes(n.init, do) {
448 if doNodes(n.List, do) {
451 if n.Prealloc != nil && do(n.Prealloc) {
456 func (n *CompLitExpr) editChildren(edit func(Node) Node) {
457 editNodes(n.init, edit)
458 editNodes(n.List, edit)
459 if n.Prealloc != nil {
460 n.Prealloc = edit(n.Prealloc).(*Name)
463 func (n *CompLitExpr) editChildrenWithHidden(edit func(Node) Node) {
464 editNodes(n.init, edit)
465 editNodes(n.List, edit)
467 n.RType = edit(n.RType).(Node)
469 if n.Prealloc != nil {
470 n.Prealloc = edit(n.Prealloc).(*Name)
474 func (n *ConvExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
475 func (n *ConvExpr) copy() Node {
477 c.init = copyNodes(c.init)
480 func (n *ConvExpr) doChildren(do func(Node) bool) bool {
481 if doNodes(n.init, do) {
484 if n.X != nil && do(n.X) {
489 func (n *ConvExpr) editChildren(edit func(Node) Node) {
490 editNodes(n.init, edit)
492 n.X = edit(n.X).(Node)
495 func (n *ConvExpr) editChildrenWithHidden(edit func(Node) Node) {
496 editNodes(n.init, edit)
498 n.X = edit(n.X).(Node)
500 if n.TypeWord != nil {
501 n.TypeWord = edit(n.TypeWord).(Node)
503 if n.SrcRType != nil {
504 n.SrcRType = edit(n.SrcRType).(Node)
506 if n.ElemRType != nil {
507 n.ElemRType = edit(n.ElemRType).(Node)
509 if n.ElemElemRType != nil {
510 n.ElemElemRType = edit(n.ElemElemRType).(Node)
514 func (n *Decl) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
515 func (n *Decl) copy() Node {
519 func (n *Decl) doChildren(do func(Node) bool) bool {
520 if n.X != nil && do(n.X) {
525 func (n *Decl) editChildren(edit func(Node) Node) {
527 n.X = edit(n.X).(*Name)
530 func (n *Decl) editChildrenWithHidden(edit func(Node) Node) {
532 n.X = edit(n.X).(*Name)
536 func (n *DynamicType) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
537 func (n *DynamicType) copy() Node {
539 c.init = copyNodes(c.init)
542 func (n *DynamicType) doChildren(do func(Node) bool) bool {
543 if doNodes(n.init, do) {
546 if n.RType != nil && do(n.RType) {
549 if n.ITab != nil && do(n.ITab) {
554 func (n *DynamicType) editChildren(edit func(Node) Node) {
555 editNodes(n.init, edit)
557 n.RType = edit(n.RType).(Node)
560 n.ITab = edit(n.ITab).(Node)
563 func (n *DynamicType) editChildrenWithHidden(edit func(Node) Node) {
564 editNodes(n.init, edit)
566 n.RType = edit(n.RType).(Node)
569 n.ITab = edit(n.ITab).(Node)
573 func (n *DynamicTypeAssertExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
574 func (n *DynamicTypeAssertExpr) copy() Node {
576 c.init = copyNodes(c.init)
579 func (n *DynamicTypeAssertExpr) doChildren(do func(Node) bool) bool {
580 if doNodes(n.init, do) {
583 if n.X != nil && do(n.X) {
586 if n.SrcRType != nil && do(n.SrcRType) {
589 if n.RType != nil && do(n.RType) {
592 if n.ITab != nil && do(n.ITab) {
597 func (n *DynamicTypeAssertExpr) editChildren(edit func(Node) Node) {
598 editNodes(n.init, edit)
600 n.X = edit(n.X).(Node)
602 if n.SrcRType != nil {
603 n.SrcRType = edit(n.SrcRType).(Node)
606 n.RType = edit(n.RType).(Node)
609 n.ITab = edit(n.ITab).(Node)
612 func (n *DynamicTypeAssertExpr) editChildrenWithHidden(edit func(Node) Node) {
613 editNodes(n.init, edit)
615 n.X = edit(n.X).(Node)
617 if n.SrcRType != nil {
618 n.SrcRType = edit(n.SrcRType).(Node)
621 n.RType = edit(n.RType).(Node)
624 n.ITab = edit(n.ITab).(Node)
628 func (n *ForStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
629 func (n *ForStmt) copy() Node {
631 c.init = copyNodes(c.init)
632 c.Body = copyNodes(c.Body)
635 func (n *ForStmt) doChildren(do func(Node) bool) bool {
636 if doNodes(n.init, do) {
639 if n.Cond != nil && do(n.Cond) {
642 if n.Post != nil && do(n.Post) {
645 if doNodes(n.Body, do) {
650 func (n *ForStmt) editChildren(edit func(Node) Node) {
651 editNodes(n.init, edit)
653 n.Cond = edit(n.Cond).(Node)
656 n.Post = edit(n.Post).(Node)
658 editNodes(n.Body, edit)
660 func (n *ForStmt) editChildrenWithHidden(edit func(Node) Node) {
661 editNodes(n.init, edit)
663 n.Cond = edit(n.Cond).(Node)
666 n.Post = edit(n.Post).(Node)
668 editNodes(n.Body, edit)
671 func (n *Func) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
673 func (n *GoDeferStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
674 func (n *GoDeferStmt) copy() Node {
676 c.init = copyNodes(c.init)
679 func (n *GoDeferStmt) doChildren(do func(Node) bool) bool {
680 if doNodes(n.init, do) {
683 if n.Call != nil && do(n.Call) {
688 func (n *GoDeferStmt) editChildren(edit func(Node) Node) {
689 editNodes(n.init, edit)
691 n.Call = edit(n.Call).(Node)
694 func (n *GoDeferStmt) editChildrenWithHidden(edit func(Node) Node) {
695 editNodes(n.init, edit)
697 n.Call = edit(n.Call).(Node)
701 func (n *Ident) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
702 func (n *Ident) copy() Node {
704 c.init = copyNodes(c.init)
707 func (n *Ident) doChildren(do func(Node) bool) bool {
708 if doNodes(n.init, do) {
713 func (n *Ident) editChildren(edit func(Node) Node) {
714 editNodes(n.init, edit)
716 func (n *Ident) editChildrenWithHidden(edit func(Node) Node) {
717 editNodes(n.init, edit)
720 func (n *IfStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
721 func (n *IfStmt) copy() Node {
723 c.init = copyNodes(c.init)
724 c.Body = copyNodes(c.Body)
725 c.Else = copyNodes(c.Else)
728 func (n *IfStmt) doChildren(do func(Node) bool) bool {
729 if doNodes(n.init, do) {
732 if n.Cond != nil && do(n.Cond) {
735 if doNodes(n.Body, do) {
738 if doNodes(n.Else, do) {
743 func (n *IfStmt) editChildren(edit func(Node) Node) {
744 editNodes(n.init, edit)
746 n.Cond = edit(n.Cond).(Node)
748 editNodes(n.Body, edit)
749 editNodes(n.Else, edit)
751 func (n *IfStmt) editChildrenWithHidden(edit func(Node) Node) {
752 editNodes(n.init, edit)
754 n.Cond = edit(n.Cond).(Node)
756 editNodes(n.Body, edit)
757 editNodes(n.Else, edit)
760 func (n *IndexExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
761 func (n *IndexExpr) copy() Node {
763 c.init = copyNodes(c.init)
766 func (n *IndexExpr) doChildren(do func(Node) bool) bool {
767 if doNodes(n.init, do) {
770 if n.X != nil && do(n.X) {
773 if n.Index != nil && do(n.Index) {
778 func (n *IndexExpr) editChildren(edit func(Node) Node) {
779 editNodes(n.init, edit)
781 n.X = edit(n.X).(Node)
784 n.Index = edit(n.Index).(Node)
787 func (n *IndexExpr) editChildrenWithHidden(edit func(Node) Node) {
788 editNodes(n.init, edit)
790 n.X = edit(n.X).(Node)
793 n.Index = edit(n.Index).(Node)
796 n.RType = edit(n.RType).(Node)
800 func (n *InlineMarkStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
801 func (n *InlineMarkStmt) copy() Node {
803 c.init = copyNodes(c.init)
806 func (n *InlineMarkStmt) doChildren(do func(Node) bool) bool {
807 if doNodes(n.init, do) {
812 func (n *InlineMarkStmt) editChildren(edit func(Node) Node) {
813 editNodes(n.init, edit)
815 func (n *InlineMarkStmt) editChildrenWithHidden(edit func(Node) Node) {
816 editNodes(n.init, edit)
819 func (n *InlinedCallExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
820 func (n *InlinedCallExpr) copy() Node {
822 c.init = copyNodes(c.init)
823 c.Body = copyNodes(c.Body)
824 c.ReturnVars = copyNodes(c.ReturnVars)
827 func (n *InlinedCallExpr) doChildren(do func(Node) bool) bool {
828 if doNodes(n.init, do) {
831 if doNodes(n.Body, do) {
834 if doNodes(n.ReturnVars, do) {
839 func (n *InlinedCallExpr) editChildren(edit func(Node) Node) {
840 editNodes(n.init, edit)
841 editNodes(n.Body, edit)
842 editNodes(n.ReturnVars, edit)
844 func (n *InlinedCallExpr) editChildrenWithHidden(edit func(Node) Node) {
845 editNodes(n.init, edit)
846 editNodes(n.Body, edit)
847 editNodes(n.ReturnVars, edit)
850 func (n *InterfaceSwitchStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
851 func (n *InterfaceSwitchStmt) copy() Node {
853 c.init = copyNodes(c.init)
856 func (n *InterfaceSwitchStmt) doChildren(do func(Node) bool) bool {
857 if doNodes(n.init, do) {
860 if n.Case != nil && do(n.Case) {
863 if n.Itab != nil && do(n.Itab) {
866 if n.RuntimeType != nil && do(n.RuntimeType) {
871 func (n *InterfaceSwitchStmt) editChildren(edit func(Node) Node) {
872 editNodes(n.init, edit)
874 n.Case = edit(n.Case).(Node)
877 n.Itab = edit(n.Itab).(Node)
879 if n.RuntimeType != nil {
880 n.RuntimeType = edit(n.RuntimeType).(Node)
883 func (n *InterfaceSwitchStmt) editChildrenWithHidden(edit func(Node) Node) {
884 editNodes(n.init, edit)
886 n.Case = edit(n.Case).(Node)
889 n.Itab = edit(n.Itab).(Node)
891 if n.RuntimeType != nil {
892 n.RuntimeType = edit(n.RuntimeType).(Node)
896 func (n *JumpTableStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
897 func (n *JumpTableStmt) copy() Node {
899 c.init = copyNodes(c.init)
902 func (n *JumpTableStmt) doChildren(do func(Node) bool) bool {
903 if doNodes(n.init, do) {
906 if n.Idx != nil && do(n.Idx) {
911 func (n *JumpTableStmt) editChildren(edit func(Node) Node) {
912 editNodes(n.init, edit)
914 n.Idx = edit(n.Idx).(Node)
917 func (n *JumpTableStmt) editChildrenWithHidden(edit func(Node) Node) {
918 editNodes(n.init, edit)
920 n.Idx = edit(n.Idx).(Node)
924 func (n *KeyExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
925 func (n *KeyExpr) copy() Node {
927 c.init = copyNodes(c.init)
930 func (n *KeyExpr) doChildren(do func(Node) bool) bool {
931 if doNodes(n.init, do) {
934 if n.Key != nil && do(n.Key) {
937 if n.Value != nil && do(n.Value) {
942 func (n *KeyExpr) editChildren(edit func(Node) Node) {
943 editNodes(n.init, edit)
945 n.Key = edit(n.Key).(Node)
948 n.Value = edit(n.Value).(Node)
951 func (n *KeyExpr) editChildrenWithHidden(edit func(Node) Node) {
952 editNodes(n.init, edit)
954 n.Key = edit(n.Key).(Node)
957 n.Value = edit(n.Value).(Node)
961 func (n *LabelStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
962 func (n *LabelStmt) copy() Node {
964 c.init = copyNodes(c.init)
967 func (n *LabelStmt) doChildren(do func(Node) bool) bool {
968 if doNodes(n.init, do) {
973 func (n *LabelStmt) editChildren(edit func(Node) Node) {
974 editNodes(n.init, edit)
976 func (n *LabelStmt) editChildrenWithHidden(edit func(Node) Node) {
977 editNodes(n.init, edit)
980 func (n *LinksymOffsetExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
981 func (n *LinksymOffsetExpr) copy() Node {
983 c.init = copyNodes(c.init)
986 func (n *LinksymOffsetExpr) doChildren(do func(Node) bool) bool {
987 if doNodes(n.init, do) {
992 func (n *LinksymOffsetExpr) editChildren(edit func(Node) Node) {
993 editNodes(n.init, edit)
995 func (n *LinksymOffsetExpr) editChildrenWithHidden(edit func(Node) Node) {
996 editNodes(n.init, edit)
999 func (n *LogicalExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
1000 func (n *LogicalExpr) copy() Node {
1002 c.init = copyNodes(c.init)
1005 func (n *LogicalExpr) doChildren(do func(Node) bool) bool {
1006 if doNodes(n.init, do) {
1009 if n.X != nil && do(n.X) {
1012 if n.Y != nil && do(n.Y) {
1017 func (n *LogicalExpr) editChildren(edit func(Node) Node) {
1018 editNodes(n.init, edit)
1020 n.X = edit(n.X).(Node)
1023 n.Y = edit(n.Y).(Node)
1026 func (n *LogicalExpr) editChildrenWithHidden(edit func(Node) Node) {
1027 editNodes(n.init, edit)
1029 n.X = edit(n.X).(Node)
1032 n.Y = edit(n.Y).(Node)
1036 func (n *MakeExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
1037 func (n *MakeExpr) copy() Node {
1039 c.init = copyNodes(c.init)
1042 func (n *MakeExpr) doChildren(do func(Node) bool) bool {
1043 if doNodes(n.init, do) {
1046 if n.Len != nil && do(n.Len) {
1049 if n.Cap != nil && do(n.Cap) {
1054 func (n *MakeExpr) editChildren(edit func(Node) Node) {
1055 editNodes(n.init, edit)
1057 n.Len = edit(n.Len).(Node)
1060 n.Cap = edit(n.Cap).(Node)
1063 func (n *MakeExpr) editChildrenWithHidden(edit func(Node) Node) {
1064 editNodes(n.init, edit)
1066 n.RType = edit(n.RType).(Node)
1069 n.Len = edit(n.Len).(Node)
1072 n.Cap = edit(n.Cap).(Node)
1076 func (n *Name) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
1078 func (n *NilExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
1079 func (n *NilExpr) copy() Node {
1081 c.init = copyNodes(c.init)
1084 func (n *NilExpr) doChildren(do func(Node) bool) bool {
1085 if doNodes(n.init, do) {
1090 func (n *NilExpr) editChildren(edit func(Node) Node) {
1091 editNodes(n.init, edit)
1093 func (n *NilExpr) editChildrenWithHidden(edit func(Node) Node) {
1094 editNodes(n.init, edit)
1097 func (n *ParenExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
1098 func (n *ParenExpr) copy() Node {
1100 c.init = copyNodes(c.init)
1103 func (n *ParenExpr) doChildren(do func(Node) bool) bool {
1104 if doNodes(n.init, do) {
1107 if n.X != nil && do(n.X) {
1112 func (n *ParenExpr) editChildren(edit func(Node) Node) {
1113 editNodes(n.init, edit)
1115 n.X = edit(n.X).(Node)
1118 func (n *ParenExpr) editChildrenWithHidden(edit func(Node) Node) {
1119 editNodes(n.init, edit)
1121 n.X = edit(n.X).(Node)
1125 func (n *RangeStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
1126 func (n *RangeStmt) copy() Node {
1128 c.init = copyNodes(c.init)
1129 c.Body = copyNodes(c.Body)
1132 func (n *RangeStmt) doChildren(do func(Node) bool) bool {
1133 if doNodes(n.init, do) {
1136 if n.X != nil && do(n.X) {
1139 if n.Key != nil && do(n.Key) {
1142 if n.Value != nil && do(n.Value) {
1145 if doNodes(n.Body, do) {
1148 if n.Prealloc != nil && do(n.Prealloc) {
1153 func (n *RangeStmt) editChildren(edit func(Node) Node) {
1154 editNodes(n.init, edit)
1156 n.X = edit(n.X).(Node)
1159 n.Key = edit(n.Key).(Node)
1162 n.Value = edit(n.Value).(Node)
1164 editNodes(n.Body, edit)
1165 if n.Prealloc != nil {
1166 n.Prealloc = edit(n.Prealloc).(*Name)
1169 func (n *RangeStmt) editChildrenWithHidden(edit func(Node) Node) {
1170 editNodes(n.init, edit)
1172 n.X = edit(n.X).(Node)
1175 n.RType = edit(n.RType).(Node)
1178 n.Key = edit(n.Key).(Node)
1181 n.Value = edit(n.Value).(Node)
1183 editNodes(n.Body, edit)
1184 if n.Prealloc != nil {
1185 n.Prealloc = edit(n.Prealloc).(*Name)
1187 if n.KeyTypeWord != nil {
1188 n.KeyTypeWord = edit(n.KeyTypeWord).(Node)
1190 if n.KeySrcRType != nil {
1191 n.KeySrcRType = edit(n.KeySrcRType).(Node)
1193 if n.ValueTypeWord != nil {
1194 n.ValueTypeWord = edit(n.ValueTypeWord).(Node)
1196 if n.ValueSrcRType != nil {
1197 n.ValueSrcRType = edit(n.ValueSrcRType).(Node)
1201 func (n *ResultExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
1202 func (n *ResultExpr) copy() Node {
1204 c.init = copyNodes(c.init)
1207 func (n *ResultExpr) doChildren(do func(Node) bool) bool {
1208 if doNodes(n.init, do) {
1213 func (n *ResultExpr) editChildren(edit func(Node) Node) {
1214 editNodes(n.init, edit)
1216 func (n *ResultExpr) editChildrenWithHidden(edit func(Node) Node) {
1217 editNodes(n.init, edit)
1220 func (n *ReturnStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
1221 func (n *ReturnStmt) copy() Node {
1223 c.init = copyNodes(c.init)
1224 c.Results = copyNodes(c.Results)
1227 func (n *ReturnStmt) doChildren(do func(Node) bool) bool {
1228 if doNodes(n.init, do) {
1231 if doNodes(n.Results, do) {
1236 func (n *ReturnStmt) editChildren(edit func(Node) Node) {
1237 editNodes(n.init, edit)
1238 editNodes(n.Results, edit)
1240 func (n *ReturnStmt) editChildrenWithHidden(edit func(Node) Node) {
1241 editNodes(n.init, edit)
1242 editNodes(n.Results, edit)
1245 func (n *SelectStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
1246 func (n *SelectStmt) copy() Node {
1248 c.init = copyNodes(c.init)
1249 c.Cases = copyCommClauses(c.Cases)
1250 c.Compiled = copyNodes(c.Compiled)
1253 func (n *SelectStmt) doChildren(do func(Node) bool) bool {
1254 if doNodes(n.init, do) {
1257 if doCommClauses(n.Cases, do) {
1260 if doNodes(n.Compiled, do) {
1265 func (n *SelectStmt) editChildren(edit func(Node) Node) {
1266 editNodes(n.init, edit)
1267 editCommClauses(n.Cases, edit)
1268 editNodes(n.Compiled, edit)
1270 func (n *SelectStmt) editChildrenWithHidden(edit func(Node) Node) {
1271 editNodes(n.init, edit)
1272 editCommClauses(n.Cases, edit)
1273 editNodes(n.Compiled, edit)
1276 func (n *SelectorExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
1277 func (n *SelectorExpr) copy() Node {
1279 c.init = copyNodes(c.init)
1282 func (n *SelectorExpr) doChildren(do func(Node) bool) bool {
1283 if doNodes(n.init, do) {
1286 if n.X != nil && do(n.X) {
1289 if n.Prealloc != nil && do(n.Prealloc) {
1294 func (n *SelectorExpr) editChildren(edit func(Node) Node) {
1295 editNodes(n.init, edit)
1297 n.X = edit(n.X).(Node)
1299 if n.Prealloc != nil {
1300 n.Prealloc = edit(n.Prealloc).(*Name)
1303 func (n *SelectorExpr) editChildrenWithHidden(edit func(Node) Node) {
1304 editNodes(n.init, edit)
1306 n.X = edit(n.X).(Node)
1308 if n.Prealloc != nil {
1309 n.Prealloc = edit(n.Prealloc).(*Name)
1313 func (n *SendStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
1314 func (n *SendStmt) copy() Node {
1316 c.init = copyNodes(c.init)
1319 func (n *SendStmt) doChildren(do func(Node) bool) bool {
1320 if doNodes(n.init, do) {
1323 if n.Chan != nil && do(n.Chan) {
1326 if n.Value != nil && do(n.Value) {
1331 func (n *SendStmt) editChildren(edit func(Node) Node) {
1332 editNodes(n.init, edit)
1334 n.Chan = edit(n.Chan).(Node)
1337 n.Value = edit(n.Value).(Node)
1340 func (n *SendStmt) editChildrenWithHidden(edit func(Node) Node) {
1341 editNodes(n.init, edit)
1343 n.Chan = edit(n.Chan).(Node)
1346 n.Value = edit(n.Value).(Node)
1350 func (n *SliceExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
1351 func (n *SliceExpr) copy() Node {
1353 c.init = copyNodes(c.init)
1356 func (n *SliceExpr) doChildren(do func(Node) bool) bool {
1357 if doNodes(n.init, do) {
1360 if n.X != nil && do(n.X) {
1363 if n.Low != nil && do(n.Low) {
1366 if n.High != nil && do(n.High) {
1369 if n.Max != nil && do(n.Max) {
1374 func (n *SliceExpr) editChildren(edit func(Node) Node) {
1375 editNodes(n.init, edit)
1377 n.X = edit(n.X).(Node)
1380 n.Low = edit(n.Low).(Node)
1383 n.High = edit(n.High).(Node)
1386 n.Max = edit(n.Max).(Node)
1389 func (n *SliceExpr) editChildrenWithHidden(edit func(Node) Node) {
1390 editNodes(n.init, edit)
1392 n.X = edit(n.X).(Node)
1395 n.Low = edit(n.Low).(Node)
1398 n.High = edit(n.High).(Node)
1401 n.Max = edit(n.Max).(Node)
1405 func (n *SliceHeaderExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
1406 func (n *SliceHeaderExpr) copy() Node {
1408 c.init = copyNodes(c.init)
1411 func (n *SliceHeaderExpr) doChildren(do func(Node) bool) bool {
1412 if doNodes(n.init, do) {
1415 if n.Ptr != nil && do(n.Ptr) {
1418 if n.Len != nil && do(n.Len) {
1421 if n.Cap != nil && do(n.Cap) {
1426 func (n *SliceHeaderExpr) editChildren(edit func(Node) Node) {
1427 editNodes(n.init, edit)
1429 n.Ptr = edit(n.Ptr).(Node)
1432 n.Len = edit(n.Len).(Node)
1435 n.Cap = edit(n.Cap).(Node)
1438 func (n *SliceHeaderExpr) editChildrenWithHidden(edit func(Node) Node) {
1439 editNodes(n.init, edit)
1441 n.Ptr = edit(n.Ptr).(Node)
1444 n.Len = edit(n.Len).(Node)
1447 n.Cap = edit(n.Cap).(Node)
1451 func (n *StarExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
1452 func (n *StarExpr) copy() Node {
1454 c.init = copyNodes(c.init)
1457 func (n *StarExpr) doChildren(do func(Node) bool) bool {
1458 if doNodes(n.init, do) {
1461 if n.X != nil && do(n.X) {
1466 func (n *StarExpr) editChildren(edit func(Node) Node) {
1467 editNodes(n.init, edit)
1469 n.X = edit(n.X).(Node)
1472 func (n *StarExpr) editChildrenWithHidden(edit func(Node) Node) {
1473 editNodes(n.init, edit)
1475 n.X = edit(n.X).(Node)
1479 func (n *StringHeaderExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
1480 func (n *StringHeaderExpr) copy() Node {
1482 c.init = copyNodes(c.init)
1485 func (n *StringHeaderExpr) doChildren(do func(Node) bool) bool {
1486 if doNodes(n.init, do) {
1489 if n.Ptr != nil && do(n.Ptr) {
1492 if n.Len != nil && do(n.Len) {
1497 func (n *StringHeaderExpr) editChildren(edit func(Node) Node) {
1498 editNodes(n.init, edit)
1500 n.Ptr = edit(n.Ptr).(Node)
1503 n.Len = edit(n.Len).(Node)
1506 func (n *StringHeaderExpr) editChildrenWithHidden(edit func(Node) Node) {
1507 editNodes(n.init, edit)
1509 n.Ptr = edit(n.Ptr).(Node)
1512 n.Len = edit(n.Len).(Node)
1516 func (n *StructKeyExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
1517 func (n *StructKeyExpr) copy() Node {
1519 c.init = copyNodes(c.init)
1522 func (n *StructKeyExpr) doChildren(do func(Node) bool) bool {
1523 if doNodes(n.init, do) {
1526 if n.Value != nil && do(n.Value) {
1531 func (n *StructKeyExpr) editChildren(edit func(Node) Node) {
1532 editNodes(n.init, edit)
1534 n.Value = edit(n.Value).(Node)
1537 func (n *StructKeyExpr) editChildrenWithHidden(edit func(Node) Node) {
1538 editNodes(n.init, edit)
1540 n.Value = edit(n.Value).(Node)
1544 func (n *SwitchStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
1545 func (n *SwitchStmt) copy() Node {
1547 c.init = copyNodes(c.init)
1548 c.Cases = copyCaseClauses(c.Cases)
1549 c.Compiled = copyNodes(c.Compiled)
1552 func (n *SwitchStmt) doChildren(do func(Node) bool) bool {
1553 if doNodes(n.init, do) {
1556 if n.Tag != nil && do(n.Tag) {
1559 if doCaseClauses(n.Cases, do) {
1562 if doNodes(n.Compiled, do) {
1567 func (n *SwitchStmt) editChildren(edit func(Node) Node) {
1568 editNodes(n.init, edit)
1570 n.Tag = edit(n.Tag).(Node)
1572 editCaseClauses(n.Cases, edit)
1573 editNodes(n.Compiled, edit)
1575 func (n *SwitchStmt) editChildrenWithHidden(edit func(Node) Node) {
1576 editNodes(n.init, edit)
1578 n.Tag = edit(n.Tag).(Node)
1580 editCaseClauses(n.Cases, edit)
1581 editNodes(n.Compiled, edit)
1584 func (n *TailCallStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
1585 func (n *TailCallStmt) copy() Node {
1587 c.init = copyNodes(c.init)
1590 func (n *TailCallStmt) doChildren(do func(Node) bool) bool {
1591 if doNodes(n.init, do) {
1594 if n.Call != nil && do(n.Call) {
1599 func (n *TailCallStmt) editChildren(edit func(Node) Node) {
1600 editNodes(n.init, edit)
1602 n.Call = edit(n.Call).(*CallExpr)
1605 func (n *TailCallStmt) editChildrenWithHidden(edit func(Node) Node) {
1606 editNodes(n.init, edit)
1608 n.Call = edit(n.Call).(*CallExpr)
1612 func (n *TypeAssertExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
1613 func (n *TypeAssertExpr) copy() Node {
1615 c.init = copyNodes(c.init)
1618 func (n *TypeAssertExpr) doChildren(do func(Node) bool) bool {
1619 if doNodes(n.init, do) {
1622 if n.X != nil && do(n.X) {
1627 func (n *TypeAssertExpr) editChildren(edit func(Node) Node) {
1628 editNodes(n.init, edit)
1630 n.X = edit(n.X).(Node)
1633 func (n *TypeAssertExpr) editChildrenWithHidden(edit func(Node) Node) {
1634 editNodes(n.init, edit)
1636 n.X = edit(n.X).(Node)
1639 n.ITab = edit(n.ITab).(Node)
1643 func (n *TypeSwitchGuard) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
1644 func (n *TypeSwitchGuard) copy() Node {
1648 func (n *TypeSwitchGuard) doChildren(do func(Node) bool) bool {
1649 if n.Tag != nil && do(n.Tag) {
1652 if n.X != nil && do(n.X) {
1657 func (n *TypeSwitchGuard) editChildren(edit func(Node) Node) {
1659 n.Tag = edit(n.Tag).(*Ident)
1662 n.X = edit(n.X).(Node)
1665 func (n *TypeSwitchGuard) editChildrenWithHidden(edit func(Node) Node) {
1667 n.Tag = edit(n.Tag).(*Ident)
1670 n.X = edit(n.X).(Node)
1674 func (n *UnaryExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
1675 func (n *UnaryExpr) copy() Node {
1677 c.init = copyNodes(c.init)
1680 func (n *UnaryExpr) doChildren(do func(Node) bool) bool {
1681 if doNodes(n.init, do) {
1684 if n.X != nil && do(n.X) {
1689 func (n *UnaryExpr) editChildren(edit func(Node) Node) {
1690 editNodes(n.init, edit)
1692 n.X = edit(n.X).(Node)
1695 func (n *UnaryExpr) editChildrenWithHidden(edit func(Node) Node) {
1696 editNodes(n.init, edit)
1698 n.X = edit(n.X).(Node)
1702 func (n *typeNode) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
1703 func (n *typeNode) copy() Node {
1707 func (n *typeNode) doChildren(do func(Node) bool) bool {
1710 func (n *typeNode) editChildren(edit func(Node) Node) {
1712 func (n *typeNode) editChildrenWithHidden(edit func(Node) Node) {
1715 func copyCaseClauses(list []*CaseClause) []*CaseClause {
1719 c := make([]*CaseClause, len(list))
1723 func doCaseClauses(list []*CaseClause, do func(Node) bool) bool {
1724 for _, x := range list {
1725 if x != nil && do(x) {
1731 func editCaseClauses(list []*CaseClause, edit func(Node) Node) {
1732 for i, x := range list {
1734 list[i] = edit(x).(*CaseClause)
1739 func copyCommClauses(list []*CommClause) []*CommClause {
1743 c := make([]*CommClause, len(list))
1747 func doCommClauses(list []*CommClause, do func(Node) bool) bool {
1748 for _, x := range list {
1749 if x != nil && do(x) {
1755 func editCommClauses(list []*CommClause, edit func(Node) Node) {
1756 for i, x := range list {
1758 list[i] = edit(x).(*CommClause)
1763 func copyNames(list []*Name) []*Name {
1767 c := make([]*Name, len(list))
1771 func doNames(list []*Name, do func(Node) bool) bool {
1772 for _, x := range list {
1773 if x != nil && do(x) {
1779 func editNames(list []*Name, edit func(Node) Node) {
1780 for i, x := range list {
1782 list[i] = edit(x).(*Name)
1787 func copyNodes(list []Node) []Node {
1791 c := make([]Node, len(list))
1795 func doNodes(list []Node, do func(Node) bool) bool {
1796 for _, x := range list {
1797 if x != nil && do(x) {
1803 func editNodes(list []Node, edit func(Node) Node) {
1804 for i, x := range list {
1806 list[i] = edit(x).(Node)