Source file src/cmd/compile/internal/ir/node_gen.go

     1  // Code generated by mknode.go. DO NOT EDIT.
     2  
     3  package ir
     4  
     5  import "fmt"
     6  
     7  func (n *AddStringExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
     8  func (n *AddStringExpr) copy() Node {
     9  	c := *n
    10  	c.init = copyNodes(c.init)
    11  	c.List = copyNodes(c.List)
    12  	return &c
    13  }
    14  func (n *AddStringExpr) doChildren(do func(Node) bool) bool {
    15  	if doNodes(n.init, do) {
    16  		return true
    17  	}
    18  	if doNodes(n.List, do) {
    19  		return true
    20  	}
    21  	if n.Prealloc != nil && do(n.Prealloc) {
    22  		return true
    23  	}
    24  	return false
    25  }
    26  func (n *AddStringExpr) doChildrenWithHidden(do func(Node) bool) bool {
    27  	return n.doChildren(do)
    28  }
    29  func (n *AddStringExpr) editChildren(edit func(Node) Node) {
    30  	editNodes(n.init, edit)
    31  	editNodes(n.List, edit)
    32  	if n.Prealloc != nil {
    33  		n.Prealloc = edit(n.Prealloc).(*Name)
    34  	}
    35  }
    36  func (n *AddStringExpr) editChildrenWithHidden(edit func(Node) Node) {
    37  	n.editChildren(edit)
    38  }
    39  
    40  func (n *AddrExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
    41  func (n *AddrExpr) copy() Node {
    42  	c := *n
    43  	c.init = copyNodes(c.init)
    44  	return &c
    45  }
    46  func (n *AddrExpr) doChildren(do func(Node) bool) bool {
    47  	if doNodes(n.init, do) {
    48  		return true
    49  	}
    50  	if n.X != nil && do(n.X) {
    51  		return true
    52  	}
    53  	if n.Prealloc != nil && do(n.Prealloc) {
    54  		return true
    55  	}
    56  	return false
    57  }
    58  func (n *AddrExpr) doChildrenWithHidden(do func(Node) bool) bool {
    59  	return n.doChildren(do)
    60  }
    61  func (n *AddrExpr) editChildren(edit func(Node) Node) {
    62  	editNodes(n.init, edit)
    63  	if n.X != nil {
    64  		n.X = edit(n.X).(Node)
    65  	}
    66  	if n.Prealloc != nil {
    67  		n.Prealloc = edit(n.Prealloc).(*Name)
    68  	}
    69  }
    70  func (n *AddrExpr) editChildrenWithHidden(edit func(Node) Node) {
    71  	n.editChildren(edit)
    72  }
    73  
    74  func (n *AssignListStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
    75  func (n *AssignListStmt) copy() Node {
    76  	c := *n
    77  	c.init = copyNodes(c.init)
    78  	c.Lhs = copyNodes(c.Lhs)
    79  	c.Rhs = copyNodes(c.Rhs)
    80  	return &c
    81  }
    82  func (n *AssignListStmt) doChildren(do func(Node) bool) bool {
    83  	if doNodes(n.init, do) {
    84  		return true
    85  	}
    86  	if doNodes(n.Lhs, do) {
    87  		return true
    88  	}
    89  	if doNodes(n.Rhs, do) {
    90  		return true
    91  	}
    92  	return false
    93  }
    94  func (n *AssignListStmt) doChildrenWithHidden(do func(Node) bool) bool {
    95  	return n.doChildren(do)
    96  }
    97  func (n *AssignListStmt) editChildren(edit func(Node) Node) {
    98  	editNodes(n.init, edit)
    99  	editNodes(n.Lhs, edit)
   100  	editNodes(n.Rhs, edit)
   101  }
   102  func (n *AssignListStmt) editChildrenWithHidden(edit func(Node) Node) {
   103  	n.editChildren(edit)
   104  }
   105  
   106  func (n *AssignOpStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
   107  func (n *AssignOpStmt) copy() Node {
   108  	c := *n
   109  	c.init = copyNodes(c.init)
   110  	return &c
   111  }
   112  func (n *AssignOpStmt) doChildren(do func(Node) bool) bool {
   113  	if doNodes(n.init, do) {
   114  		return true
   115  	}
   116  	if n.X != nil && do(n.X) {
   117  		return true
   118  	}
   119  	if n.Y != nil && do(n.Y) {
   120  		return true
   121  	}
   122  	return false
   123  }
   124  func (n *AssignOpStmt) doChildrenWithHidden(do func(Node) bool) bool {
   125  	return n.doChildren(do)
   126  }
   127  func (n *AssignOpStmt) editChildren(edit func(Node) Node) {
   128  	editNodes(n.init, edit)
   129  	if n.X != nil {
   130  		n.X = edit(n.X).(Node)
   131  	}
   132  	if n.Y != nil {
   133  		n.Y = edit(n.Y).(Node)
   134  	}
   135  }
   136  func (n *AssignOpStmt) editChildrenWithHidden(edit func(Node) Node) {
   137  	n.editChildren(edit)
   138  }
   139  
   140  func (n *AssignStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
   141  func (n *AssignStmt) copy() Node {
   142  	c := *n
   143  	c.init = copyNodes(c.init)
   144  	return &c
   145  }
   146  func (n *AssignStmt) doChildren(do func(Node) bool) bool {
   147  	if doNodes(n.init, do) {
   148  		return true
   149  	}
   150  	if n.X != nil && do(n.X) {
   151  		return true
   152  	}
   153  	if n.Y != nil && do(n.Y) {
   154  		return true
   155  	}
   156  	return false
   157  }
   158  func (n *AssignStmt) doChildrenWithHidden(do func(Node) bool) bool {
   159  	return n.doChildren(do)
   160  }
   161  func (n *AssignStmt) editChildren(edit func(Node) Node) {
   162  	editNodes(n.init, edit)
   163  	if n.X != nil {
   164  		n.X = edit(n.X).(Node)
   165  	}
   166  	if n.Y != nil {
   167  		n.Y = edit(n.Y).(Node)
   168  	}
   169  }
   170  func (n *AssignStmt) editChildrenWithHidden(edit func(Node) Node) {
   171  	n.editChildren(edit)
   172  }
   173  
   174  func (n *BasicLit) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
   175  func (n *BasicLit) copy() Node {
   176  	c := *n
   177  	c.init = copyNodes(c.init)
   178  	return &c
   179  }
   180  func (n *BasicLit) doChildren(do func(Node) bool) bool {
   181  	if doNodes(n.init, do) {
   182  		return true
   183  	}
   184  	return false
   185  }
   186  func (n *BasicLit) doChildrenWithHidden(do func(Node) bool) bool {
   187  	return n.doChildren(do)
   188  }
   189  func (n *BasicLit) editChildren(edit func(Node) Node) {
   190  	editNodes(n.init, edit)
   191  }
   192  func (n *BasicLit) editChildrenWithHidden(edit func(Node) Node) {
   193  	n.editChildren(edit)
   194  }
   195  
   196  func (n *BinaryExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
   197  func (n *BinaryExpr) copy() Node {
   198  	c := *n
   199  	c.init = copyNodes(c.init)
   200  	return &c
   201  }
   202  func (n *BinaryExpr) doChildren(do func(Node) bool) bool {
   203  	if doNodes(n.init, do) {
   204  		return true
   205  	}
   206  	if n.X != nil && do(n.X) {
   207  		return true
   208  	}
   209  	if n.Y != nil && do(n.Y) {
   210  		return true
   211  	}
   212  	return false
   213  }
   214  func (n *BinaryExpr) doChildrenWithHidden(do func(Node) bool) bool {
   215  	if doNodes(n.init, do) {
   216  		return true
   217  	}
   218  	if n.X != nil && do(n.X) {
   219  		return true
   220  	}
   221  	if n.Y != nil && do(n.Y) {
   222  		return true
   223  	}
   224  	if n.RType != nil && do(n.RType) {
   225  		return true
   226  	}
   227  	return false
   228  }
   229  func (n *BinaryExpr) editChildren(edit func(Node) Node) {
   230  	editNodes(n.init, edit)
   231  	if n.X != nil {
   232  		n.X = edit(n.X).(Node)
   233  	}
   234  	if n.Y != nil {
   235  		n.Y = edit(n.Y).(Node)
   236  	}
   237  }
   238  func (n *BinaryExpr) editChildrenWithHidden(edit func(Node) Node) {
   239  	editNodes(n.init, edit)
   240  	if n.X != nil {
   241  		n.X = edit(n.X).(Node)
   242  	}
   243  	if n.Y != nil {
   244  		n.Y = edit(n.Y).(Node)
   245  	}
   246  	if n.RType != nil {
   247  		n.RType = edit(n.RType).(Node)
   248  	}
   249  }
   250  
   251  func (n *BlockStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
   252  func (n *BlockStmt) copy() Node {
   253  	c := *n
   254  	c.init = copyNodes(c.init)
   255  	c.List = copyNodes(c.List)
   256  	return &c
   257  }
   258  func (n *BlockStmt) doChildren(do func(Node) bool) bool {
   259  	if doNodes(n.init, do) {
   260  		return true
   261  	}
   262  	if doNodes(n.List, do) {
   263  		return true
   264  	}
   265  	return false
   266  }
   267  func (n *BlockStmt) doChildrenWithHidden(do func(Node) bool) bool {
   268  	return n.doChildren(do)
   269  }
   270  func (n *BlockStmt) editChildren(edit func(Node) Node) {
   271  	editNodes(n.init, edit)
   272  	editNodes(n.List, edit)
   273  }
   274  func (n *BlockStmt) editChildrenWithHidden(edit func(Node) Node) {
   275  	n.editChildren(edit)
   276  }
   277  
   278  func (n *BranchStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
   279  func (n *BranchStmt) copy() Node {
   280  	c := *n
   281  	c.init = copyNodes(c.init)
   282  	return &c
   283  }
   284  func (n *BranchStmt) doChildren(do func(Node) bool) bool {
   285  	if doNodes(n.init, do) {
   286  		return true
   287  	}
   288  	return false
   289  }
   290  func (n *BranchStmt) doChildrenWithHidden(do func(Node) bool) bool {
   291  	return n.doChildren(do)
   292  }
   293  func (n *BranchStmt) editChildren(edit func(Node) Node) {
   294  	editNodes(n.init, edit)
   295  }
   296  func (n *BranchStmt) editChildrenWithHidden(edit func(Node) Node) {
   297  	n.editChildren(edit)
   298  }
   299  
   300  func (n *CallExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
   301  func (n *CallExpr) copy() Node {
   302  	c := *n
   303  	c.init = copyNodes(c.init)
   304  	c.Args = copyNodes(c.Args)
   305  	c.KeepAlive = copyNames(c.KeepAlive)
   306  	return &c
   307  }
   308  func (n *CallExpr) doChildren(do func(Node) bool) bool {
   309  	if doNodes(n.init, do) {
   310  		return true
   311  	}
   312  	if n.Fun != nil && do(n.Fun) {
   313  		return true
   314  	}
   315  	if doNodes(n.Args, do) {
   316  		return true
   317  	}
   318  	if n.DeferAt != nil && do(n.DeferAt) {
   319  		return true
   320  	}
   321  	if doNames(n.KeepAlive, do) {
   322  		return true
   323  	}
   324  	return false
   325  }
   326  func (n *CallExpr) doChildrenWithHidden(do func(Node) bool) bool {
   327  	if doNodes(n.init, do) {
   328  		return true
   329  	}
   330  	if n.Fun != nil && do(n.Fun) {
   331  		return true
   332  	}
   333  	if doNodes(n.Args, do) {
   334  		return true
   335  	}
   336  	if n.DeferAt != nil && do(n.DeferAt) {
   337  		return true
   338  	}
   339  	if n.RType != nil && do(n.RType) {
   340  		return true
   341  	}
   342  	if doNames(n.KeepAlive, do) {
   343  		return true
   344  	}
   345  	return false
   346  }
   347  func (n *CallExpr) editChildren(edit func(Node) Node) {
   348  	editNodes(n.init, edit)
   349  	if n.Fun != nil {
   350  		n.Fun = edit(n.Fun).(Node)
   351  	}
   352  	editNodes(n.Args, edit)
   353  	if n.DeferAt != nil {
   354  		n.DeferAt = edit(n.DeferAt).(Node)
   355  	}
   356  	editNames(n.KeepAlive, edit)
   357  }
   358  func (n *CallExpr) editChildrenWithHidden(edit func(Node) Node) {
   359  	editNodes(n.init, edit)
   360  	if n.Fun != nil {
   361  		n.Fun = edit(n.Fun).(Node)
   362  	}
   363  	editNodes(n.Args, edit)
   364  	if n.DeferAt != nil {
   365  		n.DeferAt = edit(n.DeferAt).(Node)
   366  	}
   367  	if n.RType != nil {
   368  		n.RType = edit(n.RType).(Node)
   369  	}
   370  	editNames(n.KeepAlive, edit)
   371  }
   372  
   373  func (n *CaseClause) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
   374  func (n *CaseClause) copy() Node {
   375  	c := *n
   376  	c.init = copyNodes(c.init)
   377  	c.List = copyNodes(c.List)
   378  	c.RTypes = copyNodes(c.RTypes)
   379  	c.Body = copyNodes(c.Body)
   380  	return &c
   381  }
   382  func (n *CaseClause) doChildren(do func(Node) bool) bool {
   383  	if doNodes(n.init, do) {
   384  		return true
   385  	}
   386  	if n.Var != nil && do(n.Var) {
   387  		return true
   388  	}
   389  	if doNodes(n.List, do) {
   390  		return true
   391  	}
   392  	if doNodes(n.RTypes, do) {
   393  		return true
   394  	}
   395  	if doNodes(n.Body, do) {
   396  		return true
   397  	}
   398  	return false
   399  }
   400  func (n *CaseClause) doChildrenWithHidden(do func(Node) bool) bool {
   401  	return n.doChildren(do)
   402  }
   403  func (n *CaseClause) editChildren(edit func(Node) Node) {
   404  	editNodes(n.init, edit)
   405  	if n.Var != nil {
   406  		n.Var = edit(n.Var).(*Name)
   407  	}
   408  	editNodes(n.List, edit)
   409  	editNodes(n.RTypes, edit)
   410  	editNodes(n.Body, edit)
   411  }
   412  func (n *CaseClause) editChildrenWithHidden(edit func(Node) Node) {
   413  	n.editChildren(edit)
   414  }
   415  
   416  func (n *ClosureExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
   417  func (n *ClosureExpr) copy() Node {
   418  	c := *n
   419  	c.init = copyNodes(c.init)
   420  	return &c
   421  }
   422  func (n *ClosureExpr) doChildren(do func(Node) bool) bool {
   423  	if doNodes(n.init, do) {
   424  		return true
   425  	}
   426  	if n.Prealloc != nil && do(n.Prealloc) {
   427  		return true
   428  	}
   429  	return false
   430  }
   431  func (n *ClosureExpr) doChildrenWithHidden(do func(Node) bool) bool {
   432  	return n.doChildren(do)
   433  }
   434  func (n *ClosureExpr) editChildren(edit func(Node) Node) {
   435  	editNodes(n.init, edit)
   436  	if n.Prealloc != nil {
   437  		n.Prealloc = edit(n.Prealloc).(*Name)
   438  	}
   439  }
   440  func (n *ClosureExpr) editChildrenWithHidden(edit func(Node) Node) {
   441  	n.editChildren(edit)
   442  }
   443  
   444  func (n *CommClause) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
   445  func (n *CommClause) copy() Node {
   446  	c := *n
   447  	c.init = copyNodes(c.init)
   448  	c.Body = copyNodes(c.Body)
   449  	return &c
   450  }
   451  func (n *CommClause) doChildren(do func(Node) bool) bool {
   452  	if doNodes(n.init, do) {
   453  		return true
   454  	}
   455  	if n.Comm != nil && do(n.Comm) {
   456  		return true
   457  	}
   458  	if doNodes(n.Body, do) {
   459  		return true
   460  	}
   461  	return false
   462  }
   463  func (n *CommClause) doChildrenWithHidden(do func(Node) bool) bool {
   464  	return n.doChildren(do)
   465  }
   466  func (n *CommClause) editChildren(edit func(Node) Node) {
   467  	editNodes(n.init, edit)
   468  	if n.Comm != nil {
   469  		n.Comm = edit(n.Comm).(Node)
   470  	}
   471  	editNodes(n.Body, edit)
   472  }
   473  func (n *CommClause) editChildrenWithHidden(edit func(Node) Node) {
   474  	n.editChildren(edit)
   475  }
   476  
   477  func (n *CompLitExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
   478  func (n *CompLitExpr) copy() Node {
   479  	c := *n
   480  	c.init = copyNodes(c.init)
   481  	c.List = copyNodes(c.List)
   482  	return &c
   483  }
   484  func (n *CompLitExpr) doChildren(do func(Node) bool) bool {
   485  	if doNodes(n.init, do) {
   486  		return true
   487  	}
   488  	if doNodes(n.List, do) {
   489  		return true
   490  	}
   491  	if n.Prealloc != nil && do(n.Prealloc) {
   492  		return true
   493  	}
   494  	return false
   495  }
   496  func (n *CompLitExpr) doChildrenWithHidden(do func(Node) bool) bool {
   497  	if doNodes(n.init, do) {
   498  		return true
   499  	}
   500  	if doNodes(n.List, do) {
   501  		return true
   502  	}
   503  	if n.RType != nil && do(n.RType) {
   504  		return true
   505  	}
   506  	if n.Prealloc != nil && do(n.Prealloc) {
   507  		return true
   508  	}
   509  	return false
   510  }
   511  func (n *CompLitExpr) editChildren(edit func(Node) Node) {
   512  	editNodes(n.init, edit)
   513  	editNodes(n.List, edit)
   514  	if n.Prealloc != nil {
   515  		n.Prealloc = edit(n.Prealloc).(*Name)
   516  	}
   517  }
   518  func (n *CompLitExpr) editChildrenWithHidden(edit func(Node) Node) {
   519  	editNodes(n.init, edit)
   520  	editNodes(n.List, edit)
   521  	if n.RType != nil {
   522  		n.RType = edit(n.RType).(Node)
   523  	}
   524  	if n.Prealloc != nil {
   525  		n.Prealloc = edit(n.Prealloc).(*Name)
   526  	}
   527  }
   528  
   529  func (n *ConvExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
   530  func (n *ConvExpr) copy() Node {
   531  	c := *n
   532  	c.init = copyNodes(c.init)
   533  	return &c
   534  }
   535  func (n *ConvExpr) doChildren(do func(Node) bool) bool {
   536  	if doNodes(n.init, do) {
   537  		return true
   538  	}
   539  	if n.X != nil && do(n.X) {
   540  		return true
   541  	}
   542  	return false
   543  }
   544  func (n *ConvExpr) doChildrenWithHidden(do func(Node) bool) bool {
   545  	if doNodes(n.init, do) {
   546  		return true
   547  	}
   548  	if n.X != nil && do(n.X) {
   549  		return true
   550  	}
   551  	if n.TypeWord != nil && do(n.TypeWord) {
   552  		return true
   553  	}
   554  	if n.SrcRType != nil && do(n.SrcRType) {
   555  		return true
   556  	}
   557  	if n.ElemRType != nil && do(n.ElemRType) {
   558  		return true
   559  	}
   560  	if n.ElemElemRType != nil && do(n.ElemElemRType) {
   561  		return true
   562  	}
   563  	return false
   564  }
   565  func (n *ConvExpr) editChildren(edit func(Node) Node) {
   566  	editNodes(n.init, edit)
   567  	if n.X != nil {
   568  		n.X = edit(n.X).(Node)
   569  	}
   570  }
   571  func (n *ConvExpr) editChildrenWithHidden(edit func(Node) Node) {
   572  	editNodes(n.init, edit)
   573  	if n.X != nil {
   574  		n.X = edit(n.X).(Node)
   575  	}
   576  	if n.TypeWord != nil {
   577  		n.TypeWord = edit(n.TypeWord).(Node)
   578  	}
   579  	if n.SrcRType != nil {
   580  		n.SrcRType = edit(n.SrcRType).(Node)
   581  	}
   582  	if n.ElemRType != nil {
   583  		n.ElemRType = edit(n.ElemRType).(Node)
   584  	}
   585  	if n.ElemElemRType != nil {
   586  		n.ElemElemRType = edit(n.ElemElemRType).(Node)
   587  	}
   588  }
   589  
   590  func (n *Decl) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
   591  func (n *Decl) copy() Node {
   592  	c := *n
   593  	return &c
   594  }
   595  func (n *Decl) doChildren(do func(Node) bool) bool {
   596  	if n.X != nil && do(n.X) {
   597  		return true
   598  	}
   599  	return false
   600  }
   601  func (n *Decl) doChildrenWithHidden(do func(Node) bool) bool {
   602  	return n.doChildren(do)
   603  }
   604  func (n *Decl) editChildren(edit func(Node) Node) {
   605  	if n.X != nil {
   606  		n.X = edit(n.X).(*Name)
   607  	}
   608  }
   609  func (n *Decl) editChildrenWithHidden(edit func(Node) Node) {
   610  	n.editChildren(edit)
   611  }
   612  
   613  func (n *DynamicType) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
   614  func (n *DynamicType) copy() Node {
   615  	c := *n
   616  	c.init = copyNodes(c.init)
   617  	return &c
   618  }
   619  func (n *DynamicType) doChildren(do func(Node) bool) bool {
   620  	if doNodes(n.init, do) {
   621  		return true
   622  	}
   623  	if n.RType != nil && do(n.RType) {
   624  		return true
   625  	}
   626  	if n.ITab != nil && do(n.ITab) {
   627  		return true
   628  	}
   629  	return false
   630  }
   631  func (n *DynamicType) doChildrenWithHidden(do func(Node) bool) bool {
   632  	return n.doChildren(do)
   633  }
   634  func (n *DynamicType) editChildren(edit func(Node) Node) {
   635  	editNodes(n.init, edit)
   636  	if n.RType != nil {
   637  		n.RType = edit(n.RType).(Node)
   638  	}
   639  	if n.ITab != nil {
   640  		n.ITab = edit(n.ITab).(Node)
   641  	}
   642  }
   643  func (n *DynamicType) editChildrenWithHidden(edit func(Node) Node) {
   644  	n.editChildren(edit)
   645  }
   646  
   647  func (n *DynamicTypeAssertExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
   648  func (n *DynamicTypeAssertExpr) copy() Node {
   649  	c := *n
   650  	c.init = copyNodes(c.init)
   651  	return &c
   652  }
   653  func (n *DynamicTypeAssertExpr) doChildren(do func(Node) bool) bool {
   654  	if doNodes(n.init, do) {
   655  		return true
   656  	}
   657  	if n.X != nil && do(n.X) {
   658  		return true
   659  	}
   660  	if n.SrcRType != nil && do(n.SrcRType) {
   661  		return true
   662  	}
   663  	if n.RType != nil && do(n.RType) {
   664  		return true
   665  	}
   666  	if n.ITab != nil && do(n.ITab) {
   667  		return true
   668  	}
   669  	return false
   670  }
   671  func (n *DynamicTypeAssertExpr) doChildrenWithHidden(do func(Node) bool) bool {
   672  	return n.doChildren(do)
   673  }
   674  func (n *DynamicTypeAssertExpr) editChildren(edit func(Node) Node) {
   675  	editNodes(n.init, edit)
   676  	if n.X != nil {
   677  		n.X = edit(n.X).(Node)
   678  	}
   679  	if n.SrcRType != nil {
   680  		n.SrcRType = edit(n.SrcRType).(Node)
   681  	}
   682  	if n.RType != nil {
   683  		n.RType = edit(n.RType).(Node)
   684  	}
   685  	if n.ITab != nil {
   686  		n.ITab = edit(n.ITab).(Node)
   687  	}
   688  }
   689  func (n *DynamicTypeAssertExpr) editChildrenWithHidden(edit func(Node) Node) {
   690  	n.editChildren(edit)
   691  }
   692  
   693  func (n *ForStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
   694  func (n *ForStmt) copy() Node {
   695  	c := *n
   696  	c.init = copyNodes(c.init)
   697  	c.Body = copyNodes(c.Body)
   698  	return &c
   699  }
   700  func (n *ForStmt) doChildren(do func(Node) bool) bool {
   701  	if doNodes(n.init, do) {
   702  		return true
   703  	}
   704  	if n.Cond != nil && do(n.Cond) {
   705  		return true
   706  	}
   707  	if n.Post != nil && do(n.Post) {
   708  		return true
   709  	}
   710  	if doNodes(n.Body, do) {
   711  		return true
   712  	}
   713  	return false
   714  }
   715  func (n *ForStmt) doChildrenWithHidden(do func(Node) bool) bool {
   716  	return n.doChildren(do)
   717  }
   718  func (n *ForStmt) editChildren(edit func(Node) Node) {
   719  	editNodes(n.init, edit)
   720  	if n.Cond != nil {
   721  		n.Cond = edit(n.Cond).(Node)
   722  	}
   723  	if n.Post != nil {
   724  		n.Post = edit(n.Post).(Node)
   725  	}
   726  	editNodes(n.Body, edit)
   727  }
   728  func (n *ForStmt) editChildrenWithHidden(edit func(Node) Node) {
   729  	n.editChildren(edit)
   730  }
   731  
   732  func (n *Func) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
   733  
   734  func (n *GoDeferStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
   735  func (n *GoDeferStmt) copy() Node {
   736  	c := *n
   737  	c.init = copyNodes(c.init)
   738  	return &c
   739  }
   740  func (n *GoDeferStmt) doChildren(do func(Node) bool) bool {
   741  	if doNodes(n.init, do) {
   742  		return true
   743  	}
   744  	if n.Call != nil && do(n.Call) {
   745  		return true
   746  	}
   747  	if n.DeferAt != nil && do(n.DeferAt) {
   748  		return true
   749  	}
   750  	return false
   751  }
   752  func (n *GoDeferStmt) doChildrenWithHidden(do func(Node) bool) bool {
   753  	return n.doChildren(do)
   754  }
   755  func (n *GoDeferStmt) editChildren(edit func(Node) Node) {
   756  	editNodes(n.init, edit)
   757  	if n.Call != nil {
   758  		n.Call = edit(n.Call).(Node)
   759  	}
   760  	if n.DeferAt != nil {
   761  		n.DeferAt = edit(n.DeferAt).(Expr)
   762  	}
   763  }
   764  func (n *GoDeferStmt) editChildrenWithHidden(edit func(Node) Node) {
   765  	n.editChildren(edit)
   766  }
   767  
   768  func (n *Ident) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
   769  func (n *Ident) copy() Node {
   770  	c := *n
   771  	c.init = copyNodes(c.init)
   772  	return &c
   773  }
   774  func (n *Ident) doChildren(do func(Node) bool) bool {
   775  	if doNodes(n.init, do) {
   776  		return true
   777  	}
   778  	return false
   779  }
   780  func (n *Ident) doChildrenWithHidden(do func(Node) bool) bool {
   781  	return n.doChildren(do)
   782  }
   783  func (n *Ident) editChildren(edit func(Node) Node) {
   784  	editNodes(n.init, edit)
   785  }
   786  func (n *Ident) editChildrenWithHidden(edit func(Node) Node) {
   787  	n.editChildren(edit)
   788  }
   789  
   790  func (n *IfStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
   791  func (n *IfStmt) copy() Node {
   792  	c := *n
   793  	c.init = copyNodes(c.init)
   794  	c.Body = copyNodes(c.Body)
   795  	c.Else = copyNodes(c.Else)
   796  	return &c
   797  }
   798  func (n *IfStmt) doChildren(do func(Node) bool) bool {
   799  	if doNodes(n.init, do) {
   800  		return true
   801  	}
   802  	if n.Cond != nil && do(n.Cond) {
   803  		return true
   804  	}
   805  	if doNodes(n.Body, do) {
   806  		return true
   807  	}
   808  	if doNodes(n.Else, do) {
   809  		return true
   810  	}
   811  	return false
   812  }
   813  func (n *IfStmt) doChildrenWithHidden(do func(Node) bool) bool {
   814  	return n.doChildren(do)
   815  }
   816  func (n *IfStmt) editChildren(edit func(Node) Node) {
   817  	editNodes(n.init, edit)
   818  	if n.Cond != nil {
   819  		n.Cond = edit(n.Cond).(Node)
   820  	}
   821  	editNodes(n.Body, edit)
   822  	editNodes(n.Else, edit)
   823  }
   824  func (n *IfStmt) editChildrenWithHidden(edit func(Node) Node) {
   825  	n.editChildren(edit)
   826  }
   827  
   828  func (n *IndexExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
   829  func (n *IndexExpr) copy() Node {
   830  	c := *n
   831  	c.init = copyNodes(c.init)
   832  	return &c
   833  }
   834  func (n *IndexExpr) doChildren(do func(Node) bool) bool {
   835  	if doNodes(n.init, do) {
   836  		return true
   837  	}
   838  	if n.X != nil && do(n.X) {
   839  		return true
   840  	}
   841  	if n.Index != nil && do(n.Index) {
   842  		return true
   843  	}
   844  	return false
   845  }
   846  func (n *IndexExpr) doChildrenWithHidden(do func(Node) bool) bool {
   847  	if doNodes(n.init, do) {
   848  		return true
   849  	}
   850  	if n.X != nil && do(n.X) {
   851  		return true
   852  	}
   853  	if n.Index != nil && do(n.Index) {
   854  		return true
   855  	}
   856  	if n.RType != nil && do(n.RType) {
   857  		return true
   858  	}
   859  	return false
   860  }
   861  func (n *IndexExpr) editChildren(edit func(Node) Node) {
   862  	editNodes(n.init, edit)
   863  	if n.X != nil {
   864  		n.X = edit(n.X).(Node)
   865  	}
   866  	if n.Index != nil {
   867  		n.Index = edit(n.Index).(Node)
   868  	}
   869  }
   870  func (n *IndexExpr) editChildrenWithHidden(edit func(Node) Node) {
   871  	editNodes(n.init, edit)
   872  	if n.X != nil {
   873  		n.X = edit(n.X).(Node)
   874  	}
   875  	if n.Index != nil {
   876  		n.Index = edit(n.Index).(Node)
   877  	}
   878  	if n.RType != nil {
   879  		n.RType = edit(n.RType).(Node)
   880  	}
   881  }
   882  
   883  func (n *InlineMarkStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
   884  func (n *InlineMarkStmt) copy() Node {
   885  	c := *n
   886  	c.init = copyNodes(c.init)
   887  	return &c
   888  }
   889  func (n *InlineMarkStmt) doChildren(do func(Node) bool) bool {
   890  	if doNodes(n.init, do) {
   891  		return true
   892  	}
   893  	return false
   894  }
   895  func (n *InlineMarkStmt) doChildrenWithHidden(do func(Node) bool) bool {
   896  	return n.doChildren(do)
   897  }
   898  func (n *InlineMarkStmt) editChildren(edit func(Node) Node) {
   899  	editNodes(n.init, edit)
   900  }
   901  func (n *InlineMarkStmt) editChildrenWithHidden(edit func(Node) Node) {
   902  	n.editChildren(edit)
   903  }
   904  
   905  func (n *InlinedCallExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
   906  func (n *InlinedCallExpr) copy() Node {
   907  	c := *n
   908  	c.init = copyNodes(c.init)
   909  	c.Body = copyNodes(c.Body)
   910  	c.ReturnVars = copyNodes(c.ReturnVars)
   911  	return &c
   912  }
   913  func (n *InlinedCallExpr) doChildren(do func(Node) bool) bool {
   914  	if doNodes(n.init, do) {
   915  		return true
   916  	}
   917  	if doNodes(n.Body, do) {
   918  		return true
   919  	}
   920  	if doNodes(n.ReturnVars, do) {
   921  		return true
   922  	}
   923  	return false
   924  }
   925  func (n *InlinedCallExpr) doChildrenWithHidden(do func(Node) bool) bool {
   926  	return n.doChildren(do)
   927  }
   928  func (n *InlinedCallExpr) editChildren(edit func(Node) Node) {
   929  	editNodes(n.init, edit)
   930  	editNodes(n.Body, edit)
   931  	editNodes(n.ReturnVars, edit)
   932  }
   933  func (n *InlinedCallExpr) editChildrenWithHidden(edit func(Node) Node) {
   934  	n.editChildren(edit)
   935  }
   936  
   937  func (n *InterfaceSwitchStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
   938  func (n *InterfaceSwitchStmt) copy() Node {
   939  	c := *n
   940  	c.init = copyNodes(c.init)
   941  	return &c
   942  }
   943  func (n *InterfaceSwitchStmt) doChildren(do func(Node) bool) bool {
   944  	if doNodes(n.init, do) {
   945  		return true
   946  	}
   947  	if n.Case != nil && do(n.Case) {
   948  		return true
   949  	}
   950  	if n.Itab != nil && do(n.Itab) {
   951  		return true
   952  	}
   953  	if n.RuntimeType != nil && do(n.RuntimeType) {
   954  		return true
   955  	}
   956  	if n.Hash != nil && do(n.Hash) {
   957  		return true
   958  	}
   959  	return false
   960  }
   961  func (n *InterfaceSwitchStmt) doChildrenWithHidden(do func(Node) bool) bool {
   962  	return n.doChildren(do)
   963  }
   964  func (n *InterfaceSwitchStmt) editChildren(edit func(Node) Node) {
   965  	editNodes(n.init, edit)
   966  	if n.Case != nil {
   967  		n.Case = edit(n.Case).(Node)
   968  	}
   969  	if n.Itab != nil {
   970  		n.Itab = edit(n.Itab).(Node)
   971  	}
   972  	if n.RuntimeType != nil {
   973  		n.RuntimeType = edit(n.RuntimeType).(Node)
   974  	}
   975  	if n.Hash != nil {
   976  		n.Hash = edit(n.Hash).(Node)
   977  	}
   978  }
   979  func (n *InterfaceSwitchStmt) editChildrenWithHidden(edit func(Node) Node) {
   980  	n.editChildren(edit)
   981  }
   982  
   983  func (n *JumpTableStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
   984  func (n *JumpTableStmt) copy() Node {
   985  	c := *n
   986  	c.init = copyNodes(c.init)
   987  	return &c
   988  }
   989  func (n *JumpTableStmt) doChildren(do func(Node) bool) bool {
   990  	if doNodes(n.init, do) {
   991  		return true
   992  	}
   993  	if n.Idx != nil && do(n.Idx) {
   994  		return true
   995  	}
   996  	return false
   997  }
   998  func (n *JumpTableStmt) doChildrenWithHidden(do func(Node) bool) bool {
   999  	return n.doChildren(do)
  1000  }
  1001  func (n *JumpTableStmt) editChildren(edit func(Node) Node) {
  1002  	editNodes(n.init, edit)
  1003  	if n.Idx != nil {
  1004  		n.Idx = edit(n.Idx).(Node)
  1005  	}
  1006  }
  1007  func (n *JumpTableStmt) editChildrenWithHidden(edit func(Node) Node) {
  1008  	n.editChildren(edit)
  1009  }
  1010  
  1011  func (n *KeyExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
  1012  func (n *KeyExpr) copy() Node {
  1013  	c := *n
  1014  	c.init = copyNodes(c.init)
  1015  	return &c
  1016  }
  1017  func (n *KeyExpr) doChildren(do func(Node) bool) bool {
  1018  	if doNodes(n.init, do) {
  1019  		return true
  1020  	}
  1021  	if n.Key != nil && do(n.Key) {
  1022  		return true
  1023  	}
  1024  	if n.Value != nil && do(n.Value) {
  1025  		return true
  1026  	}
  1027  	return false
  1028  }
  1029  func (n *KeyExpr) doChildrenWithHidden(do func(Node) bool) bool {
  1030  	return n.doChildren(do)
  1031  }
  1032  func (n *KeyExpr) editChildren(edit func(Node) Node) {
  1033  	editNodes(n.init, edit)
  1034  	if n.Key != nil {
  1035  		n.Key = edit(n.Key).(Node)
  1036  	}
  1037  	if n.Value != nil {
  1038  		n.Value = edit(n.Value).(Node)
  1039  	}
  1040  }
  1041  func (n *KeyExpr) editChildrenWithHidden(edit func(Node) Node) {
  1042  	n.editChildren(edit)
  1043  }
  1044  
  1045  func (n *LabelStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
  1046  func (n *LabelStmt) copy() Node {
  1047  	c := *n
  1048  	c.init = copyNodes(c.init)
  1049  	return &c
  1050  }
  1051  func (n *LabelStmt) doChildren(do func(Node) bool) bool {
  1052  	if doNodes(n.init, do) {
  1053  		return true
  1054  	}
  1055  	return false
  1056  }
  1057  func (n *LabelStmt) doChildrenWithHidden(do func(Node) bool) bool {
  1058  	return n.doChildren(do)
  1059  }
  1060  func (n *LabelStmt) editChildren(edit func(Node) Node) {
  1061  	editNodes(n.init, edit)
  1062  }
  1063  func (n *LabelStmt) editChildrenWithHidden(edit func(Node) Node) {
  1064  	n.editChildren(edit)
  1065  }
  1066  
  1067  func (n *LinksymOffsetExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
  1068  func (n *LinksymOffsetExpr) copy() Node {
  1069  	c := *n
  1070  	c.init = copyNodes(c.init)
  1071  	return &c
  1072  }
  1073  func (n *LinksymOffsetExpr) doChildren(do func(Node) bool) bool {
  1074  	if doNodes(n.init, do) {
  1075  		return true
  1076  	}
  1077  	return false
  1078  }
  1079  func (n *LinksymOffsetExpr) doChildrenWithHidden(do func(Node) bool) bool {
  1080  	return n.doChildren(do)
  1081  }
  1082  func (n *LinksymOffsetExpr) editChildren(edit func(Node) Node) {
  1083  	editNodes(n.init, edit)
  1084  }
  1085  func (n *LinksymOffsetExpr) editChildrenWithHidden(edit func(Node) Node) {
  1086  	n.editChildren(edit)
  1087  }
  1088  
  1089  func (n *LogicalExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
  1090  func (n *LogicalExpr) copy() Node {
  1091  	c := *n
  1092  	c.init = copyNodes(c.init)
  1093  	return &c
  1094  }
  1095  func (n *LogicalExpr) doChildren(do func(Node) bool) bool {
  1096  	if doNodes(n.init, do) {
  1097  		return true
  1098  	}
  1099  	if n.X != nil && do(n.X) {
  1100  		return true
  1101  	}
  1102  	if n.Y != nil && do(n.Y) {
  1103  		return true
  1104  	}
  1105  	return false
  1106  }
  1107  func (n *LogicalExpr) doChildrenWithHidden(do func(Node) bool) bool {
  1108  	return n.doChildren(do)
  1109  }
  1110  func (n *LogicalExpr) editChildren(edit func(Node) Node) {
  1111  	editNodes(n.init, edit)
  1112  	if n.X != nil {
  1113  		n.X = edit(n.X).(Node)
  1114  	}
  1115  	if n.Y != nil {
  1116  		n.Y = edit(n.Y).(Node)
  1117  	}
  1118  }
  1119  func (n *LogicalExpr) editChildrenWithHidden(edit func(Node) Node) {
  1120  	n.editChildren(edit)
  1121  }
  1122  
  1123  func (n *MakeExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
  1124  func (n *MakeExpr) copy() Node {
  1125  	c := *n
  1126  	c.init = copyNodes(c.init)
  1127  	return &c
  1128  }
  1129  func (n *MakeExpr) doChildren(do func(Node) bool) bool {
  1130  	if doNodes(n.init, do) {
  1131  		return true
  1132  	}
  1133  	if n.Len != nil && do(n.Len) {
  1134  		return true
  1135  	}
  1136  	if n.Cap != nil && do(n.Cap) {
  1137  		return true
  1138  	}
  1139  	return false
  1140  }
  1141  func (n *MakeExpr) doChildrenWithHidden(do func(Node) bool) bool {
  1142  	if doNodes(n.init, do) {
  1143  		return true
  1144  	}
  1145  	if n.RType != nil && do(n.RType) {
  1146  		return true
  1147  	}
  1148  	if n.Len != nil && do(n.Len) {
  1149  		return true
  1150  	}
  1151  	if n.Cap != nil && do(n.Cap) {
  1152  		return true
  1153  	}
  1154  	return false
  1155  }
  1156  func (n *MakeExpr) editChildren(edit func(Node) Node) {
  1157  	editNodes(n.init, edit)
  1158  	if n.Len != nil {
  1159  		n.Len = edit(n.Len).(Node)
  1160  	}
  1161  	if n.Cap != nil {
  1162  		n.Cap = edit(n.Cap).(Node)
  1163  	}
  1164  }
  1165  func (n *MakeExpr) editChildrenWithHidden(edit func(Node) Node) {
  1166  	editNodes(n.init, edit)
  1167  	if n.RType != nil {
  1168  		n.RType = edit(n.RType).(Node)
  1169  	}
  1170  	if n.Len != nil {
  1171  		n.Len = edit(n.Len).(Node)
  1172  	}
  1173  	if n.Cap != nil {
  1174  		n.Cap = edit(n.Cap).(Node)
  1175  	}
  1176  }
  1177  
  1178  func (n *Name) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
  1179  
  1180  func (n *NilExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
  1181  func (n *NilExpr) copy() Node {
  1182  	c := *n
  1183  	c.init = copyNodes(c.init)
  1184  	return &c
  1185  }
  1186  func (n *NilExpr) doChildren(do func(Node) bool) bool {
  1187  	if doNodes(n.init, do) {
  1188  		return true
  1189  	}
  1190  	return false
  1191  }
  1192  func (n *NilExpr) doChildrenWithHidden(do func(Node) bool) bool {
  1193  	return n.doChildren(do)
  1194  }
  1195  func (n *NilExpr) editChildren(edit func(Node) Node) {
  1196  	editNodes(n.init, edit)
  1197  }
  1198  func (n *NilExpr) editChildrenWithHidden(edit func(Node) Node) {
  1199  	n.editChildren(edit)
  1200  }
  1201  
  1202  func (n *ParenExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
  1203  func (n *ParenExpr) copy() Node {
  1204  	c := *n
  1205  	c.init = copyNodes(c.init)
  1206  	return &c
  1207  }
  1208  func (n *ParenExpr) doChildren(do func(Node) bool) bool {
  1209  	if doNodes(n.init, do) {
  1210  		return true
  1211  	}
  1212  	if n.X != nil && do(n.X) {
  1213  		return true
  1214  	}
  1215  	return false
  1216  }
  1217  func (n *ParenExpr) doChildrenWithHidden(do func(Node) bool) bool {
  1218  	return n.doChildren(do)
  1219  }
  1220  func (n *ParenExpr) editChildren(edit func(Node) Node) {
  1221  	editNodes(n.init, edit)
  1222  	if n.X != nil {
  1223  		n.X = edit(n.X).(Node)
  1224  	}
  1225  }
  1226  func (n *ParenExpr) editChildrenWithHidden(edit func(Node) Node) {
  1227  	n.editChildren(edit)
  1228  }
  1229  
  1230  func (n *RangeStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
  1231  func (n *RangeStmt) copy() Node {
  1232  	c := *n
  1233  	c.init = copyNodes(c.init)
  1234  	c.Body = copyNodes(c.Body)
  1235  	return &c
  1236  }
  1237  func (n *RangeStmt) doChildren(do func(Node) bool) bool {
  1238  	if doNodes(n.init, do) {
  1239  		return true
  1240  	}
  1241  	if n.X != nil && do(n.X) {
  1242  		return true
  1243  	}
  1244  	if n.Key != nil && do(n.Key) {
  1245  		return true
  1246  	}
  1247  	if n.Value != nil && do(n.Value) {
  1248  		return true
  1249  	}
  1250  	if doNodes(n.Body, do) {
  1251  		return true
  1252  	}
  1253  	if n.Prealloc != nil && do(n.Prealloc) {
  1254  		return true
  1255  	}
  1256  	return false
  1257  }
  1258  func (n *RangeStmt) doChildrenWithHidden(do func(Node) bool) bool {
  1259  	if doNodes(n.init, do) {
  1260  		return true
  1261  	}
  1262  	if n.X != nil && do(n.X) {
  1263  		return true
  1264  	}
  1265  	if n.RType != nil && do(n.RType) {
  1266  		return true
  1267  	}
  1268  	if n.Key != nil && do(n.Key) {
  1269  		return true
  1270  	}
  1271  	if n.Value != nil && do(n.Value) {
  1272  		return true
  1273  	}
  1274  	if doNodes(n.Body, do) {
  1275  		return true
  1276  	}
  1277  	if n.Prealloc != nil && do(n.Prealloc) {
  1278  		return true
  1279  	}
  1280  	if n.KeyTypeWord != nil && do(n.KeyTypeWord) {
  1281  		return true
  1282  	}
  1283  	if n.KeySrcRType != nil && do(n.KeySrcRType) {
  1284  		return true
  1285  	}
  1286  	if n.ValueTypeWord != nil && do(n.ValueTypeWord) {
  1287  		return true
  1288  	}
  1289  	if n.ValueSrcRType != nil && do(n.ValueSrcRType) {
  1290  		return true
  1291  	}
  1292  	return false
  1293  }
  1294  func (n *RangeStmt) editChildren(edit func(Node) Node) {
  1295  	editNodes(n.init, edit)
  1296  	if n.X != nil {
  1297  		n.X = edit(n.X).(Node)
  1298  	}
  1299  	if n.Key != nil {
  1300  		n.Key = edit(n.Key).(Node)
  1301  	}
  1302  	if n.Value != nil {
  1303  		n.Value = edit(n.Value).(Node)
  1304  	}
  1305  	editNodes(n.Body, edit)
  1306  	if n.Prealloc != nil {
  1307  		n.Prealloc = edit(n.Prealloc).(*Name)
  1308  	}
  1309  }
  1310  func (n *RangeStmt) editChildrenWithHidden(edit func(Node) Node) {
  1311  	editNodes(n.init, edit)
  1312  	if n.X != nil {
  1313  		n.X = edit(n.X).(Node)
  1314  	}
  1315  	if n.RType != nil {
  1316  		n.RType = edit(n.RType).(Node)
  1317  	}
  1318  	if n.Key != nil {
  1319  		n.Key = edit(n.Key).(Node)
  1320  	}
  1321  	if n.Value != nil {
  1322  		n.Value = edit(n.Value).(Node)
  1323  	}
  1324  	editNodes(n.Body, edit)
  1325  	if n.Prealloc != nil {
  1326  		n.Prealloc = edit(n.Prealloc).(*Name)
  1327  	}
  1328  	if n.KeyTypeWord != nil {
  1329  		n.KeyTypeWord = edit(n.KeyTypeWord).(Node)
  1330  	}
  1331  	if n.KeySrcRType != nil {
  1332  		n.KeySrcRType = edit(n.KeySrcRType).(Node)
  1333  	}
  1334  	if n.ValueTypeWord != nil {
  1335  		n.ValueTypeWord = edit(n.ValueTypeWord).(Node)
  1336  	}
  1337  	if n.ValueSrcRType != nil {
  1338  		n.ValueSrcRType = edit(n.ValueSrcRType).(Node)
  1339  	}
  1340  }
  1341  
  1342  func (n *ResultExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
  1343  func (n *ResultExpr) copy() Node {
  1344  	c := *n
  1345  	c.init = copyNodes(c.init)
  1346  	return &c
  1347  }
  1348  func (n *ResultExpr) doChildren(do func(Node) bool) bool {
  1349  	if doNodes(n.init, do) {
  1350  		return true
  1351  	}
  1352  	return false
  1353  }
  1354  func (n *ResultExpr) doChildrenWithHidden(do func(Node) bool) bool {
  1355  	return n.doChildren(do)
  1356  }
  1357  func (n *ResultExpr) editChildren(edit func(Node) Node) {
  1358  	editNodes(n.init, edit)
  1359  }
  1360  func (n *ResultExpr) editChildrenWithHidden(edit func(Node) Node) {
  1361  	n.editChildren(edit)
  1362  }
  1363  
  1364  func (n *ReturnStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
  1365  func (n *ReturnStmt) copy() Node {
  1366  	c := *n
  1367  	c.init = copyNodes(c.init)
  1368  	c.Results = copyNodes(c.Results)
  1369  	return &c
  1370  }
  1371  func (n *ReturnStmt) doChildren(do func(Node) bool) bool {
  1372  	if doNodes(n.init, do) {
  1373  		return true
  1374  	}
  1375  	if doNodes(n.Results, do) {
  1376  		return true
  1377  	}
  1378  	return false
  1379  }
  1380  func (n *ReturnStmt) doChildrenWithHidden(do func(Node) bool) bool {
  1381  	return n.doChildren(do)
  1382  }
  1383  func (n *ReturnStmt) editChildren(edit func(Node) Node) {
  1384  	editNodes(n.init, edit)
  1385  	editNodes(n.Results, edit)
  1386  }
  1387  func (n *ReturnStmt) editChildrenWithHidden(edit func(Node) Node) {
  1388  	n.editChildren(edit)
  1389  }
  1390  
  1391  func (n *SelectStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
  1392  func (n *SelectStmt) copy() Node {
  1393  	c := *n
  1394  	c.init = copyNodes(c.init)
  1395  	c.Cases = copyCommClauses(c.Cases)
  1396  	c.Compiled = copyNodes(c.Compiled)
  1397  	return &c
  1398  }
  1399  func (n *SelectStmt) doChildren(do func(Node) bool) bool {
  1400  	if doNodes(n.init, do) {
  1401  		return true
  1402  	}
  1403  	if doCommClauses(n.Cases, do) {
  1404  		return true
  1405  	}
  1406  	if doNodes(n.Compiled, do) {
  1407  		return true
  1408  	}
  1409  	return false
  1410  }
  1411  func (n *SelectStmt) doChildrenWithHidden(do func(Node) bool) bool {
  1412  	return n.doChildren(do)
  1413  }
  1414  func (n *SelectStmt) editChildren(edit func(Node) Node) {
  1415  	editNodes(n.init, edit)
  1416  	editCommClauses(n.Cases, edit)
  1417  	editNodes(n.Compiled, edit)
  1418  }
  1419  func (n *SelectStmt) editChildrenWithHidden(edit func(Node) Node) {
  1420  	n.editChildren(edit)
  1421  }
  1422  
  1423  func (n *SelectorExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
  1424  func (n *SelectorExpr) copy() Node {
  1425  	c := *n
  1426  	c.init = copyNodes(c.init)
  1427  	return &c
  1428  }
  1429  func (n *SelectorExpr) doChildren(do func(Node) bool) bool {
  1430  	if doNodes(n.init, do) {
  1431  		return true
  1432  	}
  1433  	if n.X != nil && do(n.X) {
  1434  		return true
  1435  	}
  1436  	if n.Prealloc != nil && do(n.Prealloc) {
  1437  		return true
  1438  	}
  1439  	return false
  1440  }
  1441  func (n *SelectorExpr) doChildrenWithHidden(do func(Node) bool) bool {
  1442  	return n.doChildren(do)
  1443  }
  1444  func (n *SelectorExpr) editChildren(edit func(Node) Node) {
  1445  	editNodes(n.init, edit)
  1446  	if n.X != nil {
  1447  		n.X = edit(n.X).(Node)
  1448  	}
  1449  	if n.Prealloc != nil {
  1450  		n.Prealloc = edit(n.Prealloc).(*Name)
  1451  	}
  1452  }
  1453  func (n *SelectorExpr) editChildrenWithHidden(edit func(Node) Node) {
  1454  	n.editChildren(edit)
  1455  }
  1456  
  1457  func (n *SendStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
  1458  func (n *SendStmt) copy() Node {
  1459  	c := *n
  1460  	c.init = copyNodes(c.init)
  1461  	return &c
  1462  }
  1463  func (n *SendStmt) doChildren(do func(Node) bool) bool {
  1464  	if doNodes(n.init, do) {
  1465  		return true
  1466  	}
  1467  	if n.Chan != nil && do(n.Chan) {
  1468  		return true
  1469  	}
  1470  	if n.Value != nil && do(n.Value) {
  1471  		return true
  1472  	}
  1473  	return false
  1474  }
  1475  func (n *SendStmt) doChildrenWithHidden(do func(Node) bool) bool {
  1476  	return n.doChildren(do)
  1477  }
  1478  func (n *SendStmt) editChildren(edit func(Node) Node) {
  1479  	editNodes(n.init, edit)
  1480  	if n.Chan != nil {
  1481  		n.Chan = edit(n.Chan).(Node)
  1482  	}
  1483  	if n.Value != nil {
  1484  		n.Value = edit(n.Value).(Node)
  1485  	}
  1486  }
  1487  func (n *SendStmt) editChildrenWithHidden(edit func(Node) Node) {
  1488  	n.editChildren(edit)
  1489  }
  1490  
  1491  func (n *SliceExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
  1492  func (n *SliceExpr) copy() Node {
  1493  	c := *n
  1494  	c.init = copyNodes(c.init)
  1495  	return &c
  1496  }
  1497  func (n *SliceExpr) doChildren(do func(Node) bool) bool {
  1498  	if doNodes(n.init, do) {
  1499  		return true
  1500  	}
  1501  	if n.X != nil && do(n.X) {
  1502  		return true
  1503  	}
  1504  	if n.Low != nil && do(n.Low) {
  1505  		return true
  1506  	}
  1507  	if n.High != nil && do(n.High) {
  1508  		return true
  1509  	}
  1510  	if n.Max != nil && do(n.Max) {
  1511  		return true
  1512  	}
  1513  	return false
  1514  }
  1515  func (n *SliceExpr) doChildrenWithHidden(do func(Node) bool) bool {
  1516  	return n.doChildren(do)
  1517  }
  1518  func (n *SliceExpr) editChildren(edit func(Node) Node) {
  1519  	editNodes(n.init, edit)
  1520  	if n.X != nil {
  1521  		n.X = edit(n.X).(Node)
  1522  	}
  1523  	if n.Low != nil {
  1524  		n.Low = edit(n.Low).(Node)
  1525  	}
  1526  	if n.High != nil {
  1527  		n.High = edit(n.High).(Node)
  1528  	}
  1529  	if n.Max != nil {
  1530  		n.Max = edit(n.Max).(Node)
  1531  	}
  1532  }
  1533  func (n *SliceExpr) editChildrenWithHidden(edit func(Node) Node) {
  1534  	n.editChildren(edit)
  1535  }
  1536  
  1537  func (n *SliceHeaderExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
  1538  func (n *SliceHeaderExpr) copy() Node {
  1539  	c := *n
  1540  	c.init = copyNodes(c.init)
  1541  	return &c
  1542  }
  1543  func (n *SliceHeaderExpr) doChildren(do func(Node) bool) bool {
  1544  	if doNodes(n.init, do) {
  1545  		return true
  1546  	}
  1547  	if n.Ptr != nil && do(n.Ptr) {
  1548  		return true
  1549  	}
  1550  	if n.Len != nil && do(n.Len) {
  1551  		return true
  1552  	}
  1553  	if n.Cap != nil && do(n.Cap) {
  1554  		return true
  1555  	}
  1556  	return false
  1557  }
  1558  func (n *SliceHeaderExpr) doChildrenWithHidden(do func(Node) bool) bool {
  1559  	return n.doChildren(do)
  1560  }
  1561  func (n *SliceHeaderExpr) editChildren(edit func(Node) Node) {
  1562  	editNodes(n.init, edit)
  1563  	if n.Ptr != nil {
  1564  		n.Ptr = edit(n.Ptr).(Node)
  1565  	}
  1566  	if n.Len != nil {
  1567  		n.Len = edit(n.Len).(Node)
  1568  	}
  1569  	if n.Cap != nil {
  1570  		n.Cap = edit(n.Cap).(Node)
  1571  	}
  1572  }
  1573  func (n *SliceHeaderExpr) editChildrenWithHidden(edit func(Node) Node) {
  1574  	n.editChildren(edit)
  1575  }
  1576  
  1577  func (n *StarExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
  1578  func (n *StarExpr) copy() Node {
  1579  	c := *n
  1580  	c.init = copyNodes(c.init)
  1581  	return &c
  1582  }
  1583  func (n *StarExpr) doChildren(do func(Node) bool) bool {
  1584  	if doNodes(n.init, do) {
  1585  		return true
  1586  	}
  1587  	if n.X != nil && do(n.X) {
  1588  		return true
  1589  	}
  1590  	return false
  1591  }
  1592  func (n *StarExpr) doChildrenWithHidden(do func(Node) bool) bool {
  1593  	return n.doChildren(do)
  1594  }
  1595  func (n *StarExpr) editChildren(edit func(Node) Node) {
  1596  	editNodes(n.init, edit)
  1597  	if n.X != nil {
  1598  		n.X = edit(n.X).(Node)
  1599  	}
  1600  }
  1601  func (n *StarExpr) editChildrenWithHidden(edit func(Node) Node) {
  1602  	n.editChildren(edit)
  1603  }
  1604  
  1605  func (n *StringHeaderExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
  1606  func (n *StringHeaderExpr) copy() Node {
  1607  	c := *n
  1608  	c.init = copyNodes(c.init)
  1609  	return &c
  1610  }
  1611  func (n *StringHeaderExpr) doChildren(do func(Node) bool) bool {
  1612  	if doNodes(n.init, do) {
  1613  		return true
  1614  	}
  1615  	if n.Ptr != nil && do(n.Ptr) {
  1616  		return true
  1617  	}
  1618  	if n.Len != nil && do(n.Len) {
  1619  		return true
  1620  	}
  1621  	return false
  1622  }
  1623  func (n *StringHeaderExpr) doChildrenWithHidden(do func(Node) bool) bool {
  1624  	return n.doChildren(do)
  1625  }
  1626  func (n *StringHeaderExpr) editChildren(edit func(Node) Node) {
  1627  	editNodes(n.init, edit)
  1628  	if n.Ptr != nil {
  1629  		n.Ptr = edit(n.Ptr).(Node)
  1630  	}
  1631  	if n.Len != nil {
  1632  		n.Len = edit(n.Len).(Node)
  1633  	}
  1634  }
  1635  func (n *StringHeaderExpr) editChildrenWithHidden(edit func(Node) Node) {
  1636  	n.editChildren(edit)
  1637  }
  1638  
  1639  func (n *StructKeyExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
  1640  func (n *StructKeyExpr) copy() Node {
  1641  	c := *n
  1642  	c.init = copyNodes(c.init)
  1643  	return &c
  1644  }
  1645  func (n *StructKeyExpr) doChildren(do func(Node) bool) bool {
  1646  	if doNodes(n.init, do) {
  1647  		return true
  1648  	}
  1649  	if n.Value != nil && do(n.Value) {
  1650  		return true
  1651  	}
  1652  	return false
  1653  }
  1654  func (n *StructKeyExpr) doChildrenWithHidden(do func(Node) bool) bool {
  1655  	return n.doChildren(do)
  1656  }
  1657  func (n *StructKeyExpr) editChildren(edit func(Node) Node) {
  1658  	editNodes(n.init, edit)
  1659  	if n.Value != nil {
  1660  		n.Value = edit(n.Value).(Node)
  1661  	}
  1662  }
  1663  func (n *StructKeyExpr) editChildrenWithHidden(edit func(Node) Node) {
  1664  	n.editChildren(edit)
  1665  }
  1666  
  1667  func (n *SwitchStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
  1668  func (n *SwitchStmt) copy() Node {
  1669  	c := *n
  1670  	c.init = copyNodes(c.init)
  1671  	c.Cases = copyCaseClauses(c.Cases)
  1672  	c.Compiled = copyNodes(c.Compiled)
  1673  	return &c
  1674  }
  1675  func (n *SwitchStmt) doChildren(do func(Node) bool) bool {
  1676  	if doNodes(n.init, do) {
  1677  		return true
  1678  	}
  1679  	if n.Tag != nil && do(n.Tag) {
  1680  		return true
  1681  	}
  1682  	if doCaseClauses(n.Cases, do) {
  1683  		return true
  1684  	}
  1685  	if doNodes(n.Compiled, do) {
  1686  		return true
  1687  	}
  1688  	return false
  1689  }
  1690  func (n *SwitchStmt) doChildrenWithHidden(do func(Node) bool) bool {
  1691  	return n.doChildren(do)
  1692  }
  1693  func (n *SwitchStmt) editChildren(edit func(Node) Node) {
  1694  	editNodes(n.init, edit)
  1695  	if n.Tag != nil {
  1696  		n.Tag = edit(n.Tag).(Node)
  1697  	}
  1698  	editCaseClauses(n.Cases, edit)
  1699  	editNodes(n.Compiled, edit)
  1700  }
  1701  func (n *SwitchStmt) editChildrenWithHidden(edit func(Node) Node) {
  1702  	n.editChildren(edit)
  1703  }
  1704  
  1705  func (n *TailCallStmt) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
  1706  func (n *TailCallStmt) copy() Node {
  1707  	c := *n
  1708  	c.init = copyNodes(c.init)
  1709  	return &c
  1710  }
  1711  func (n *TailCallStmt) doChildren(do func(Node) bool) bool {
  1712  	if doNodes(n.init, do) {
  1713  		return true
  1714  	}
  1715  	if n.Call != nil && do(n.Call) {
  1716  		return true
  1717  	}
  1718  	return false
  1719  }
  1720  func (n *TailCallStmt) doChildrenWithHidden(do func(Node) bool) bool {
  1721  	return n.doChildren(do)
  1722  }
  1723  func (n *TailCallStmt) editChildren(edit func(Node) Node) {
  1724  	editNodes(n.init, edit)
  1725  	if n.Call != nil {
  1726  		n.Call = edit(n.Call).(*CallExpr)
  1727  	}
  1728  }
  1729  func (n *TailCallStmt) editChildrenWithHidden(edit func(Node) Node) {
  1730  	n.editChildren(edit)
  1731  }
  1732  
  1733  func (n *TypeAssertExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
  1734  func (n *TypeAssertExpr) copy() Node {
  1735  	c := *n
  1736  	c.init = copyNodes(c.init)
  1737  	return &c
  1738  }
  1739  func (n *TypeAssertExpr) doChildren(do func(Node) bool) bool {
  1740  	if doNodes(n.init, do) {
  1741  		return true
  1742  	}
  1743  	if n.X != nil && do(n.X) {
  1744  		return true
  1745  	}
  1746  	return false
  1747  }
  1748  func (n *TypeAssertExpr) doChildrenWithHidden(do func(Node) bool) bool {
  1749  	if doNodes(n.init, do) {
  1750  		return true
  1751  	}
  1752  	if n.X != nil && do(n.X) {
  1753  		return true
  1754  	}
  1755  	if n.ITab != nil && do(n.ITab) {
  1756  		return true
  1757  	}
  1758  	return false
  1759  }
  1760  func (n *TypeAssertExpr) editChildren(edit func(Node) Node) {
  1761  	editNodes(n.init, edit)
  1762  	if n.X != nil {
  1763  		n.X = edit(n.X).(Node)
  1764  	}
  1765  }
  1766  func (n *TypeAssertExpr) editChildrenWithHidden(edit func(Node) Node) {
  1767  	editNodes(n.init, edit)
  1768  	if n.X != nil {
  1769  		n.X = edit(n.X).(Node)
  1770  	}
  1771  	if n.ITab != nil {
  1772  		n.ITab = edit(n.ITab).(Node)
  1773  	}
  1774  }
  1775  
  1776  func (n *TypeSwitchGuard) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
  1777  func (n *TypeSwitchGuard) copy() Node {
  1778  	c := *n
  1779  	return &c
  1780  }
  1781  func (n *TypeSwitchGuard) doChildren(do func(Node) bool) bool {
  1782  	if n.Tag != nil && do(n.Tag) {
  1783  		return true
  1784  	}
  1785  	if n.X != nil && do(n.X) {
  1786  		return true
  1787  	}
  1788  	return false
  1789  }
  1790  func (n *TypeSwitchGuard) doChildrenWithHidden(do func(Node) bool) bool {
  1791  	return n.doChildren(do)
  1792  }
  1793  func (n *TypeSwitchGuard) editChildren(edit func(Node) Node) {
  1794  	if n.Tag != nil {
  1795  		n.Tag = edit(n.Tag).(*Ident)
  1796  	}
  1797  	if n.X != nil {
  1798  		n.X = edit(n.X).(Node)
  1799  	}
  1800  }
  1801  func (n *TypeSwitchGuard) editChildrenWithHidden(edit func(Node) Node) {
  1802  	n.editChildren(edit)
  1803  }
  1804  
  1805  func (n *UnaryExpr) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
  1806  func (n *UnaryExpr) copy() Node {
  1807  	c := *n
  1808  	c.init = copyNodes(c.init)
  1809  	return &c
  1810  }
  1811  func (n *UnaryExpr) doChildren(do func(Node) bool) bool {
  1812  	if doNodes(n.init, do) {
  1813  		return true
  1814  	}
  1815  	if n.X != nil && do(n.X) {
  1816  		return true
  1817  	}
  1818  	return false
  1819  }
  1820  func (n *UnaryExpr) doChildrenWithHidden(do func(Node) bool) bool {
  1821  	return n.doChildren(do)
  1822  }
  1823  func (n *UnaryExpr) editChildren(edit func(Node) Node) {
  1824  	editNodes(n.init, edit)
  1825  	if n.X != nil {
  1826  		n.X = edit(n.X).(Node)
  1827  	}
  1828  }
  1829  func (n *UnaryExpr) editChildrenWithHidden(edit func(Node) Node) {
  1830  	n.editChildren(edit)
  1831  }
  1832  
  1833  func (n *typeNode) Format(s fmt.State, verb rune) { fmtNode(n, s, verb) }
  1834  func (n *typeNode) copy() Node {
  1835  	c := *n
  1836  	return &c
  1837  }
  1838  func (n *typeNode) doChildren(do func(Node) bool) bool {
  1839  	return false
  1840  }
  1841  func (n *typeNode) doChildrenWithHidden(do func(Node) bool) bool {
  1842  	return n.doChildren(do)
  1843  }
  1844  func (n *typeNode) editChildren(edit func(Node) Node) {
  1845  }
  1846  func (n *typeNode) editChildrenWithHidden(edit func(Node) Node) {
  1847  	n.editChildren(edit)
  1848  }
  1849  
  1850  func copyCaseClauses(list []*CaseClause) []*CaseClause {
  1851  	if list == nil {
  1852  		return nil
  1853  	}
  1854  	c := make([]*CaseClause, len(list))
  1855  	copy(c, list)
  1856  	return c
  1857  }
  1858  func doCaseClauses(list []*CaseClause, do func(Node) bool) bool {
  1859  	for _, x := range list {
  1860  		if x != nil && do(x) {
  1861  			return true
  1862  		}
  1863  	}
  1864  	return false
  1865  }
  1866  func editCaseClauses(list []*CaseClause, edit func(Node) Node) {
  1867  	for i, x := range list {
  1868  		if x != nil {
  1869  			list[i] = edit(x).(*CaseClause)
  1870  		}
  1871  	}
  1872  }
  1873  
  1874  func copyCommClauses(list []*CommClause) []*CommClause {
  1875  	if list == nil {
  1876  		return nil
  1877  	}
  1878  	c := make([]*CommClause, len(list))
  1879  	copy(c, list)
  1880  	return c
  1881  }
  1882  func doCommClauses(list []*CommClause, do func(Node) bool) bool {
  1883  	for _, x := range list {
  1884  		if x != nil && do(x) {
  1885  			return true
  1886  		}
  1887  	}
  1888  	return false
  1889  }
  1890  func editCommClauses(list []*CommClause, edit func(Node) Node) {
  1891  	for i, x := range list {
  1892  		if x != nil {
  1893  			list[i] = edit(x).(*CommClause)
  1894  		}
  1895  	}
  1896  }
  1897  
  1898  func copyNames(list []*Name) []*Name {
  1899  	if list == nil {
  1900  		return nil
  1901  	}
  1902  	c := make([]*Name, len(list))
  1903  	copy(c, list)
  1904  	return c
  1905  }
  1906  func doNames(list []*Name, do func(Node) bool) bool {
  1907  	for _, x := range list {
  1908  		if x != nil && do(x) {
  1909  			return true
  1910  		}
  1911  	}
  1912  	return false
  1913  }
  1914  func editNames(list []*Name, edit func(Node) Node) {
  1915  	for i, x := range list {
  1916  		if x != nil {
  1917  			list[i] = edit(x).(*Name)
  1918  		}
  1919  	}
  1920  }
  1921  
  1922  func copyNodes(list []Node) []Node {
  1923  	if list == nil {
  1924  		return nil
  1925  	}
  1926  	c := make([]Node, len(list))
  1927  	copy(c, list)
  1928  	return c
  1929  }
  1930  func doNodes(list []Node, do func(Node) bool) bool {
  1931  	for _, x := range list {
  1932  		if x != nil && do(x) {
  1933  			return true
  1934  		}
  1935  	}
  1936  	return false
  1937  }
  1938  func editNodes(list []Node, edit func(Node) Node) {
  1939  	for i, x := range list {
  1940  		if x != nil {
  1941  			list[i] = edit(x).(Node)
  1942  		}
  1943  	}
  1944  }
  1945  

View as plain text