lib_ruby_parser_ast/traverse/visitor/visit_gen.rs
1// This file is autogenerated by codegen/visitor.liquid
2
3use crate::nodes::*;
4use crate::Node;
5
6/// Common trait for all visitors
7///
8/// ```ignore
9/// use lib_ruby_parser::{
10/// nodes::{Class, Const},
11/// traverse::visitor::{visit_class, Visitor},
12/// Node,
13/// };
14///
15/// struct ClassesCollector {
16/// classes: Vec<String>,
17/// }
18///
19/// impl Visitor for ClassesCollector {
20/// fn on_class(&mut self, node: &Class) {
21/// self.classes.push(fetch_const_name(&node.name));
22/// visit_class(self, node);
23/// }
24/// }
25///
26/// fn fetch_const_name(name: &Node) -> String {
27/// match name {
28/// Node::Const(Const { name, .. }) => name.to_owned(),
29/// other => panic!("Don't know how to fetch const name from {:?}", other),
30/// }
31/// }
32///
33/// use lib_ruby_parser::{Parser, ParserOptions, ParserResult};
34/// let parser = Parser::new(
35/// b"class A; class B; end; end".to_vec(),
36/// ParserOptions::default(),
37/// );
38/// let ParserResult { ast, .. } = parser.do_parse();
39/// let ast = ast.unwrap();
40///
41/// let mut collector = ClassesCollector { classes: vec![] };
42/// collector.visit(&ast);
43/// assert_eq!(
44/// collector.classes,
45/// vec![String::from("A"), String::from("B")]
46/// );
47/// ```
48pub trait Visitor: Sized {
49
50 /// Invoked by a `Visitor` on entering into `Alias` node.
51 ///
52 /// Has a default implementation, but you can override it and (optionally) call
53 /// `visit_alias(node)` to continue traversing.
54 fn on_alias(&mut self, node: &Alias) {
55 visit_alias(self, node);
56 }
57
58 /// Invoked by a `Visitor` on entering into `And` node.
59 ///
60 /// Has a default implementation, but you can override it and (optionally) call
61 /// `visit_and(node)` to continue traversing.
62 fn on_and(&mut self, node: &And) {
63 visit_and(self, node);
64 }
65
66 /// Invoked by a `Visitor` on entering into `AndAsgn` node.
67 ///
68 /// Has a default implementation, but you can override it and (optionally) call
69 /// `visit_and_asgn(node)` to continue traversing.
70 fn on_and_asgn(&mut self, node: &AndAsgn) {
71 visit_and_asgn(self, node);
72 }
73
74 /// Invoked by a `Visitor` on entering into `Arg` node.
75 ///
76 /// Has a default implementation, but you can override it and (optionally) call
77 /// `visit_arg(node)` to continue traversing.
78 fn on_arg(&mut self, node: &Arg) {
79 visit_arg(self, node);
80 }
81
82 /// Invoked by a `Visitor` on entering into `Args` node.
83 ///
84 /// Has a default implementation, but you can override it and (optionally) call
85 /// `visit_args(node)` to continue traversing.
86 fn on_args(&mut self, node: &Args) {
87 visit_args(self, node);
88 }
89
90 /// Invoked by a `Visitor` on entering into `Array` node.
91 ///
92 /// Has a default implementation, but you can override it and (optionally) call
93 /// `visit_array(node)` to continue traversing.
94 fn on_array(&mut self, node: &Array) {
95 visit_array(self, node);
96 }
97
98 /// Invoked by a `Visitor` on entering into `ArrayPattern` node.
99 ///
100 /// Has a default implementation, but you can override it and (optionally) call
101 /// `visit_array_pattern(node)` to continue traversing.
102 fn on_array_pattern(&mut self, node: &ArrayPattern) {
103 visit_array_pattern(self, node);
104 }
105
106 /// Invoked by a `Visitor` on entering into `ArrayPatternWithTail` node.
107 ///
108 /// Has a default implementation, but you can override it and (optionally) call
109 /// `visit_array_pattern_with_tail(node)` to continue traversing.
110 fn on_array_pattern_with_tail(&mut self, node: &ArrayPatternWithTail) {
111 visit_array_pattern_with_tail(self, node);
112 }
113
114 /// Invoked by a `Visitor` on entering into `BackRef` node.
115 ///
116 /// Has a default implementation, but you can override it and (optionally) call
117 /// `visit_back_ref(node)` to continue traversing.
118 fn on_back_ref(&mut self, node: &BackRef) {
119 visit_back_ref(self, node);
120 }
121
122 /// Invoked by a `Visitor` on entering into `Begin` node.
123 ///
124 /// Has a default implementation, but you can override it and (optionally) call
125 /// `visit_begin(node)` to continue traversing.
126 fn on_begin(&mut self, node: &Begin) {
127 visit_begin(self, node);
128 }
129
130 /// Invoked by a `Visitor` on entering into `Block` node.
131 ///
132 /// Has a default implementation, but you can override it and (optionally) call
133 /// `visit_block(node)` to continue traversing.
134 fn on_block(&mut self, node: &Block) {
135 visit_block(self, node);
136 }
137
138 /// Invoked by a `Visitor` on entering into `Blockarg` node.
139 ///
140 /// Has a default implementation, but you can override it and (optionally) call
141 /// `visit_blockarg(node)` to continue traversing.
142 fn on_blockarg(&mut self, node: &Blockarg) {
143 visit_blockarg(self, node);
144 }
145
146 /// Invoked by a `Visitor` on entering into `BlockPass` node.
147 ///
148 /// Has a default implementation, but you can override it and (optionally) call
149 /// `visit_block_pass(node)` to continue traversing.
150 fn on_block_pass(&mut self, node: &BlockPass) {
151 visit_block_pass(self, node);
152 }
153
154 /// Invoked by a `Visitor` on entering into `Break` node.
155 ///
156 /// Has a default implementation, but you can override it and (optionally) call
157 /// `visit_break(node)` to continue traversing.
158 fn on_break(&mut self, node: &Break) {
159 visit_break(self, node);
160 }
161
162 /// Invoked by a `Visitor` on entering into `Case` node.
163 ///
164 /// Has a default implementation, but you can override it and (optionally) call
165 /// `visit_case(node)` to continue traversing.
166 fn on_case(&mut self, node: &Case) {
167 visit_case(self, node);
168 }
169
170 /// Invoked by a `Visitor` on entering into `CaseMatch` node.
171 ///
172 /// Has a default implementation, but you can override it and (optionally) call
173 /// `visit_case_match(node)` to continue traversing.
174 fn on_case_match(&mut self, node: &CaseMatch) {
175 visit_case_match(self, node);
176 }
177
178 /// Invoked by a `Visitor` on entering into `Casgn` node.
179 ///
180 /// Has a default implementation, but you can override it and (optionally) call
181 /// `visit_casgn(node)` to continue traversing.
182 fn on_casgn(&mut self, node: &Casgn) {
183 visit_casgn(self, node);
184 }
185
186 /// Invoked by a `Visitor` on entering into `Cbase` node.
187 ///
188 /// Has a default implementation, but you can override it and (optionally) call
189 /// `visit_cbase(node)` to continue traversing.
190 fn on_cbase(&mut self, node: &Cbase) {
191 visit_cbase(self, node);
192 }
193
194 /// Invoked by a `Visitor` on entering into `Class` node.
195 ///
196 /// Has a default implementation, but you can override it and (optionally) call
197 /// `visit_class(node)` to continue traversing.
198 fn on_class(&mut self, node: &Class) {
199 visit_class(self, node);
200 }
201
202 /// Invoked by a `Visitor` on entering into `Complex` node.
203 ///
204 /// Has a default implementation, but you can override it and (optionally) call
205 /// `visit_complex(node)` to continue traversing.
206 fn on_complex(&mut self, node: &Complex) {
207 visit_complex(self, node);
208 }
209
210 /// Invoked by a `Visitor` on entering into `Const` node.
211 ///
212 /// Has a default implementation, but you can override it and (optionally) call
213 /// `visit_const(node)` to continue traversing.
214 fn on_const(&mut self, node: &Const) {
215 visit_const(self, node);
216 }
217
218 /// Invoked by a `Visitor` on entering into `ConstPattern` node.
219 ///
220 /// Has a default implementation, but you can override it and (optionally) call
221 /// `visit_const_pattern(node)` to continue traversing.
222 fn on_const_pattern(&mut self, node: &ConstPattern) {
223 visit_const_pattern(self, node);
224 }
225
226 /// Invoked by a `Visitor` on entering into `CSend` node.
227 ///
228 /// Has a default implementation, but you can override it and (optionally) call
229 /// `visit_c_send(node)` to continue traversing.
230 fn on_c_send(&mut self, node: &CSend) {
231 visit_c_send(self, node);
232 }
233
234 /// Invoked by a `Visitor` on entering into `Cvar` node.
235 ///
236 /// Has a default implementation, but you can override it and (optionally) call
237 /// `visit_cvar(node)` to continue traversing.
238 fn on_cvar(&mut self, node: &Cvar) {
239 visit_cvar(self, node);
240 }
241
242 /// Invoked by a `Visitor` on entering into `Cvasgn` node.
243 ///
244 /// Has a default implementation, but you can override it and (optionally) call
245 /// `visit_cvasgn(node)` to continue traversing.
246 fn on_cvasgn(&mut self, node: &Cvasgn) {
247 visit_cvasgn(self, node);
248 }
249
250 /// Invoked by a `Visitor` on entering into `Def` node.
251 ///
252 /// Has a default implementation, but you can override it and (optionally) call
253 /// `visit_def(node)` to continue traversing.
254 fn on_def(&mut self, node: &Def) {
255 visit_def(self, node);
256 }
257
258 /// Invoked by a `Visitor` on entering into `Defined` node.
259 ///
260 /// Has a default implementation, but you can override it and (optionally) call
261 /// `visit_defined(node)` to continue traversing.
262 fn on_defined(&mut self, node: &Defined) {
263 visit_defined(self, node);
264 }
265
266 /// Invoked by a `Visitor` on entering into `Defs` node.
267 ///
268 /// Has a default implementation, but you can override it and (optionally) call
269 /// `visit_defs(node)` to continue traversing.
270 fn on_defs(&mut self, node: &Defs) {
271 visit_defs(self, node);
272 }
273
274 /// Invoked by a `Visitor` on entering into `Dstr` node.
275 ///
276 /// Has a default implementation, but you can override it and (optionally) call
277 /// `visit_dstr(node)` to continue traversing.
278 fn on_dstr(&mut self, node: &Dstr) {
279 visit_dstr(self, node);
280 }
281
282 /// Invoked by a `Visitor` on entering into `Dsym` node.
283 ///
284 /// Has a default implementation, but you can override it and (optionally) call
285 /// `visit_dsym(node)` to continue traversing.
286 fn on_dsym(&mut self, node: &Dsym) {
287 visit_dsym(self, node);
288 }
289
290 /// Invoked by a `Visitor` on entering into `EFlipFlop` node.
291 ///
292 /// Has a default implementation, but you can override it and (optionally) call
293 /// `visit_e_flip_flop(node)` to continue traversing.
294 fn on_e_flip_flop(&mut self, node: &EFlipFlop) {
295 visit_e_flip_flop(self, node);
296 }
297
298 /// Invoked by a `Visitor` on entering into `EmptyElse` node.
299 ///
300 /// Has a default implementation, but you can override it and (optionally) call
301 /// `visit_empty_else(node)` to continue traversing.
302 fn on_empty_else(&mut self, node: &EmptyElse) {
303 visit_empty_else(self, node);
304 }
305
306 /// Invoked by a `Visitor` on entering into `Encoding` node.
307 ///
308 /// Has a default implementation, but you can override it and (optionally) call
309 /// `visit_encoding(node)` to continue traversing.
310 fn on_encoding(&mut self, node: &Encoding) {
311 visit_encoding(self, node);
312 }
313
314 /// Invoked by a `Visitor` on entering into `Ensure` node.
315 ///
316 /// Has a default implementation, but you can override it and (optionally) call
317 /// `visit_ensure(node)` to continue traversing.
318 fn on_ensure(&mut self, node: &Ensure) {
319 visit_ensure(self, node);
320 }
321
322 /// Invoked by a `Visitor` on entering into `Erange` node.
323 ///
324 /// Has a default implementation, but you can override it and (optionally) call
325 /// `visit_erange(node)` to continue traversing.
326 fn on_erange(&mut self, node: &Erange) {
327 visit_erange(self, node);
328 }
329
330 /// Invoked by a `Visitor` on entering into `False` node.
331 ///
332 /// Has a default implementation, but you can override it and (optionally) call
333 /// `visit_false(node)` to continue traversing.
334 fn on_false(&mut self, node: &False) {
335 visit_false(self, node);
336 }
337
338 /// Invoked by a `Visitor` on entering into `File` node.
339 ///
340 /// Has a default implementation, but you can override it and (optionally) call
341 /// `visit_file(node)` to continue traversing.
342 fn on_file(&mut self, node: &File) {
343 visit_file(self, node);
344 }
345
346 /// Invoked by a `Visitor` on entering into `FindPattern` node.
347 ///
348 /// Has a default implementation, but you can override it and (optionally) call
349 /// `visit_find_pattern(node)` to continue traversing.
350 fn on_find_pattern(&mut self, node: &FindPattern) {
351 visit_find_pattern(self, node);
352 }
353
354 /// Invoked by a `Visitor` on entering into `Float` node.
355 ///
356 /// Has a default implementation, but you can override it and (optionally) call
357 /// `visit_float(node)` to continue traversing.
358 fn on_float(&mut self, node: &Float) {
359 visit_float(self, node);
360 }
361
362 /// Invoked by a `Visitor` on entering into `For` node.
363 ///
364 /// Has a default implementation, but you can override it and (optionally) call
365 /// `visit_for(node)` to continue traversing.
366 fn on_for(&mut self, node: &For) {
367 visit_for(self, node);
368 }
369
370 /// Invoked by a `Visitor` on entering into `ForwardArg` node.
371 ///
372 /// Has a default implementation, but you can override it and (optionally) call
373 /// `visit_forward_arg(node)` to continue traversing.
374 fn on_forward_arg(&mut self, node: &ForwardArg) {
375 visit_forward_arg(self, node);
376 }
377
378 /// Invoked by a `Visitor` on entering into `ForwardedArgs` node.
379 ///
380 /// Has a default implementation, but you can override it and (optionally) call
381 /// `visit_forwarded_args(node)` to continue traversing.
382 fn on_forwarded_args(&mut self, node: &ForwardedArgs) {
383 visit_forwarded_args(self, node);
384 }
385
386 /// Invoked by a `Visitor` on entering into `Gvar` node.
387 ///
388 /// Has a default implementation, but you can override it and (optionally) call
389 /// `visit_gvar(node)` to continue traversing.
390 fn on_gvar(&mut self, node: &Gvar) {
391 visit_gvar(self, node);
392 }
393
394 /// Invoked by a `Visitor` on entering into `Gvasgn` node.
395 ///
396 /// Has a default implementation, but you can override it and (optionally) call
397 /// `visit_gvasgn(node)` to continue traversing.
398 fn on_gvasgn(&mut self, node: &Gvasgn) {
399 visit_gvasgn(self, node);
400 }
401
402 /// Invoked by a `Visitor` on entering into `Hash` node.
403 ///
404 /// Has a default implementation, but you can override it and (optionally) call
405 /// `visit_hash(node)` to continue traversing.
406 fn on_hash(&mut self, node: &Hash) {
407 visit_hash(self, node);
408 }
409
410 /// Invoked by a `Visitor` on entering into `HashPattern` node.
411 ///
412 /// Has a default implementation, but you can override it and (optionally) call
413 /// `visit_hash_pattern(node)` to continue traversing.
414 fn on_hash_pattern(&mut self, node: &HashPattern) {
415 visit_hash_pattern(self, node);
416 }
417
418 /// Invoked by a `Visitor` on entering into `Heredoc` node.
419 ///
420 /// Has a default implementation, but you can override it and (optionally) call
421 /// `visit_heredoc(node)` to continue traversing.
422 fn on_heredoc(&mut self, node: &Heredoc) {
423 visit_heredoc(self, node);
424 }
425
426 /// Invoked by a `Visitor` on entering into `If` node.
427 ///
428 /// Has a default implementation, but you can override it and (optionally) call
429 /// `visit_if(node)` to continue traversing.
430 fn on_if(&mut self, node: &If) {
431 visit_if(self, node);
432 }
433
434 /// Invoked by a `Visitor` on entering into `IfGuard` node.
435 ///
436 /// Has a default implementation, but you can override it and (optionally) call
437 /// `visit_if_guard(node)` to continue traversing.
438 fn on_if_guard(&mut self, node: &IfGuard) {
439 visit_if_guard(self, node);
440 }
441
442 /// Invoked by a `Visitor` on entering into `IFlipFlop` node.
443 ///
444 /// Has a default implementation, but you can override it and (optionally) call
445 /// `visit_i_flip_flop(node)` to continue traversing.
446 fn on_i_flip_flop(&mut self, node: &IFlipFlop) {
447 visit_i_flip_flop(self, node);
448 }
449
450 /// Invoked by a `Visitor` on entering into `IfMod` node.
451 ///
452 /// Has a default implementation, but you can override it and (optionally) call
453 /// `visit_if_mod(node)` to continue traversing.
454 fn on_if_mod(&mut self, node: &IfMod) {
455 visit_if_mod(self, node);
456 }
457
458 /// Invoked by a `Visitor` on entering into `IfTernary` node.
459 ///
460 /// Has a default implementation, but you can override it and (optionally) call
461 /// `visit_if_ternary(node)` to continue traversing.
462 fn on_if_ternary(&mut self, node: &IfTernary) {
463 visit_if_ternary(self, node);
464 }
465
466 /// Invoked by a `Visitor` on entering into `Index` node.
467 ///
468 /// Has a default implementation, but you can override it and (optionally) call
469 /// `visit_index(node)` to continue traversing.
470 fn on_index(&mut self, node: &Index) {
471 visit_index(self, node);
472 }
473
474 /// Invoked by a `Visitor` on entering into `IndexAsgn` node.
475 ///
476 /// Has a default implementation, but you can override it and (optionally) call
477 /// `visit_index_asgn(node)` to continue traversing.
478 fn on_index_asgn(&mut self, node: &IndexAsgn) {
479 visit_index_asgn(self, node);
480 }
481
482 /// Invoked by a `Visitor` on entering into `InPattern` node.
483 ///
484 /// Has a default implementation, but you can override it and (optionally) call
485 /// `visit_in_pattern(node)` to continue traversing.
486 fn on_in_pattern(&mut self, node: &InPattern) {
487 visit_in_pattern(self, node);
488 }
489
490 /// Invoked by a `Visitor` on entering into `Int` node.
491 ///
492 /// Has a default implementation, but you can override it and (optionally) call
493 /// `visit_int(node)` to continue traversing.
494 fn on_int(&mut self, node: &Int) {
495 visit_int(self, node);
496 }
497
498 /// Invoked by a `Visitor` on entering into `Irange` node.
499 ///
500 /// Has a default implementation, but you can override it and (optionally) call
501 /// `visit_irange(node)` to continue traversing.
502 fn on_irange(&mut self, node: &Irange) {
503 visit_irange(self, node);
504 }
505
506 /// Invoked by a `Visitor` on entering into `Ivar` node.
507 ///
508 /// Has a default implementation, but you can override it and (optionally) call
509 /// `visit_ivar(node)` to continue traversing.
510 fn on_ivar(&mut self, node: &Ivar) {
511 visit_ivar(self, node);
512 }
513
514 /// Invoked by a `Visitor` on entering into `Ivasgn` node.
515 ///
516 /// Has a default implementation, but you can override it and (optionally) call
517 /// `visit_ivasgn(node)` to continue traversing.
518 fn on_ivasgn(&mut self, node: &Ivasgn) {
519 visit_ivasgn(self, node);
520 }
521
522 /// Invoked by a `Visitor` on entering into `Kwarg` node.
523 ///
524 /// Has a default implementation, but you can override it and (optionally) call
525 /// `visit_kwarg(node)` to continue traversing.
526 fn on_kwarg(&mut self, node: &Kwarg) {
527 visit_kwarg(self, node);
528 }
529
530 /// Invoked by a `Visitor` on entering into `Kwargs` node.
531 ///
532 /// Has a default implementation, but you can override it and (optionally) call
533 /// `visit_kwargs(node)` to continue traversing.
534 fn on_kwargs(&mut self, node: &Kwargs) {
535 visit_kwargs(self, node);
536 }
537
538 /// Invoked by a `Visitor` on entering into `KwBegin` node.
539 ///
540 /// Has a default implementation, but you can override it and (optionally) call
541 /// `visit_kw_begin(node)` to continue traversing.
542 fn on_kw_begin(&mut self, node: &KwBegin) {
543 visit_kw_begin(self, node);
544 }
545
546 /// Invoked by a `Visitor` on entering into `Kwnilarg` node.
547 ///
548 /// Has a default implementation, but you can override it and (optionally) call
549 /// `visit_kwnilarg(node)` to continue traversing.
550 fn on_kwnilarg(&mut self, node: &Kwnilarg) {
551 visit_kwnilarg(self, node);
552 }
553
554 /// Invoked by a `Visitor` on entering into `Kwoptarg` node.
555 ///
556 /// Has a default implementation, but you can override it and (optionally) call
557 /// `visit_kwoptarg(node)` to continue traversing.
558 fn on_kwoptarg(&mut self, node: &Kwoptarg) {
559 visit_kwoptarg(self, node);
560 }
561
562 /// Invoked by a `Visitor` on entering into `Kwrestarg` node.
563 ///
564 /// Has a default implementation, but you can override it and (optionally) call
565 /// `visit_kwrestarg(node)` to continue traversing.
566 fn on_kwrestarg(&mut self, node: &Kwrestarg) {
567 visit_kwrestarg(self, node);
568 }
569
570 /// Invoked by a `Visitor` on entering into `Kwsplat` node.
571 ///
572 /// Has a default implementation, but you can override it and (optionally) call
573 /// `visit_kwsplat(node)` to continue traversing.
574 fn on_kwsplat(&mut self, node: &Kwsplat) {
575 visit_kwsplat(self, node);
576 }
577
578 /// Invoked by a `Visitor` on entering into `Lambda` node.
579 ///
580 /// Has a default implementation, but you can override it and (optionally) call
581 /// `visit_lambda(node)` to continue traversing.
582 fn on_lambda(&mut self, node: &Lambda) {
583 visit_lambda(self, node);
584 }
585
586 /// Invoked by a `Visitor` on entering into `Line` node.
587 ///
588 /// Has a default implementation, but you can override it and (optionally) call
589 /// `visit_line(node)` to continue traversing.
590 fn on_line(&mut self, node: &Line) {
591 visit_line(self, node);
592 }
593
594 /// Invoked by a `Visitor` on entering into `Lvar` node.
595 ///
596 /// Has a default implementation, but you can override it and (optionally) call
597 /// `visit_lvar(node)` to continue traversing.
598 fn on_lvar(&mut self, node: &Lvar) {
599 visit_lvar(self, node);
600 }
601
602 /// Invoked by a `Visitor` on entering into `Lvasgn` node.
603 ///
604 /// Has a default implementation, but you can override it and (optionally) call
605 /// `visit_lvasgn(node)` to continue traversing.
606 fn on_lvasgn(&mut self, node: &Lvasgn) {
607 visit_lvasgn(self, node);
608 }
609
610 /// Invoked by a `Visitor` on entering into `Masgn` node.
611 ///
612 /// Has a default implementation, but you can override it and (optionally) call
613 /// `visit_masgn(node)` to continue traversing.
614 fn on_masgn(&mut self, node: &Masgn) {
615 visit_masgn(self, node);
616 }
617
618 /// Invoked by a `Visitor` on entering into `MatchAlt` node.
619 ///
620 /// Has a default implementation, but you can override it and (optionally) call
621 /// `visit_match_alt(node)` to continue traversing.
622 fn on_match_alt(&mut self, node: &MatchAlt) {
623 visit_match_alt(self, node);
624 }
625
626 /// Invoked by a `Visitor` on entering into `MatchAs` node.
627 ///
628 /// Has a default implementation, but you can override it and (optionally) call
629 /// `visit_match_as(node)` to continue traversing.
630 fn on_match_as(&mut self, node: &MatchAs) {
631 visit_match_as(self, node);
632 }
633
634 /// Invoked by a `Visitor` on entering into `MatchCurrentLine` node.
635 ///
636 /// Has a default implementation, but you can override it and (optionally) call
637 /// `visit_match_current_line(node)` to continue traversing.
638 fn on_match_current_line(&mut self, node: &MatchCurrentLine) {
639 visit_match_current_line(self, node);
640 }
641
642 /// Invoked by a `Visitor` on entering into `MatchNilPattern` node.
643 ///
644 /// Has a default implementation, but you can override it and (optionally) call
645 /// `visit_match_nil_pattern(node)` to continue traversing.
646 fn on_match_nil_pattern(&mut self, node: &MatchNilPattern) {
647 visit_match_nil_pattern(self, node);
648 }
649
650 /// Invoked by a `Visitor` on entering into `MatchPattern` node.
651 ///
652 /// Has a default implementation, but you can override it and (optionally) call
653 /// `visit_match_pattern(node)` to continue traversing.
654 fn on_match_pattern(&mut self, node: &MatchPattern) {
655 visit_match_pattern(self, node);
656 }
657
658 /// Invoked by a `Visitor` on entering into `MatchPatternP` node.
659 ///
660 /// Has a default implementation, but you can override it and (optionally) call
661 /// `visit_match_pattern_p(node)` to continue traversing.
662 fn on_match_pattern_p(&mut self, node: &MatchPatternP) {
663 visit_match_pattern_p(self, node);
664 }
665
666 /// Invoked by a `Visitor` on entering into `MatchRest` node.
667 ///
668 /// Has a default implementation, but you can override it and (optionally) call
669 /// `visit_match_rest(node)` to continue traversing.
670 fn on_match_rest(&mut self, node: &MatchRest) {
671 visit_match_rest(self, node);
672 }
673
674 /// Invoked by a `Visitor` on entering into `MatchVar` node.
675 ///
676 /// Has a default implementation, but you can override it and (optionally) call
677 /// `visit_match_var(node)` to continue traversing.
678 fn on_match_var(&mut self, node: &MatchVar) {
679 visit_match_var(self, node);
680 }
681
682 /// Invoked by a `Visitor` on entering into `MatchWithLvasgn` node.
683 ///
684 /// Has a default implementation, but you can override it and (optionally) call
685 /// `visit_match_with_lvasgn(node)` to continue traversing.
686 fn on_match_with_lvasgn(&mut self, node: &MatchWithLvasgn) {
687 visit_match_with_lvasgn(self, node);
688 }
689
690 /// Invoked by a `Visitor` on entering into `Mlhs` node.
691 ///
692 /// Has a default implementation, but you can override it and (optionally) call
693 /// `visit_mlhs(node)` to continue traversing.
694 fn on_mlhs(&mut self, node: &Mlhs) {
695 visit_mlhs(self, node);
696 }
697
698 /// Invoked by a `Visitor` on entering into `Module` node.
699 ///
700 /// Has a default implementation, but you can override it and (optionally) call
701 /// `visit_module(node)` to continue traversing.
702 fn on_module(&mut self, node: &Module) {
703 visit_module(self, node);
704 }
705
706 /// Invoked by a `Visitor` on entering into `Next` node.
707 ///
708 /// Has a default implementation, but you can override it and (optionally) call
709 /// `visit_next(node)` to continue traversing.
710 fn on_next(&mut self, node: &Next) {
711 visit_next(self, node);
712 }
713
714 /// Invoked by a `Visitor` on entering into `Nil` node.
715 ///
716 /// Has a default implementation, but you can override it and (optionally) call
717 /// `visit_nil(node)` to continue traversing.
718 fn on_nil(&mut self, node: &Nil) {
719 visit_nil(self, node);
720 }
721
722 /// Invoked by a `Visitor` on entering into `NthRef` node.
723 ///
724 /// Has a default implementation, but you can override it and (optionally) call
725 /// `visit_nth_ref(node)` to continue traversing.
726 fn on_nth_ref(&mut self, node: &NthRef) {
727 visit_nth_ref(self, node);
728 }
729
730 /// Invoked by a `Visitor` on entering into `Numblock` node.
731 ///
732 /// Has a default implementation, but you can override it and (optionally) call
733 /// `visit_numblock(node)` to continue traversing.
734 fn on_numblock(&mut self, node: &Numblock) {
735 visit_numblock(self, node);
736 }
737
738 /// Invoked by a `Visitor` on entering into `OpAsgn` node.
739 ///
740 /// Has a default implementation, but you can override it and (optionally) call
741 /// `visit_op_asgn(node)` to continue traversing.
742 fn on_op_asgn(&mut self, node: &OpAsgn) {
743 visit_op_asgn(self, node);
744 }
745
746 /// Invoked by a `Visitor` on entering into `Optarg` node.
747 ///
748 /// Has a default implementation, but you can override it and (optionally) call
749 /// `visit_optarg(node)` to continue traversing.
750 fn on_optarg(&mut self, node: &Optarg) {
751 visit_optarg(self, node);
752 }
753
754 /// Invoked by a `Visitor` on entering into `Or` node.
755 ///
756 /// Has a default implementation, but you can override it and (optionally) call
757 /// `visit_or(node)` to continue traversing.
758 fn on_or(&mut self, node: &Or) {
759 visit_or(self, node);
760 }
761
762 /// Invoked by a `Visitor` on entering into `OrAsgn` node.
763 ///
764 /// Has a default implementation, but you can override it and (optionally) call
765 /// `visit_or_asgn(node)` to continue traversing.
766 fn on_or_asgn(&mut self, node: &OrAsgn) {
767 visit_or_asgn(self, node);
768 }
769
770 /// Invoked by a `Visitor` on entering into `Pair` node.
771 ///
772 /// Has a default implementation, but you can override it and (optionally) call
773 /// `visit_pair(node)` to continue traversing.
774 fn on_pair(&mut self, node: &Pair) {
775 visit_pair(self, node);
776 }
777
778 /// Invoked by a `Visitor` on entering into `Pin` node.
779 ///
780 /// Has a default implementation, but you can override it and (optionally) call
781 /// `visit_pin(node)` to continue traversing.
782 fn on_pin(&mut self, node: &Pin) {
783 visit_pin(self, node);
784 }
785
786 /// Invoked by a `Visitor` on entering into `Postexe` node.
787 ///
788 /// Has a default implementation, but you can override it and (optionally) call
789 /// `visit_postexe(node)` to continue traversing.
790 fn on_postexe(&mut self, node: &Postexe) {
791 visit_postexe(self, node);
792 }
793
794 /// Invoked by a `Visitor` on entering into `Preexe` node.
795 ///
796 /// Has a default implementation, but you can override it and (optionally) call
797 /// `visit_preexe(node)` to continue traversing.
798 fn on_preexe(&mut self, node: &Preexe) {
799 visit_preexe(self, node);
800 }
801
802 /// Invoked by a `Visitor` on entering into `Procarg0` node.
803 ///
804 /// Has a default implementation, but you can override it and (optionally) call
805 /// `visit_procarg0(node)` to continue traversing.
806 fn on_procarg0(&mut self, node: &Procarg0) {
807 visit_procarg0(self, node);
808 }
809
810 /// Invoked by a `Visitor` on entering into `Rational` node.
811 ///
812 /// Has a default implementation, but you can override it and (optionally) call
813 /// `visit_rational(node)` to continue traversing.
814 fn on_rational(&mut self, node: &Rational) {
815 visit_rational(self, node);
816 }
817
818 /// Invoked by a `Visitor` on entering into `Redo` node.
819 ///
820 /// Has a default implementation, but you can override it and (optionally) call
821 /// `visit_redo(node)` to continue traversing.
822 fn on_redo(&mut self, node: &Redo) {
823 visit_redo(self, node);
824 }
825
826 /// Invoked by a `Visitor` on entering into `Regexp` node.
827 ///
828 /// Has a default implementation, but you can override it and (optionally) call
829 /// `visit_regexp(node)` to continue traversing.
830 fn on_regexp(&mut self, node: &Regexp) {
831 visit_regexp(self, node);
832 }
833
834 /// Invoked by a `Visitor` on entering into `RegOpt` node.
835 ///
836 /// Has a default implementation, but you can override it and (optionally) call
837 /// `visit_reg_opt(node)` to continue traversing.
838 fn on_reg_opt(&mut self, node: &RegOpt) {
839 visit_reg_opt(self, node);
840 }
841
842 /// Invoked by a `Visitor` on entering into `Rescue` node.
843 ///
844 /// Has a default implementation, but you can override it and (optionally) call
845 /// `visit_rescue(node)` to continue traversing.
846 fn on_rescue(&mut self, node: &Rescue) {
847 visit_rescue(self, node);
848 }
849
850 /// Invoked by a `Visitor` on entering into `RescueBody` node.
851 ///
852 /// Has a default implementation, but you can override it and (optionally) call
853 /// `visit_rescue_body(node)` to continue traversing.
854 fn on_rescue_body(&mut self, node: &RescueBody) {
855 visit_rescue_body(self, node);
856 }
857
858 /// Invoked by a `Visitor` on entering into `Restarg` node.
859 ///
860 /// Has a default implementation, but you can override it and (optionally) call
861 /// `visit_restarg(node)` to continue traversing.
862 fn on_restarg(&mut self, node: &Restarg) {
863 visit_restarg(self, node);
864 }
865
866 /// Invoked by a `Visitor` on entering into `Retry` node.
867 ///
868 /// Has a default implementation, but you can override it and (optionally) call
869 /// `visit_retry(node)` to continue traversing.
870 fn on_retry(&mut self, node: &Retry) {
871 visit_retry(self, node);
872 }
873
874 /// Invoked by a `Visitor` on entering into `Return` node.
875 ///
876 /// Has a default implementation, but you can override it and (optionally) call
877 /// `visit_return(node)` to continue traversing.
878 fn on_return(&mut self, node: &Return) {
879 visit_return(self, node);
880 }
881
882 /// Invoked by a `Visitor` on entering into `SClass` node.
883 ///
884 /// Has a default implementation, but you can override it and (optionally) call
885 /// `visit_s_class(node)` to continue traversing.
886 fn on_s_class(&mut self, node: &SClass) {
887 visit_s_class(self, node);
888 }
889
890 /// Invoked by a `Visitor` on entering into `Self_` node.
891 ///
892 /// Has a default implementation, but you can override it and (optionally) call
893 /// `visit_self_(node)` to continue traversing.
894 fn on_self_(&mut self, node: &Self_) {
895 visit_self_(self, node);
896 }
897
898 /// Invoked by a `Visitor` on entering into `Send` node.
899 ///
900 /// Has a default implementation, but you can override it and (optionally) call
901 /// `visit_send(node)` to continue traversing.
902 fn on_send(&mut self, node: &Send) {
903 visit_send(self, node);
904 }
905
906 /// Invoked by a `Visitor` on entering into `Shadowarg` node.
907 ///
908 /// Has a default implementation, but you can override it and (optionally) call
909 /// `visit_shadowarg(node)` to continue traversing.
910 fn on_shadowarg(&mut self, node: &Shadowarg) {
911 visit_shadowarg(self, node);
912 }
913
914 /// Invoked by a `Visitor` on entering into `Splat` node.
915 ///
916 /// Has a default implementation, but you can override it and (optionally) call
917 /// `visit_splat(node)` to continue traversing.
918 fn on_splat(&mut self, node: &Splat) {
919 visit_splat(self, node);
920 }
921
922 /// Invoked by a `Visitor` on entering into `Str` node.
923 ///
924 /// Has a default implementation, but you can override it and (optionally) call
925 /// `visit_str(node)` to continue traversing.
926 fn on_str(&mut self, node: &Str) {
927 visit_str(self, node);
928 }
929
930 /// Invoked by a `Visitor` on entering into `Super` node.
931 ///
932 /// Has a default implementation, but you can override it and (optionally) call
933 /// `visit_super(node)` to continue traversing.
934 fn on_super(&mut self, node: &Super) {
935 visit_super(self, node);
936 }
937
938 /// Invoked by a `Visitor` on entering into `Sym` node.
939 ///
940 /// Has a default implementation, but you can override it and (optionally) call
941 /// `visit_sym(node)` to continue traversing.
942 fn on_sym(&mut self, node: &Sym) {
943 visit_sym(self, node);
944 }
945
946 /// Invoked by a `Visitor` on entering into `True` node.
947 ///
948 /// Has a default implementation, but you can override it and (optionally) call
949 /// `visit_true(node)` to continue traversing.
950 fn on_true(&mut self, node: &True) {
951 visit_true(self, node);
952 }
953
954 /// Invoked by a `Visitor` on entering into `Undef` node.
955 ///
956 /// Has a default implementation, but you can override it and (optionally) call
957 /// `visit_undef(node)` to continue traversing.
958 fn on_undef(&mut self, node: &Undef) {
959 visit_undef(self, node);
960 }
961
962 /// Invoked by a `Visitor` on entering into `UnlessGuard` node.
963 ///
964 /// Has a default implementation, but you can override it and (optionally) call
965 /// `visit_unless_guard(node)` to continue traversing.
966 fn on_unless_guard(&mut self, node: &UnlessGuard) {
967 visit_unless_guard(self, node);
968 }
969
970 /// Invoked by a `Visitor` on entering into `Until` node.
971 ///
972 /// Has a default implementation, but you can override it and (optionally) call
973 /// `visit_until(node)` to continue traversing.
974 fn on_until(&mut self, node: &Until) {
975 visit_until(self, node);
976 }
977
978 /// Invoked by a `Visitor` on entering into `UntilPost` node.
979 ///
980 /// Has a default implementation, but you can override it and (optionally) call
981 /// `visit_until_post(node)` to continue traversing.
982 fn on_until_post(&mut self, node: &UntilPost) {
983 visit_until_post(self, node);
984 }
985
986 /// Invoked by a `Visitor` on entering into `When` node.
987 ///
988 /// Has a default implementation, but you can override it and (optionally) call
989 /// `visit_when(node)` to continue traversing.
990 fn on_when(&mut self, node: &When) {
991 visit_when(self, node);
992 }
993
994 /// Invoked by a `Visitor` on entering into `While` node.
995 ///
996 /// Has a default implementation, but you can override it and (optionally) call
997 /// `visit_while(node)` to continue traversing.
998 fn on_while(&mut self, node: &While) {
999 visit_while(self, node);
1000 }
1001
1002 /// Invoked by a `Visitor` on entering into `WhilePost` node.
1003 ///
1004 /// Has a default implementation, but you can override it and (optionally) call
1005 /// `visit_while_post(node)` to continue traversing.
1006 fn on_while_post(&mut self, node: &WhilePost) {
1007 visit_while_post(self, node);
1008 }
1009
1010 /// Invoked by a `Visitor` on entering into `XHeredoc` node.
1011 ///
1012 /// Has a default implementation, but you can override it and (optionally) call
1013 /// `visit_x_heredoc(node)` to continue traversing.
1014 fn on_x_heredoc(&mut self, node: &XHeredoc) {
1015 visit_x_heredoc(self, node);
1016 }
1017
1018 /// Invoked by a `Visitor` on entering into `Xstr` node.
1019 ///
1020 /// Has a default implementation, but you can override it and (optionally) call
1021 /// `visit_xstr(node)` to continue traversing.
1022 fn on_xstr(&mut self, node: &Xstr) {
1023 visit_xstr(self, node);
1024 }
1025
1026 /// Invoked by a `Visitor` on entering into `Yield` node.
1027 ///
1028 /// Has a default implementation, but you can override it and (optionally) call
1029 /// `visit_yield(node)` to continue traversing.
1030 fn on_yield(&mut self, node: &Yield) {
1031 visit_yield(self, node);
1032 }
1033
1034 /// Invoked by a `Visitor` on entering into `ZSuper` node.
1035 ///
1036 /// Has a default implementation, but you can override it and (optionally) call
1037 /// `visit_z_super(node)` to continue traversing.
1038 fn on_z_super(&mut self, node: &ZSuper) {
1039 visit_z_super(self, node);
1040 }
1041
1042
1043 /// Generic `visit` router that calls `on_<type>` under the hood
1044 fn visit(&mut self, node: &Node) {
1045 match node {
1046 Node::Alias(inner) => {
1047 self.on_alias(inner);
1048 }
1049 Node::And(inner) => {
1050 self.on_and(inner);
1051 }
1052 Node::AndAsgn(inner) => {
1053 self.on_and_asgn(inner);
1054 }
1055 Node::Arg(inner) => {
1056 self.on_arg(inner);
1057 }
1058 Node::Args(inner) => {
1059 self.on_args(inner);
1060 }
1061 Node::Array(inner) => {
1062 self.on_array(inner);
1063 }
1064 Node::ArrayPattern(inner) => {
1065 self.on_array_pattern(inner);
1066 }
1067 Node::ArrayPatternWithTail(inner) => {
1068 self.on_array_pattern_with_tail(inner);
1069 }
1070 Node::BackRef(inner) => {
1071 self.on_back_ref(inner);
1072 }
1073 Node::Begin(inner) => {
1074 self.on_begin(inner);
1075 }
1076 Node::Block(inner) => {
1077 self.on_block(inner);
1078 }
1079 Node::Blockarg(inner) => {
1080 self.on_blockarg(inner);
1081 }
1082 Node::BlockPass(inner) => {
1083 self.on_block_pass(inner);
1084 }
1085 Node::Break(inner) => {
1086 self.on_break(inner);
1087 }
1088 Node::Case(inner) => {
1089 self.on_case(inner);
1090 }
1091 Node::CaseMatch(inner) => {
1092 self.on_case_match(inner);
1093 }
1094 Node::Casgn(inner) => {
1095 self.on_casgn(inner);
1096 }
1097 Node::Cbase(inner) => {
1098 self.on_cbase(inner);
1099 }
1100 Node::Class(inner) => {
1101 self.on_class(inner);
1102 }
1103 Node::Complex(inner) => {
1104 self.on_complex(inner);
1105 }
1106 Node::Const(inner) => {
1107 self.on_const(inner);
1108 }
1109 Node::ConstPattern(inner) => {
1110 self.on_const_pattern(inner);
1111 }
1112 Node::CSend(inner) => {
1113 self.on_c_send(inner);
1114 }
1115 Node::Cvar(inner) => {
1116 self.on_cvar(inner);
1117 }
1118 Node::Cvasgn(inner) => {
1119 self.on_cvasgn(inner);
1120 }
1121 Node::Def(inner) => {
1122 self.on_def(inner);
1123 }
1124 Node::Defined(inner) => {
1125 self.on_defined(inner);
1126 }
1127 Node::Defs(inner) => {
1128 self.on_defs(inner);
1129 }
1130 Node::Dstr(inner) => {
1131 self.on_dstr(inner);
1132 }
1133 Node::Dsym(inner) => {
1134 self.on_dsym(inner);
1135 }
1136 Node::EFlipFlop(inner) => {
1137 self.on_e_flip_flop(inner);
1138 }
1139 Node::EmptyElse(inner) => {
1140 self.on_empty_else(inner);
1141 }
1142 Node::Encoding(inner) => {
1143 self.on_encoding(inner);
1144 }
1145 Node::Ensure(inner) => {
1146 self.on_ensure(inner);
1147 }
1148 Node::Erange(inner) => {
1149 self.on_erange(inner);
1150 }
1151 Node::False(inner) => {
1152 self.on_false(inner);
1153 }
1154 Node::File(inner) => {
1155 self.on_file(inner);
1156 }
1157 Node::FindPattern(inner) => {
1158 self.on_find_pattern(inner);
1159 }
1160 Node::Float(inner) => {
1161 self.on_float(inner);
1162 }
1163 Node::For(inner) => {
1164 self.on_for(inner);
1165 }
1166 Node::ForwardArg(inner) => {
1167 self.on_forward_arg(inner);
1168 }
1169 Node::ForwardedArgs(inner) => {
1170 self.on_forwarded_args(inner);
1171 }
1172 Node::Gvar(inner) => {
1173 self.on_gvar(inner);
1174 }
1175 Node::Gvasgn(inner) => {
1176 self.on_gvasgn(inner);
1177 }
1178 Node::Hash(inner) => {
1179 self.on_hash(inner);
1180 }
1181 Node::HashPattern(inner) => {
1182 self.on_hash_pattern(inner);
1183 }
1184 Node::Heredoc(inner) => {
1185 self.on_heredoc(inner);
1186 }
1187 Node::If(inner) => {
1188 self.on_if(inner);
1189 }
1190 Node::IfGuard(inner) => {
1191 self.on_if_guard(inner);
1192 }
1193 Node::IFlipFlop(inner) => {
1194 self.on_i_flip_flop(inner);
1195 }
1196 Node::IfMod(inner) => {
1197 self.on_if_mod(inner);
1198 }
1199 Node::IfTernary(inner) => {
1200 self.on_if_ternary(inner);
1201 }
1202 Node::Index(inner) => {
1203 self.on_index(inner);
1204 }
1205 Node::IndexAsgn(inner) => {
1206 self.on_index_asgn(inner);
1207 }
1208 Node::InPattern(inner) => {
1209 self.on_in_pattern(inner);
1210 }
1211 Node::Int(inner) => {
1212 self.on_int(inner);
1213 }
1214 Node::Irange(inner) => {
1215 self.on_irange(inner);
1216 }
1217 Node::Ivar(inner) => {
1218 self.on_ivar(inner);
1219 }
1220 Node::Ivasgn(inner) => {
1221 self.on_ivasgn(inner);
1222 }
1223 Node::Kwarg(inner) => {
1224 self.on_kwarg(inner);
1225 }
1226 Node::Kwargs(inner) => {
1227 self.on_kwargs(inner);
1228 }
1229 Node::KwBegin(inner) => {
1230 self.on_kw_begin(inner);
1231 }
1232 Node::Kwnilarg(inner) => {
1233 self.on_kwnilarg(inner);
1234 }
1235 Node::Kwoptarg(inner) => {
1236 self.on_kwoptarg(inner);
1237 }
1238 Node::Kwrestarg(inner) => {
1239 self.on_kwrestarg(inner);
1240 }
1241 Node::Kwsplat(inner) => {
1242 self.on_kwsplat(inner);
1243 }
1244 Node::Lambda(inner) => {
1245 self.on_lambda(inner);
1246 }
1247 Node::Line(inner) => {
1248 self.on_line(inner);
1249 }
1250 Node::Lvar(inner) => {
1251 self.on_lvar(inner);
1252 }
1253 Node::Lvasgn(inner) => {
1254 self.on_lvasgn(inner);
1255 }
1256 Node::Masgn(inner) => {
1257 self.on_masgn(inner);
1258 }
1259 Node::MatchAlt(inner) => {
1260 self.on_match_alt(inner);
1261 }
1262 Node::MatchAs(inner) => {
1263 self.on_match_as(inner);
1264 }
1265 Node::MatchCurrentLine(inner) => {
1266 self.on_match_current_line(inner);
1267 }
1268 Node::MatchNilPattern(inner) => {
1269 self.on_match_nil_pattern(inner);
1270 }
1271 Node::MatchPattern(inner) => {
1272 self.on_match_pattern(inner);
1273 }
1274 Node::MatchPatternP(inner) => {
1275 self.on_match_pattern_p(inner);
1276 }
1277 Node::MatchRest(inner) => {
1278 self.on_match_rest(inner);
1279 }
1280 Node::MatchVar(inner) => {
1281 self.on_match_var(inner);
1282 }
1283 Node::MatchWithLvasgn(inner) => {
1284 self.on_match_with_lvasgn(inner);
1285 }
1286 Node::Mlhs(inner) => {
1287 self.on_mlhs(inner);
1288 }
1289 Node::Module(inner) => {
1290 self.on_module(inner);
1291 }
1292 Node::Next(inner) => {
1293 self.on_next(inner);
1294 }
1295 Node::Nil(inner) => {
1296 self.on_nil(inner);
1297 }
1298 Node::NthRef(inner) => {
1299 self.on_nth_ref(inner);
1300 }
1301 Node::Numblock(inner) => {
1302 self.on_numblock(inner);
1303 }
1304 Node::OpAsgn(inner) => {
1305 self.on_op_asgn(inner);
1306 }
1307 Node::Optarg(inner) => {
1308 self.on_optarg(inner);
1309 }
1310 Node::Or(inner) => {
1311 self.on_or(inner);
1312 }
1313 Node::OrAsgn(inner) => {
1314 self.on_or_asgn(inner);
1315 }
1316 Node::Pair(inner) => {
1317 self.on_pair(inner);
1318 }
1319 Node::Pin(inner) => {
1320 self.on_pin(inner);
1321 }
1322 Node::Postexe(inner) => {
1323 self.on_postexe(inner);
1324 }
1325 Node::Preexe(inner) => {
1326 self.on_preexe(inner);
1327 }
1328 Node::Procarg0(inner) => {
1329 self.on_procarg0(inner);
1330 }
1331 Node::Rational(inner) => {
1332 self.on_rational(inner);
1333 }
1334 Node::Redo(inner) => {
1335 self.on_redo(inner);
1336 }
1337 Node::Regexp(inner) => {
1338 self.on_regexp(inner);
1339 }
1340 Node::RegOpt(inner) => {
1341 self.on_reg_opt(inner);
1342 }
1343 Node::Rescue(inner) => {
1344 self.on_rescue(inner);
1345 }
1346 Node::RescueBody(inner) => {
1347 self.on_rescue_body(inner);
1348 }
1349 Node::Restarg(inner) => {
1350 self.on_restarg(inner);
1351 }
1352 Node::Retry(inner) => {
1353 self.on_retry(inner);
1354 }
1355 Node::Return(inner) => {
1356 self.on_return(inner);
1357 }
1358 Node::SClass(inner) => {
1359 self.on_s_class(inner);
1360 }
1361 Node::Self_(inner) => {
1362 self.on_self_(inner);
1363 }
1364 Node::Send(inner) => {
1365 self.on_send(inner);
1366 }
1367 Node::Shadowarg(inner) => {
1368 self.on_shadowarg(inner);
1369 }
1370 Node::Splat(inner) => {
1371 self.on_splat(inner);
1372 }
1373 Node::Str(inner) => {
1374 self.on_str(inner);
1375 }
1376 Node::Super(inner) => {
1377 self.on_super(inner);
1378 }
1379 Node::Sym(inner) => {
1380 self.on_sym(inner);
1381 }
1382 Node::True(inner) => {
1383 self.on_true(inner);
1384 }
1385 Node::Undef(inner) => {
1386 self.on_undef(inner);
1387 }
1388 Node::UnlessGuard(inner) => {
1389 self.on_unless_guard(inner);
1390 }
1391 Node::Until(inner) => {
1392 self.on_until(inner);
1393 }
1394 Node::UntilPost(inner) => {
1395 self.on_until_post(inner);
1396 }
1397 Node::When(inner) => {
1398 self.on_when(inner);
1399 }
1400 Node::While(inner) => {
1401 self.on_while(inner);
1402 }
1403 Node::WhilePost(inner) => {
1404 self.on_while_post(inner);
1405 }
1406 Node::XHeredoc(inner) => {
1407 self.on_x_heredoc(inner);
1408 }
1409 Node::Xstr(inner) => {
1410 self.on_xstr(inner);
1411 }
1412 Node::Yield(inner) => {
1413 self.on_yield(inner);
1414 }
1415 Node::ZSuper(inner) => {
1416 self.on_z_super(inner);
1417 }
1418
1419 }
1420 }
1421}
1422
1423
1424/// Visits all children of Alias node
1425#[allow(unused_variables)]
1426pub fn visit_alias<V: Visitor>(visitor: &mut V, node: &Alias) {
1427 visitor.visit(&node.to);
1428 visitor.visit(&node.from);
1429 // skip keyword_l
1430 // skip expression_l
1431
1432}
1433
1434/// Visits all children of And node
1435#[allow(unused_variables)]
1436pub fn visit_and<V: Visitor>(visitor: &mut V, node: &And) {
1437 visitor.visit(&node.lhs);
1438 visitor.visit(&node.rhs);
1439 // skip operator_l
1440 // skip expression_l
1441
1442}
1443
1444/// Visits all children of AndAsgn node
1445#[allow(unused_variables)]
1446pub fn visit_and_asgn<V: Visitor>(visitor: &mut V, node: &AndAsgn) {
1447 visitor.visit(&node.recv);
1448 visitor.visit(&node.value);
1449 // skip operator_l
1450 // skip expression_l
1451
1452}
1453
1454/// Visits all children of Arg node
1455#[allow(unused_variables)]
1456pub fn visit_arg<V: Visitor>(visitor: &mut V, node: &Arg) {
1457 // skip name
1458 // skip expression_l
1459
1460}
1461
1462/// Visits all children of Args node
1463#[allow(unused_variables)]
1464pub fn visit_args<V: Visitor>(visitor: &mut V, node: &Args) {
1465 for item in &node.args { visitor.visit(item); }
1466 // skip expression_l
1467 // skip begin_l
1468 // skip end_l
1469
1470}
1471
1472/// Visits all children of Array node
1473#[allow(unused_variables)]
1474pub fn visit_array<V: Visitor>(visitor: &mut V, node: &Array) {
1475 for item in &node.elements { visitor.visit(item); }
1476 // skip begin_l
1477 // skip end_l
1478 // skip expression_l
1479
1480}
1481
1482/// Visits all children of ArrayPattern node
1483#[allow(unused_variables)]
1484pub fn visit_array_pattern<V: Visitor>(visitor: &mut V, node: &ArrayPattern) {
1485 for item in &node.elements { visitor.visit(item); }
1486 // skip begin_l
1487 // skip end_l
1488 // skip expression_l
1489
1490}
1491
1492/// Visits all children of ArrayPatternWithTail node
1493#[allow(unused_variables)]
1494pub fn visit_array_pattern_with_tail<V: Visitor>(visitor: &mut V, node: &ArrayPatternWithTail) {
1495 for item in &node.elements { visitor.visit(item); }
1496 // skip begin_l
1497 // skip end_l
1498 // skip expression_l
1499
1500}
1501
1502/// Visits all children of BackRef node
1503#[allow(unused_variables)]
1504pub fn visit_back_ref<V: Visitor>(visitor: &mut V, node: &BackRef) {
1505 // skip name
1506 // skip expression_l
1507
1508}
1509
1510/// Visits all children of Begin node
1511#[allow(unused_variables)]
1512pub fn visit_begin<V: Visitor>(visitor: &mut V, node: &Begin) {
1513 for item in &node.statements { visitor.visit(item); }
1514 // skip begin_l
1515 // skip end_l
1516 // skip expression_l
1517
1518}
1519
1520/// Visits all children of Block node
1521#[allow(unused_variables)]
1522pub fn visit_block<V: Visitor>(visitor: &mut V, node: &Block) {
1523 visitor.visit(&node.call);
1524 if let Some(inner) = node.args.as_ref() { visitor.visit(inner); }
1525 if let Some(inner) = node.body.as_ref() { visitor.visit(inner); }
1526 // skip begin_l
1527 // skip end_l
1528 // skip expression_l
1529
1530}
1531
1532/// Visits all children of Blockarg node
1533#[allow(unused_variables)]
1534pub fn visit_blockarg<V: Visitor>(visitor: &mut V, node: &Blockarg) {
1535 // skip name
1536 // skip operator_l
1537 // skip name_l
1538 // skip expression_l
1539
1540}
1541
1542/// Visits all children of BlockPass node
1543#[allow(unused_variables)]
1544pub fn visit_block_pass<V: Visitor>(visitor: &mut V, node: &BlockPass) {
1545 if let Some(inner) = node.value.as_ref() { visitor.visit(inner); }
1546 // skip operator_l
1547 // skip expression_l
1548
1549}
1550
1551/// Visits all children of Break node
1552#[allow(unused_variables)]
1553pub fn visit_break<V: Visitor>(visitor: &mut V, node: &Break) {
1554 for item in &node.args { visitor.visit(item); }
1555 // skip keyword_l
1556 // skip expression_l
1557
1558}
1559
1560/// Visits all children of Case node
1561#[allow(unused_variables)]
1562pub fn visit_case<V: Visitor>(visitor: &mut V, node: &Case) {
1563 if let Some(inner) = node.expr.as_ref() { visitor.visit(inner); }
1564 for item in &node.when_bodies { visitor.visit(item); }
1565 if let Some(inner) = node.else_body.as_ref() { visitor.visit(inner); }
1566 // skip keyword_l
1567 // skip else_l
1568 // skip end_l
1569 // skip expression_l
1570
1571}
1572
1573/// Visits all children of CaseMatch node
1574#[allow(unused_variables)]
1575pub fn visit_case_match<V: Visitor>(visitor: &mut V, node: &CaseMatch) {
1576 visitor.visit(&node.expr);
1577 for item in &node.in_bodies { visitor.visit(item); }
1578 if let Some(inner) = node.else_body.as_ref() { visitor.visit(inner); }
1579 // skip keyword_l
1580 // skip else_l
1581 // skip end_l
1582 // skip expression_l
1583
1584}
1585
1586/// Visits all children of Casgn node
1587#[allow(unused_variables)]
1588pub fn visit_casgn<V: Visitor>(visitor: &mut V, node: &Casgn) {
1589 if let Some(inner) = node.scope.as_ref() { visitor.visit(inner); }
1590 // skip name
1591 if let Some(inner) = node.value.as_ref() { visitor.visit(inner); }
1592 // skip double_colon_l
1593 // skip name_l
1594 // skip operator_l
1595 // skip expression_l
1596
1597}
1598
1599/// Visits all children of Cbase node
1600#[allow(unused_variables)]
1601pub fn visit_cbase<V: Visitor>(visitor: &mut V, node: &Cbase) {
1602 // skip expression_l
1603
1604}
1605
1606/// Visits all children of Class node
1607#[allow(unused_variables)]
1608pub fn visit_class<V: Visitor>(visitor: &mut V, node: &Class) {
1609 visitor.visit(&node.name);
1610 if let Some(inner) = node.superclass.as_ref() { visitor.visit(inner); }
1611 if let Some(inner) = node.body.as_ref() { visitor.visit(inner); }
1612 // skip keyword_l
1613 // skip operator_l
1614 // skip end_l
1615 // skip expression_l
1616
1617}
1618
1619/// Visits all children of Complex node
1620#[allow(unused_variables)]
1621pub fn visit_complex<V: Visitor>(visitor: &mut V, node: &Complex) {
1622 // skip value
1623 // skip operator_l
1624 // skip expression_l
1625
1626}
1627
1628/// Visits all children of Const node
1629#[allow(unused_variables)]
1630pub fn visit_const<V: Visitor>(visitor: &mut V, node: &Const) {
1631 if let Some(inner) = node.scope.as_ref() { visitor.visit(inner); }
1632 // skip name
1633 // skip double_colon_l
1634 // skip name_l
1635 // skip expression_l
1636
1637}
1638
1639/// Visits all children of ConstPattern node
1640#[allow(unused_variables)]
1641pub fn visit_const_pattern<V: Visitor>(visitor: &mut V, node: &ConstPattern) {
1642 visitor.visit(&node.const_);
1643 visitor.visit(&node.pattern);
1644 // skip begin_l
1645 // skip end_l
1646 // skip expression_l
1647
1648}
1649
1650/// Visits all children of CSend node
1651#[allow(unused_variables)]
1652pub fn visit_c_send<V: Visitor>(visitor: &mut V, node: &CSend) {
1653 visitor.visit(&node.recv);
1654 // skip method_name
1655 for item in &node.args { visitor.visit(item); }
1656 // skip dot_l
1657 // skip selector_l
1658 // skip begin_l
1659 // skip end_l
1660 // skip operator_l
1661 // skip expression_l
1662
1663}
1664
1665/// Visits all children of Cvar node
1666#[allow(unused_variables)]
1667pub fn visit_cvar<V: Visitor>(visitor: &mut V, node: &Cvar) {
1668 // skip name
1669 // skip expression_l
1670
1671}
1672
1673/// Visits all children of Cvasgn node
1674#[allow(unused_variables)]
1675pub fn visit_cvasgn<V: Visitor>(visitor: &mut V, node: &Cvasgn) {
1676 // skip name
1677 if let Some(inner) = node.value.as_ref() { visitor.visit(inner); }
1678 // skip name_l
1679 // skip operator_l
1680 // skip expression_l
1681
1682}
1683
1684/// Visits all children of Def node
1685#[allow(unused_variables)]
1686pub fn visit_def<V: Visitor>(visitor: &mut V, node: &Def) {
1687 // skip name
1688 if let Some(inner) = node.args.as_ref() { visitor.visit(inner); }
1689 if let Some(inner) = node.body.as_ref() { visitor.visit(inner); }
1690 // skip keyword_l
1691 // skip name_l
1692 // skip end_l
1693 // skip assignment_l
1694 // skip expression_l
1695
1696}
1697
1698/// Visits all children of Defined node
1699#[allow(unused_variables)]
1700pub fn visit_defined<V: Visitor>(visitor: &mut V, node: &Defined) {
1701 visitor.visit(&node.value);
1702 // skip keyword_l
1703 // skip begin_l
1704 // skip end_l
1705 // skip expression_l
1706
1707}
1708
1709/// Visits all children of Defs node
1710#[allow(unused_variables)]
1711pub fn visit_defs<V: Visitor>(visitor: &mut V, node: &Defs) {
1712 visitor.visit(&node.definee);
1713 // skip name
1714 if let Some(inner) = node.args.as_ref() { visitor.visit(inner); }
1715 if let Some(inner) = node.body.as_ref() { visitor.visit(inner); }
1716 // skip keyword_l
1717 // skip operator_l
1718 // skip name_l
1719 // skip assignment_l
1720 // skip end_l
1721 // skip expression_l
1722
1723}
1724
1725/// Visits all children of Dstr node
1726#[allow(unused_variables)]
1727pub fn visit_dstr<V: Visitor>(visitor: &mut V, node: &Dstr) {
1728 for item in &node.parts { visitor.visit(item); }
1729 // skip begin_l
1730 // skip end_l
1731 // skip expression_l
1732
1733}
1734
1735/// Visits all children of Dsym node
1736#[allow(unused_variables)]
1737pub fn visit_dsym<V: Visitor>(visitor: &mut V, node: &Dsym) {
1738 for item in &node.parts { visitor.visit(item); }
1739 // skip begin_l
1740 // skip end_l
1741 // skip expression_l
1742
1743}
1744
1745/// Visits all children of EFlipFlop node
1746#[allow(unused_variables)]
1747pub fn visit_e_flip_flop<V: Visitor>(visitor: &mut V, node: &EFlipFlop) {
1748 if let Some(inner) = node.left.as_ref() { visitor.visit(inner); }
1749 if let Some(inner) = node.right.as_ref() { visitor.visit(inner); }
1750 // skip operator_l
1751 // skip expression_l
1752
1753}
1754
1755/// Visits all children of EmptyElse node
1756#[allow(unused_variables)]
1757pub fn visit_empty_else<V: Visitor>(visitor: &mut V, node: &EmptyElse) {
1758 // skip expression_l
1759
1760}
1761
1762/// Visits all children of Encoding node
1763#[allow(unused_variables)]
1764pub fn visit_encoding<V: Visitor>(visitor: &mut V, node: &Encoding) {
1765 // skip expression_l
1766
1767}
1768
1769/// Visits all children of Ensure node
1770#[allow(unused_variables)]
1771pub fn visit_ensure<V: Visitor>(visitor: &mut V, node: &Ensure) {
1772 if let Some(inner) = node.body.as_ref() { visitor.visit(inner); }
1773 if let Some(inner) = node.ensure.as_ref() { visitor.visit(inner); }
1774 // skip keyword_l
1775 // skip expression_l
1776
1777}
1778
1779/// Visits all children of Erange node
1780#[allow(unused_variables)]
1781pub fn visit_erange<V: Visitor>(visitor: &mut V, node: &Erange) {
1782 if let Some(inner) = node.left.as_ref() { visitor.visit(inner); }
1783 if let Some(inner) = node.right.as_ref() { visitor.visit(inner); }
1784 // skip operator_l
1785 // skip expression_l
1786
1787}
1788
1789/// Visits all children of False node
1790#[allow(unused_variables)]
1791pub fn visit_false<V: Visitor>(visitor: &mut V, node: &False) {
1792 // skip expression_l
1793
1794}
1795
1796/// Visits all children of File node
1797#[allow(unused_variables)]
1798pub fn visit_file<V: Visitor>(visitor: &mut V, node: &File) {
1799 // skip expression_l
1800
1801}
1802
1803/// Visits all children of FindPattern node
1804#[allow(unused_variables)]
1805pub fn visit_find_pattern<V: Visitor>(visitor: &mut V, node: &FindPattern) {
1806 for item in &node.elements { visitor.visit(item); }
1807 // skip begin_l
1808 // skip end_l
1809 // skip expression_l
1810
1811}
1812
1813/// Visits all children of Float node
1814#[allow(unused_variables)]
1815pub fn visit_float<V: Visitor>(visitor: &mut V, node: &Float) {
1816 // skip value
1817 // skip operator_l
1818 // skip expression_l
1819
1820}
1821
1822/// Visits all children of For node
1823#[allow(unused_variables)]
1824pub fn visit_for<V: Visitor>(visitor: &mut V, node: &For) {
1825 visitor.visit(&node.iterator);
1826 visitor.visit(&node.iteratee);
1827 if let Some(inner) = node.body.as_ref() { visitor.visit(inner); }
1828 // skip keyword_l
1829 // skip operator_l
1830 // skip begin_l
1831 // skip end_l
1832 // skip expression_l
1833
1834}
1835
1836/// Visits all children of ForwardArg node
1837#[allow(unused_variables)]
1838pub fn visit_forward_arg<V: Visitor>(visitor: &mut V, node: &ForwardArg) {
1839 // skip expression_l
1840
1841}
1842
1843/// Visits all children of ForwardedArgs node
1844#[allow(unused_variables)]
1845pub fn visit_forwarded_args<V: Visitor>(visitor: &mut V, node: &ForwardedArgs) {
1846 // skip expression_l
1847
1848}
1849
1850/// Visits all children of Gvar node
1851#[allow(unused_variables)]
1852pub fn visit_gvar<V: Visitor>(visitor: &mut V, node: &Gvar) {
1853 // skip name
1854 // skip expression_l
1855
1856}
1857
1858/// Visits all children of Gvasgn node
1859#[allow(unused_variables)]
1860pub fn visit_gvasgn<V: Visitor>(visitor: &mut V, node: &Gvasgn) {
1861 // skip name
1862 if let Some(inner) = node.value.as_ref() { visitor.visit(inner); }
1863 // skip name_l
1864 // skip operator_l
1865 // skip expression_l
1866
1867}
1868
1869/// Visits all children of Hash node
1870#[allow(unused_variables)]
1871pub fn visit_hash<V: Visitor>(visitor: &mut V, node: &Hash) {
1872 for item in &node.pairs { visitor.visit(item); }
1873 // skip begin_l
1874 // skip end_l
1875 // skip expression_l
1876
1877}
1878
1879/// Visits all children of HashPattern node
1880#[allow(unused_variables)]
1881pub fn visit_hash_pattern<V: Visitor>(visitor: &mut V, node: &HashPattern) {
1882 for item in &node.elements { visitor.visit(item); }
1883 // skip begin_l
1884 // skip end_l
1885 // skip expression_l
1886
1887}
1888
1889/// Visits all children of Heredoc node
1890#[allow(unused_variables)]
1891pub fn visit_heredoc<V: Visitor>(visitor: &mut V, node: &Heredoc) {
1892 for item in &node.parts { visitor.visit(item); }
1893 // skip heredoc_body_l
1894 // skip heredoc_end_l
1895 // skip expression_l
1896
1897}
1898
1899/// Visits all children of If node
1900#[allow(unused_variables)]
1901pub fn visit_if<V: Visitor>(visitor: &mut V, node: &If) {
1902 visitor.visit(&node.cond);
1903 if let Some(inner) = node.if_true.as_ref() { visitor.visit(inner); }
1904 if let Some(inner) = node.if_false.as_ref() { visitor.visit(inner); }
1905 // skip keyword_l
1906 // skip begin_l
1907 // skip else_l
1908 // skip end_l
1909 // skip expression_l
1910
1911}
1912
1913/// Visits all children of IfGuard node
1914#[allow(unused_variables)]
1915pub fn visit_if_guard<V: Visitor>(visitor: &mut V, node: &IfGuard) {
1916 visitor.visit(&node.cond);
1917 // skip keyword_l
1918 // skip expression_l
1919
1920}
1921
1922/// Visits all children of IFlipFlop node
1923#[allow(unused_variables)]
1924pub fn visit_i_flip_flop<V: Visitor>(visitor: &mut V, node: &IFlipFlop) {
1925 if let Some(inner) = node.left.as_ref() { visitor.visit(inner); }
1926 if let Some(inner) = node.right.as_ref() { visitor.visit(inner); }
1927 // skip operator_l
1928 // skip expression_l
1929
1930}
1931
1932/// Visits all children of IfMod node
1933#[allow(unused_variables)]
1934pub fn visit_if_mod<V: Visitor>(visitor: &mut V, node: &IfMod) {
1935 visitor.visit(&node.cond);
1936 if let Some(inner) = node.if_true.as_ref() { visitor.visit(inner); }
1937 if let Some(inner) = node.if_false.as_ref() { visitor.visit(inner); }
1938 // skip keyword_l
1939 // skip expression_l
1940
1941}
1942
1943/// Visits all children of IfTernary node
1944#[allow(unused_variables)]
1945pub fn visit_if_ternary<V: Visitor>(visitor: &mut V, node: &IfTernary) {
1946 visitor.visit(&node.cond);
1947 visitor.visit(&node.if_true);
1948 visitor.visit(&node.if_false);
1949 // skip question_l
1950 // skip colon_l
1951 // skip expression_l
1952
1953}
1954
1955/// Visits all children of Index node
1956#[allow(unused_variables)]
1957pub fn visit_index<V: Visitor>(visitor: &mut V, node: &Index) {
1958 visitor.visit(&node.recv);
1959 for item in &node.indexes { visitor.visit(item); }
1960 // skip begin_l
1961 // skip end_l
1962 // skip expression_l
1963
1964}
1965
1966/// Visits all children of IndexAsgn node
1967#[allow(unused_variables)]
1968pub fn visit_index_asgn<V: Visitor>(visitor: &mut V, node: &IndexAsgn) {
1969 visitor.visit(&node.recv);
1970 for item in &node.indexes { visitor.visit(item); }
1971 if let Some(inner) = node.value.as_ref() { visitor.visit(inner); }
1972 // skip begin_l
1973 // skip end_l
1974 // skip operator_l
1975 // skip expression_l
1976
1977}
1978
1979/// Visits all children of InPattern node
1980#[allow(unused_variables)]
1981pub fn visit_in_pattern<V: Visitor>(visitor: &mut V, node: &InPattern) {
1982 visitor.visit(&node.pattern);
1983 if let Some(inner) = node.guard.as_ref() { visitor.visit(inner); }
1984 if let Some(inner) = node.body.as_ref() { visitor.visit(inner); }
1985 // skip keyword_l
1986 // skip begin_l
1987 // skip expression_l
1988
1989}
1990
1991/// Visits all children of Int node
1992#[allow(unused_variables)]
1993pub fn visit_int<V: Visitor>(visitor: &mut V, node: &Int) {
1994 // skip value
1995 // skip operator_l
1996 // skip expression_l
1997
1998}
1999
2000/// Visits all children of Irange node
2001#[allow(unused_variables)]
2002pub fn visit_irange<V: Visitor>(visitor: &mut V, node: &Irange) {
2003 if let Some(inner) = node.left.as_ref() { visitor.visit(inner); }
2004 if let Some(inner) = node.right.as_ref() { visitor.visit(inner); }
2005 // skip operator_l
2006 // skip expression_l
2007
2008}
2009
2010/// Visits all children of Ivar node
2011#[allow(unused_variables)]
2012pub fn visit_ivar<V: Visitor>(visitor: &mut V, node: &Ivar) {
2013 // skip name
2014 // skip expression_l
2015
2016}
2017
2018/// Visits all children of Ivasgn node
2019#[allow(unused_variables)]
2020pub fn visit_ivasgn<V: Visitor>(visitor: &mut V, node: &Ivasgn) {
2021 // skip name
2022 if let Some(inner) = node.value.as_ref() { visitor.visit(inner); }
2023 // skip name_l
2024 // skip operator_l
2025 // skip expression_l
2026
2027}
2028
2029/// Visits all children of Kwarg node
2030#[allow(unused_variables)]
2031pub fn visit_kwarg<V: Visitor>(visitor: &mut V, node: &Kwarg) {
2032 // skip name
2033 // skip name_l
2034 // skip expression_l
2035
2036}
2037
2038/// Visits all children of Kwargs node
2039#[allow(unused_variables)]
2040pub fn visit_kwargs<V: Visitor>(visitor: &mut V, node: &Kwargs) {
2041 for item in &node.pairs { visitor.visit(item); }
2042 // skip expression_l
2043
2044}
2045
2046/// Visits all children of KwBegin node
2047#[allow(unused_variables)]
2048pub fn visit_kw_begin<V: Visitor>(visitor: &mut V, node: &KwBegin) {
2049 for item in &node.statements { visitor.visit(item); }
2050 // skip begin_l
2051 // skip end_l
2052 // skip expression_l
2053
2054}
2055
2056/// Visits all children of Kwnilarg node
2057#[allow(unused_variables)]
2058pub fn visit_kwnilarg<V: Visitor>(visitor: &mut V, node: &Kwnilarg) {
2059 // skip name_l
2060 // skip expression_l
2061
2062}
2063
2064/// Visits all children of Kwoptarg node
2065#[allow(unused_variables)]
2066pub fn visit_kwoptarg<V: Visitor>(visitor: &mut V, node: &Kwoptarg) {
2067 // skip name
2068 visitor.visit(&node.default);
2069 // skip name_l
2070 // skip expression_l
2071
2072}
2073
2074/// Visits all children of Kwrestarg node
2075#[allow(unused_variables)]
2076pub fn visit_kwrestarg<V: Visitor>(visitor: &mut V, node: &Kwrestarg) {
2077 // skip name
2078 // skip operator_l
2079 // skip name_l
2080 // skip expression_l
2081
2082}
2083
2084/// Visits all children of Kwsplat node
2085#[allow(unused_variables)]
2086pub fn visit_kwsplat<V: Visitor>(visitor: &mut V, node: &Kwsplat) {
2087 visitor.visit(&node.value);
2088 // skip operator_l
2089 // skip expression_l
2090
2091}
2092
2093/// Visits all children of Lambda node
2094#[allow(unused_variables)]
2095pub fn visit_lambda<V: Visitor>(visitor: &mut V, node: &Lambda) {
2096 // skip expression_l
2097
2098}
2099
2100/// Visits all children of Line node
2101#[allow(unused_variables)]
2102pub fn visit_line<V: Visitor>(visitor: &mut V, node: &Line) {
2103 // skip expression_l
2104
2105}
2106
2107/// Visits all children of Lvar node
2108#[allow(unused_variables)]
2109pub fn visit_lvar<V: Visitor>(visitor: &mut V, node: &Lvar) {
2110 // skip name
2111 // skip expression_l
2112
2113}
2114
2115/// Visits all children of Lvasgn node
2116#[allow(unused_variables)]
2117pub fn visit_lvasgn<V: Visitor>(visitor: &mut V, node: &Lvasgn) {
2118 // skip name
2119 if let Some(inner) = node.value.as_ref() { visitor.visit(inner); }
2120 // skip name_l
2121 // skip operator_l
2122 // skip expression_l
2123
2124}
2125
2126/// Visits all children of Masgn node
2127#[allow(unused_variables)]
2128pub fn visit_masgn<V: Visitor>(visitor: &mut V, node: &Masgn) {
2129 visitor.visit(&node.lhs);
2130 visitor.visit(&node.rhs);
2131 // skip operator_l
2132 // skip expression_l
2133
2134}
2135
2136/// Visits all children of MatchAlt node
2137#[allow(unused_variables)]
2138pub fn visit_match_alt<V: Visitor>(visitor: &mut V, node: &MatchAlt) {
2139 visitor.visit(&node.lhs);
2140 visitor.visit(&node.rhs);
2141 // skip operator_l
2142 // skip expression_l
2143
2144}
2145
2146/// Visits all children of MatchAs node
2147#[allow(unused_variables)]
2148pub fn visit_match_as<V: Visitor>(visitor: &mut V, node: &MatchAs) {
2149 visitor.visit(&node.value);
2150 visitor.visit(&node.as_);
2151 // skip operator_l
2152 // skip expression_l
2153
2154}
2155
2156/// Visits all children of MatchCurrentLine node
2157#[allow(unused_variables)]
2158pub fn visit_match_current_line<V: Visitor>(visitor: &mut V, node: &MatchCurrentLine) {
2159 visitor.visit(&node.re);
2160 // skip expression_l
2161
2162}
2163
2164/// Visits all children of MatchNilPattern node
2165#[allow(unused_variables)]
2166pub fn visit_match_nil_pattern<V: Visitor>(visitor: &mut V, node: &MatchNilPattern) {
2167 // skip operator_l
2168 // skip name_l
2169 // skip expression_l
2170
2171}
2172
2173/// Visits all children of MatchPattern node
2174#[allow(unused_variables)]
2175pub fn visit_match_pattern<V: Visitor>(visitor: &mut V, node: &MatchPattern) {
2176 visitor.visit(&node.value);
2177 visitor.visit(&node.pattern);
2178 // skip operator_l
2179 // skip expression_l
2180
2181}
2182
2183/// Visits all children of MatchPatternP node
2184#[allow(unused_variables)]
2185pub fn visit_match_pattern_p<V: Visitor>(visitor: &mut V, node: &MatchPatternP) {
2186 visitor.visit(&node.value);
2187 visitor.visit(&node.pattern);
2188 // skip operator_l
2189 // skip expression_l
2190
2191}
2192
2193/// Visits all children of MatchRest node
2194#[allow(unused_variables)]
2195pub fn visit_match_rest<V: Visitor>(visitor: &mut V, node: &MatchRest) {
2196 if let Some(inner) = node.name.as_ref() { visitor.visit(inner); }
2197 // skip operator_l
2198 // skip expression_l
2199
2200}
2201
2202/// Visits all children of MatchVar node
2203#[allow(unused_variables)]
2204pub fn visit_match_var<V: Visitor>(visitor: &mut V, node: &MatchVar) {
2205 // skip name
2206 // skip name_l
2207 // skip expression_l
2208
2209}
2210
2211/// Visits all children of MatchWithLvasgn node
2212#[allow(unused_variables)]
2213pub fn visit_match_with_lvasgn<V: Visitor>(visitor: &mut V, node: &MatchWithLvasgn) {
2214 visitor.visit(&node.re);
2215 visitor.visit(&node.value);
2216 // skip operator_l
2217 // skip expression_l
2218
2219}
2220
2221/// Visits all children of Mlhs node
2222#[allow(unused_variables)]
2223pub fn visit_mlhs<V: Visitor>(visitor: &mut V, node: &Mlhs) {
2224 for item in &node.items { visitor.visit(item); }
2225 // skip begin_l
2226 // skip end_l
2227 // skip expression_l
2228
2229}
2230
2231/// Visits all children of Module node
2232#[allow(unused_variables)]
2233pub fn visit_module<V: Visitor>(visitor: &mut V, node: &Module) {
2234 visitor.visit(&node.name);
2235 if let Some(inner) = node.body.as_ref() { visitor.visit(inner); }
2236 // skip keyword_l
2237 // skip end_l
2238 // skip expression_l
2239
2240}
2241
2242/// Visits all children of Next node
2243#[allow(unused_variables)]
2244pub fn visit_next<V: Visitor>(visitor: &mut V, node: &Next) {
2245 for item in &node.args { visitor.visit(item); }
2246 // skip keyword_l
2247 // skip expression_l
2248
2249}
2250
2251/// Visits all children of Nil node
2252#[allow(unused_variables)]
2253pub fn visit_nil<V: Visitor>(visitor: &mut V, node: &Nil) {
2254 // skip expression_l
2255
2256}
2257
2258/// Visits all children of NthRef node
2259#[allow(unused_variables)]
2260pub fn visit_nth_ref<V: Visitor>(visitor: &mut V, node: &NthRef) {
2261 // skip name
2262 // skip expression_l
2263
2264}
2265
2266/// Visits all children of Numblock node
2267#[allow(unused_variables)]
2268pub fn visit_numblock<V: Visitor>(visitor: &mut V, node: &Numblock) {
2269 visitor.visit(&node.call);
2270 // skip numargs
2271 visitor.visit(&node.body);
2272 // skip begin_l
2273 // skip end_l
2274 // skip expression_l
2275
2276}
2277
2278/// Visits all children of OpAsgn node
2279#[allow(unused_variables)]
2280pub fn visit_op_asgn<V: Visitor>(visitor: &mut V, node: &OpAsgn) {
2281 visitor.visit(&node.recv);
2282 // skip operator
2283 visitor.visit(&node.value);
2284 // skip operator_l
2285 // skip expression_l
2286
2287}
2288
2289/// Visits all children of Optarg node
2290#[allow(unused_variables)]
2291pub fn visit_optarg<V: Visitor>(visitor: &mut V, node: &Optarg) {
2292 // skip name
2293 visitor.visit(&node.default);
2294 // skip name_l
2295 // skip operator_l
2296 // skip expression_l
2297
2298}
2299
2300/// Visits all children of Or node
2301#[allow(unused_variables)]
2302pub fn visit_or<V: Visitor>(visitor: &mut V, node: &Or) {
2303 visitor.visit(&node.lhs);
2304 visitor.visit(&node.rhs);
2305 // skip operator_l
2306 // skip expression_l
2307
2308}
2309
2310/// Visits all children of OrAsgn node
2311#[allow(unused_variables)]
2312pub fn visit_or_asgn<V: Visitor>(visitor: &mut V, node: &OrAsgn) {
2313 visitor.visit(&node.recv);
2314 visitor.visit(&node.value);
2315 // skip operator_l
2316 // skip expression_l
2317
2318}
2319
2320/// Visits all children of Pair node
2321#[allow(unused_variables)]
2322pub fn visit_pair<V: Visitor>(visitor: &mut V, node: &Pair) {
2323 visitor.visit(&node.key);
2324 visitor.visit(&node.value);
2325 // skip operator_l
2326 // skip expression_l
2327
2328}
2329
2330/// Visits all children of Pin node
2331#[allow(unused_variables)]
2332pub fn visit_pin<V: Visitor>(visitor: &mut V, node: &Pin) {
2333 visitor.visit(&node.var);
2334 // skip selector_l
2335 // skip expression_l
2336
2337}
2338
2339/// Visits all children of Postexe node
2340#[allow(unused_variables)]
2341pub fn visit_postexe<V: Visitor>(visitor: &mut V, node: &Postexe) {
2342 if let Some(inner) = node.body.as_ref() { visitor.visit(inner); }
2343 // skip keyword_l
2344 // skip begin_l
2345 // skip end_l
2346 // skip expression_l
2347
2348}
2349
2350/// Visits all children of Preexe node
2351#[allow(unused_variables)]
2352pub fn visit_preexe<V: Visitor>(visitor: &mut V, node: &Preexe) {
2353 if let Some(inner) = node.body.as_ref() { visitor.visit(inner); }
2354 // skip keyword_l
2355 // skip begin_l
2356 // skip end_l
2357 // skip expression_l
2358
2359}
2360
2361/// Visits all children of Procarg0 node
2362#[allow(unused_variables)]
2363pub fn visit_procarg0<V: Visitor>(visitor: &mut V, node: &Procarg0) {
2364 for item in &node.args { visitor.visit(item); }
2365 // skip begin_l
2366 // skip end_l
2367 // skip expression_l
2368
2369}
2370
2371/// Visits all children of Rational node
2372#[allow(unused_variables)]
2373pub fn visit_rational<V: Visitor>(visitor: &mut V, node: &Rational) {
2374 // skip value
2375 // skip operator_l
2376 // skip expression_l
2377
2378}
2379
2380/// Visits all children of Redo node
2381#[allow(unused_variables)]
2382pub fn visit_redo<V: Visitor>(visitor: &mut V, node: &Redo) {
2383 // skip expression_l
2384
2385}
2386
2387/// Visits all children of Regexp node
2388#[allow(unused_variables)]
2389pub fn visit_regexp<V: Visitor>(visitor: &mut V, node: &Regexp) {
2390 for item in &node.parts { visitor.visit(item); }
2391 if let Some(inner) = node.options.as_ref() { visitor.visit(inner); }
2392 // skip begin_l
2393 // skip end_l
2394 // skip expression_l
2395
2396}
2397
2398/// Visits all children of RegOpt node
2399#[allow(unused_variables)]
2400pub fn visit_reg_opt<V: Visitor>(visitor: &mut V, node: &RegOpt) {
2401 // skip options
2402 // skip expression_l
2403
2404}
2405
2406/// Visits all children of Rescue node
2407#[allow(unused_variables)]
2408pub fn visit_rescue<V: Visitor>(visitor: &mut V, node: &Rescue) {
2409 if let Some(inner) = node.body.as_ref() { visitor.visit(inner); }
2410 for item in &node.rescue_bodies { visitor.visit(item); }
2411 if let Some(inner) = node.else_.as_ref() { visitor.visit(inner); }
2412 // skip else_l
2413 // skip expression_l
2414
2415}
2416
2417/// Visits all children of RescueBody node
2418#[allow(unused_variables)]
2419pub fn visit_rescue_body<V: Visitor>(visitor: &mut V, node: &RescueBody) {
2420 if let Some(inner) = node.exc_list.as_ref() { visitor.visit(inner); }
2421 if let Some(inner) = node.exc_var.as_ref() { visitor.visit(inner); }
2422 if let Some(inner) = node.body.as_ref() { visitor.visit(inner); }
2423 // skip keyword_l
2424 // skip assoc_l
2425 // skip begin_l
2426 // skip expression_l
2427
2428}
2429
2430/// Visits all children of Restarg node
2431#[allow(unused_variables)]
2432pub fn visit_restarg<V: Visitor>(visitor: &mut V, node: &Restarg) {
2433 // skip name
2434 // skip operator_l
2435 // skip name_l
2436 // skip expression_l
2437
2438}
2439
2440/// Visits all children of Retry node
2441#[allow(unused_variables)]
2442pub fn visit_retry<V: Visitor>(visitor: &mut V, node: &Retry) {
2443 // skip expression_l
2444
2445}
2446
2447/// Visits all children of Return node
2448#[allow(unused_variables)]
2449pub fn visit_return<V: Visitor>(visitor: &mut V, node: &Return) {
2450 for item in &node.args { visitor.visit(item); }
2451 // skip keyword_l
2452 // skip expression_l
2453
2454}
2455
2456/// Visits all children of SClass node
2457#[allow(unused_variables)]
2458pub fn visit_s_class<V: Visitor>(visitor: &mut V, node: &SClass) {
2459 visitor.visit(&node.expr);
2460 if let Some(inner) = node.body.as_ref() { visitor.visit(inner); }
2461 // skip keyword_l
2462 // skip operator_l
2463 // skip end_l
2464 // skip expression_l
2465
2466}
2467
2468/// Visits all children of Self_ node
2469#[allow(unused_variables)]
2470pub fn visit_self_<V: Visitor>(visitor: &mut V, node: &Self_) {
2471 // skip expression_l
2472
2473}
2474
2475/// Visits all children of Send node
2476#[allow(unused_variables)]
2477pub fn visit_send<V: Visitor>(visitor: &mut V, node: &Send) {
2478 if let Some(inner) = node.recv.as_ref() { visitor.visit(inner); }
2479 // skip method_name
2480 for item in &node.args { visitor.visit(item); }
2481 // skip dot_l
2482 // skip selector_l
2483 // skip begin_l
2484 // skip end_l
2485 // skip operator_l
2486 // skip expression_l
2487
2488}
2489
2490/// Visits all children of Shadowarg node
2491#[allow(unused_variables)]
2492pub fn visit_shadowarg<V: Visitor>(visitor: &mut V, node: &Shadowarg) {
2493 // skip name
2494 // skip expression_l
2495
2496}
2497
2498/// Visits all children of Splat node
2499#[allow(unused_variables)]
2500pub fn visit_splat<V: Visitor>(visitor: &mut V, node: &Splat) {
2501 if let Some(inner) = node.value.as_ref() { visitor.visit(inner); }
2502 // skip operator_l
2503 // skip expression_l
2504
2505}
2506
2507/// Visits all children of Str node
2508#[allow(unused_variables)]
2509pub fn visit_str<V: Visitor>(visitor: &mut V, node: &Str) {
2510 // skip value
2511 // skip begin_l
2512 // skip end_l
2513 // skip expression_l
2514
2515}
2516
2517/// Visits all children of Super node
2518#[allow(unused_variables)]
2519pub fn visit_super<V: Visitor>(visitor: &mut V, node: &Super) {
2520 for item in &node.args { visitor.visit(item); }
2521 // skip keyword_l
2522 // skip begin_l
2523 // skip end_l
2524 // skip expression_l
2525
2526}
2527
2528/// Visits all children of Sym node
2529#[allow(unused_variables)]
2530pub fn visit_sym<V: Visitor>(visitor: &mut V, node: &Sym) {
2531 // skip name
2532 // skip begin_l
2533 // skip end_l
2534 // skip expression_l
2535
2536}
2537
2538/// Visits all children of True node
2539#[allow(unused_variables)]
2540pub fn visit_true<V: Visitor>(visitor: &mut V, node: &True) {
2541 // skip expression_l
2542
2543}
2544
2545/// Visits all children of Undef node
2546#[allow(unused_variables)]
2547pub fn visit_undef<V: Visitor>(visitor: &mut V, node: &Undef) {
2548 for item in &node.names { visitor.visit(item); }
2549 // skip keyword_l
2550 // skip expression_l
2551
2552}
2553
2554/// Visits all children of UnlessGuard node
2555#[allow(unused_variables)]
2556pub fn visit_unless_guard<V: Visitor>(visitor: &mut V, node: &UnlessGuard) {
2557 visitor.visit(&node.cond);
2558 // skip keyword_l
2559 // skip expression_l
2560
2561}
2562
2563/// Visits all children of Until node
2564#[allow(unused_variables)]
2565pub fn visit_until<V: Visitor>(visitor: &mut V, node: &Until) {
2566 visitor.visit(&node.cond);
2567 if let Some(inner) = node.body.as_ref() { visitor.visit(inner); }
2568 // skip keyword_l
2569 // skip begin_l
2570 // skip end_l
2571 // skip expression_l
2572
2573}
2574
2575/// Visits all children of UntilPost node
2576#[allow(unused_variables)]
2577pub fn visit_until_post<V: Visitor>(visitor: &mut V, node: &UntilPost) {
2578 visitor.visit(&node.cond);
2579 visitor.visit(&node.body);
2580 // skip keyword_l
2581 // skip expression_l
2582
2583}
2584
2585/// Visits all children of When node
2586#[allow(unused_variables)]
2587pub fn visit_when<V: Visitor>(visitor: &mut V, node: &When) {
2588 for item in &node.patterns { visitor.visit(item); }
2589 if let Some(inner) = node.body.as_ref() { visitor.visit(inner); }
2590 // skip keyword_l
2591 // skip begin_l
2592 // skip expression_l
2593
2594}
2595
2596/// Visits all children of While node
2597#[allow(unused_variables)]
2598pub fn visit_while<V: Visitor>(visitor: &mut V, node: &While) {
2599 visitor.visit(&node.cond);
2600 if let Some(inner) = node.body.as_ref() { visitor.visit(inner); }
2601 // skip keyword_l
2602 // skip begin_l
2603 // skip end_l
2604 // skip expression_l
2605
2606}
2607
2608/// Visits all children of WhilePost node
2609#[allow(unused_variables)]
2610pub fn visit_while_post<V: Visitor>(visitor: &mut V, node: &WhilePost) {
2611 visitor.visit(&node.cond);
2612 visitor.visit(&node.body);
2613 // skip keyword_l
2614 // skip expression_l
2615
2616}
2617
2618/// Visits all children of XHeredoc node
2619#[allow(unused_variables)]
2620pub fn visit_x_heredoc<V: Visitor>(visitor: &mut V, node: &XHeredoc) {
2621 for item in &node.parts { visitor.visit(item); }
2622 // skip heredoc_body_l
2623 // skip heredoc_end_l
2624 // skip expression_l
2625
2626}
2627
2628/// Visits all children of Xstr node
2629#[allow(unused_variables)]
2630pub fn visit_xstr<V: Visitor>(visitor: &mut V, node: &Xstr) {
2631 for item in &node.parts { visitor.visit(item); }
2632 // skip begin_l
2633 // skip end_l
2634 // skip expression_l
2635
2636}
2637
2638/// Visits all children of Yield node
2639#[allow(unused_variables)]
2640pub fn visit_yield<V: Visitor>(visitor: &mut V, node: &Yield) {
2641 for item in &node.args { visitor.visit(item); }
2642 // skip keyword_l
2643 // skip begin_l
2644 // skip end_l
2645 // skip expression_l
2646
2647}
2648
2649/// Visits all children of ZSuper node
2650#[allow(unused_variables)]
2651pub fn visit_z_super<V: Visitor>(visitor: &mut V, node: &ZSuper) {
2652 // skip expression_l
2653
2654}
2655