Add an upcast expression
[hiphop-php.git] / hphp / hack / src / oxidized / aast_visitor / node_impl_gen.rs
blob1f13fef542dbd5389b6110afa8715ae90b1c8a93
1 // Copyright (c) Facebook, Inc. and its affiliates.
2 //
3 // This source code is licensed under the MIT license found in the
4 // LICENSE file in the "hack" directory of this source tree.
5 //
6 // @generated SignedSource<<86962ca5ef1bda664f6e3c2fb6bfee3b>>
7 //
8 // To regenerate this file, run:
9 //   hphp/hack/src/oxidized_regen.sh
11 #![allow(unused_variables)]
12 use super::node::Node;
13 use super::type_params::Params;
14 use super::visitor::Visitor;
15 use crate::{aast::*, aast_defs::*, ast_defs::*, doc_comment::*};
16 impl<P: Params> Node<P> for Abstraction {
17     fn accept<'node>(
18         &'node self,
19         c: &mut P::Context,
20         v: &mut dyn Visitor<'node, P = P>,
21     ) -> Result<(), P::Error> {
22         v.visit_abstraction(c, self)
23     }
24     fn recurse<'node>(
25         &'node self,
26         c: &mut P::Context,
27         v: &mut dyn Visitor<'node, P = P>,
28     ) -> Result<(), P::Error> {
29         match self {
30             Abstraction::Concrete => Ok(()),
31             Abstraction::Abstract => Ok(()),
32         }
33     }
35 impl<P: Params> Node<P> for Afield<P::Ex, P::En> {
36     fn accept<'node>(
37         &'node self,
38         c: &mut P::Context,
39         v: &mut dyn Visitor<'node, P = P>,
40     ) -> Result<(), P::Error> {
41         v.visit_afield(c, self)
42     }
43     fn recurse<'node>(
44         &'node self,
45         c: &mut P::Context,
46         v: &mut dyn Visitor<'node, P = P>,
47     ) -> Result<(), P::Error> {
48         match self {
49             Afield::AFvalue(a0) => {
50                 a0.accept(c, v)?;
51                 Ok(())
52             }
53             Afield::AFkvalue(a0, a1) => {
54                 a0.accept(c, v)?;
55                 a1.accept(c, v)?;
56                 Ok(())
57             }
58         }
59     }
61 impl<P: Params> Node<P> for AsExpr<P::Ex, P::En> {
62     fn accept<'node>(
63         &'node self,
64         c: &mut P::Context,
65         v: &mut dyn Visitor<'node, P = P>,
66     ) -> Result<(), P::Error> {
67         v.visit_as_expr(c, self)
68     }
69     fn recurse<'node>(
70         &'node self,
71         c: &mut P::Context,
72         v: &mut dyn Visitor<'node, P = P>,
73     ) -> Result<(), P::Error> {
74         match self {
75             AsExpr::AsV(a0) => {
76                 a0.accept(c, v)?;
77                 Ok(())
78             }
79             AsExpr::AsKv(a0, a1) => {
80                 a0.accept(c, v)?;
81                 a1.accept(c, v)?;
82                 Ok(())
83             }
84             AsExpr::AwaitAsV(a0, a1) => {
85                 a0.accept(c, v)?;
86                 a1.accept(c, v)?;
87                 Ok(())
88             }
89             AsExpr::AwaitAsKv(a0, a1, a2) => {
90                 a0.accept(c, v)?;
91                 a1.accept(c, v)?;
92                 a2.accept(c, v)?;
93                 Ok(())
94             }
95         }
96     }
98 impl<P: Params> Node<P> for Bop {
99     fn accept<'node>(
100         &'node self,
101         c: &mut P::Context,
102         v: &mut dyn Visitor<'node, P = P>,
103     ) -> Result<(), P::Error> {
104         v.visit_bop(c, self)
105     }
106     fn recurse<'node>(
107         &'node self,
108         c: &mut P::Context,
109         v: &mut dyn Visitor<'node, P = P>,
110     ) -> Result<(), P::Error> {
111         match self {
112             Bop::Plus => Ok(()),
113             Bop::Minus => Ok(()),
114             Bop::Star => Ok(()),
115             Bop::Slash => Ok(()),
116             Bop::Eqeq => Ok(()),
117             Bop::Eqeqeq => Ok(()),
118             Bop::Starstar => Ok(()),
119             Bop::Diff => Ok(()),
120             Bop::Diff2 => Ok(()),
121             Bop::Ampamp => Ok(()),
122             Bop::Barbar => Ok(()),
123             Bop::Lt => Ok(()),
124             Bop::Lte => Ok(()),
125             Bop::Gt => Ok(()),
126             Bop::Gte => Ok(()),
127             Bop::Dot => Ok(()),
128             Bop::Amp => Ok(()),
129             Bop::Bar => Ok(()),
130             Bop::Ltlt => Ok(()),
131             Bop::Gtgt => Ok(()),
132             Bop::Percent => Ok(()),
133             Bop::Xor => Ok(()),
134             Bop::Cmp => Ok(()),
135             Bop::QuestionQuestion => Ok(()),
136             Bop::Eq(a0) => {
137                 a0.accept(c, v)?;
138                 Ok(())
139             }
140         }
141     }
143 impl<P: Params> Node<P> for CaField<P::Ex, P::En> {
144     fn accept<'node>(
145         &'node self,
146         c: &mut P::Context,
147         v: &mut dyn Visitor<'node, P = P>,
148     ) -> Result<(), P::Error> {
149         v.visit_ca_field(c, self)
150     }
151     fn recurse<'node>(
152         &'node self,
153         c: &mut P::Context,
154         v: &mut dyn Visitor<'node, P = P>,
155     ) -> Result<(), P::Error> {
156         self.type_.accept(c, v)?;
157         self.id.accept(c, v)?;
158         self.value.accept(c, v)?;
159         self.required.accept(c, v)?;
160         Ok(())
161     }
163 impl<P: Params> Node<P> for CaType {
164     fn accept<'node>(
165         &'node self,
166         c: &mut P::Context,
167         v: &mut dyn Visitor<'node, P = P>,
168     ) -> Result<(), P::Error> {
169         v.visit_ca_type(c, self)
170     }
171     fn recurse<'node>(
172         &'node self,
173         c: &mut P::Context,
174         v: &mut dyn Visitor<'node, P = P>,
175     ) -> Result<(), P::Error> {
176         match self {
177             CaType::CAHint(a0) => {
178                 a0.accept(c, v)?;
179                 Ok(())
180             }
181             CaType::CAEnum(a0) => {
182                 a0.accept(c, v)?;
183                 Ok(())
184             }
185         }
186     }
188 impl<P: Params> Node<P> for Case<P::Ex, P::En> {
189     fn accept<'node>(
190         &'node self,
191         c: &mut P::Context,
192         v: &mut dyn Visitor<'node, P = P>,
193     ) -> Result<(), P::Error> {
194         v.visit_case(c, self)
195     }
196     fn recurse<'node>(
197         &'node self,
198         c: &mut P::Context,
199         v: &mut dyn Visitor<'node, P = P>,
200     ) -> Result<(), P::Error> {
201         match self {
202             Case::Default(a0, a1) => {
203                 a0.accept(c, v)?;
204                 a1.accept(c, v)?;
205                 Ok(())
206             }
207             Case::Case(a0, a1) => {
208                 a0.accept(c, v)?;
209                 a1.accept(c, v)?;
210                 Ok(())
211             }
212         }
213     }
215 impl<P: Params> Node<P> for Catch<P::Ex, P::En> {
216     fn accept<'node>(
217         &'node self,
218         c: &mut P::Context,
219         v: &mut dyn Visitor<'node, P = P>,
220     ) -> Result<(), P::Error> {
221         v.visit_catch(c, self)
222     }
223     fn recurse<'node>(
224         &'node self,
225         c: &mut P::Context,
226         v: &mut dyn Visitor<'node, P = P>,
227     ) -> Result<(), P::Error> {
228         self.0.accept(c, v)?;
229         self.1.accept(c, v)?;
230         self.2.accept(c, v)?;
231         Ok(())
232     }
234 impl<P: Params> Node<P> for ClassAbstractTypeconst {
235     fn accept<'node>(
236         &'node self,
237         c: &mut P::Context,
238         v: &mut dyn Visitor<'node, P = P>,
239     ) -> Result<(), P::Error> {
240         v.visit_class_abstract_typeconst(c, self)
241     }
242     fn recurse<'node>(
243         &'node self,
244         c: &mut P::Context,
245         v: &mut dyn Visitor<'node, P = P>,
246     ) -> Result<(), P::Error> {
247         self.as_constraint.accept(c, v)?;
248         self.super_constraint.accept(c, v)?;
249         self.default.accept(c, v)?;
250         Ok(())
251     }
253 impl<P: Params> Node<P> for ClassAttr<P::Ex, P::En> {
254     fn accept<'node>(
255         &'node self,
256         c: &mut P::Context,
257         v: &mut dyn Visitor<'node, P = P>,
258     ) -> Result<(), P::Error> {
259         v.visit_class_attr(c, self)
260     }
261     fn recurse<'node>(
262         &'node self,
263         c: &mut P::Context,
264         v: &mut dyn Visitor<'node, P = P>,
265     ) -> Result<(), P::Error> {
266         match self {
267             ClassAttr::CAName(a0) => {
268                 a0.accept(c, v)?;
269                 Ok(())
270             }
271             ClassAttr::CAField(a0) => {
272                 a0.accept(c, v)?;
273                 Ok(())
274             }
275         }
276     }
278 impl<P: Params> Node<P> for ClassConcreteTypeconst {
279     fn accept<'node>(
280         &'node self,
281         c: &mut P::Context,
282         v: &mut dyn Visitor<'node, P = P>,
283     ) -> Result<(), P::Error> {
284         v.visit_class_concrete_typeconst(c, self)
285     }
286     fn recurse<'node>(
287         &'node self,
288         c: &mut P::Context,
289         v: &mut dyn Visitor<'node, P = P>,
290     ) -> Result<(), P::Error> {
291         self.c_tc_type.accept(c, v)?;
292         Ok(())
293     }
295 impl<P: Params> Node<P> for ClassConst<P::Ex, P::En> {
296     fn accept<'node>(
297         &'node self,
298         c: &mut P::Context,
299         v: &mut dyn Visitor<'node, P = P>,
300     ) -> Result<(), P::Error> {
301         v.visit_class_const(c, self)
302     }
303     fn recurse<'node>(
304         &'node self,
305         c: &mut P::Context,
306         v: &mut dyn Visitor<'node, P = P>,
307     ) -> Result<(), P::Error> {
308         self.type_.accept(c, v)?;
309         self.id.accept(c, v)?;
310         self.kind.accept(c, v)?;
311         self.doc_comment.accept(c, v)?;
312         Ok(())
313     }
315 impl<P: Params> Node<P> for ClassConstKind<P::Ex, P::En> {
316     fn accept<'node>(
317         &'node self,
318         c: &mut P::Context,
319         v: &mut dyn Visitor<'node, P = P>,
320     ) -> Result<(), P::Error> {
321         v.visit_class_const_kind(c, self)
322     }
323     fn recurse<'node>(
324         &'node self,
325         c: &mut P::Context,
326         v: &mut dyn Visitor<'node, P = P>,
327     ) -> Result<(), P::Error> {
328         match self {
329             ClassConstKind::CCAbstract(a0) => {
330                 a0.accept(c, v)?;
331                 Ok(())
332             }
333             ClassConstKind::CCConcrete(a0) => {
334                 a0.accept(c, v)?;
335                 Ok(())
336             }
337         }
338     }
340 impl<P: Params> Node<P> for ClassGetExpr<P::Ex, P::En> {
341     fn accept<'node>(
342         &'node self,
343         c: &mut P::Context,
344         v: &mut dyn Visitor<'node, P = P>,
345     ) -> Result<(), P::Error> {
346         v.visit_class_get_expr(c, self)
347     }
348     fn recurse<'node>(
349         &'node self,
350         c: &mut P::Context,
351         v: &mut dyn Visitor<'node, P = P>,
352     ) -> Result<(), P::Error> {
353         match self {
354             ClassGetExpr::CGstring(a0) => {
355                 a0.accept(c, v)?;
356                 Ok(())
357             }
358             ClassGetExpr::CGexpr(a0) => {
359                 a0.accept(c, v)?;
360                 Ok(())
361             }
362         }
363     }
365 impl<P: Params> Node<P> for ClassId<P::Ex, P::En> {
366     fn accept<'node>(
367         &'node self,
368         c: &mut P::Context,
369         v: &mut dyn Visitor<'node, P = P>,
370     ) -> Result<(), P::Error> {
371         v.visit_class_id(c, self)
372     }
373     fn recurse<'node>(
374         &'node self,
375         c: &mut P::Context,
376         v: &mut dyn Visitor<'node, P = P>,
377     ) -> Result<(), P::Error> {
378         v.visit_ex(c, &self.0)?;
379         self.1.accept(c, v)?;
380         self.2.accept(c, v)?;
381         Ok(())
382     }
384 impl<P: Params> Node<P> for ClassId_<P::Ex, P::En> {
385     fn accept<'node>(
386         &'node self,
387         c: &mut P::Context,
388         v: &mut dyn Visitor<'node, P = P>,
389     ) -> Result<(), P::Error> {
390         v.visit_class_id_(c, self)
391     }
392     fn recurse<'node>(
393         &'node self,
394         c: &mut P::Context,
395         v: &mut dyn Visitor<'node, P = P>,
396     ) -> Result<(), P::Error> {
397         match self {
398             ClassId_::CIparent => Ok(()),
399             ClassId_::CIself => Ok(()),
400             ClassId_::CIstatic => Ok(()),
401             ClassId_::CIexpr(a0) => {
402                 a0.accept(c, v)?;
403                 Ok(())
404             }
405             ClassId_::CI(a0) => {
406                 a0.accept(c, v)?;
407                 Ok(())
408             }
409         }
410     }
412 impl<P: Params> Node<P> for ClassPartiallyAbstractTypeconst {
413     fn accept<'node>(
414         &'node self,
415         c: &mut P::Context,
416         v: &mut dyn Visitor<'node, P = P>,
417     ) -> Result<(), P::Error> {
418         v.visit_class_partially_abstract_typeconst(c, self)
419     }
420     fn recurse<'node>(
421         &'node self,
422         c: &mut P::Context,
423         v: &mut dyn Visitor<'node, P = P>,
424     ) -> Result<(), P::Error> {
425         self.constraint.accept(c, v)?;
426         self.type_.accept(c, v)?;
427         Ok(())
428     }
430 impl<P: Params> Node<P> for ClassTypeconst {
431     fn accept<'node>(
432         &'node self,
433         c: &mut P::Context,
434         v: &mut dyn Visitor<'node, P = P>,
435     ) -> Result<(), P::Error> {
436         v.visit_class_typeconst(c, self)
437     }
438     fn recurse<'node>(
439         &'node self,
440         c: &mut P::Context,
441         v: &mut dyn Visitor<'node, P = P>,
442     ) -> Result<(), P::Error> {
443         match self {
444             ClassTypeconst::TCAbstract(a0) => {
445                 a0.accept(c, v)?;
446                 Ok(())
447             }
448             ClassTypeconst::TCConcrete(a0) => {
449                 a0.accept(c, v)?;
450                 Ok(())
451             }
452             ClassTypeconst::TCPartiallyAbstract(a0) => {
453                 a0.accept(c, v)?;
454                 Ok(())
455             }
456         }
457     }
459 impl<P: Params> Node<P> for ClassTypeconstDef<P::Ex, P::En> {
460     fn accept<'node>(
461         &'node self,
462         c: &mut P::Context,
463         v: &mut dyn Visitor<'node, P = P>,
464     ) -> Result<(), P::Error> {
465         v.visit_class_typeconst_def(c, self)
466     }
467     fn recurse<'node>(
468         &'node self,
469         c: &mut P::Context,
470         v: &mut dyn Visitor<'node, P = P>,
471     ) -> Result<(), P::Error> {
472         self.user_attributes.accept(c, v)?;
473         self.name.accept(c, v)?;
474         self.kind.accept(c, v)?;
475         self.span.accept(c, v)?;
476         self.doc_comment.accept(c, v)?;
477         self.is_ctx.accept(c, v)?;
478         Ok(())
479     }
481 impl<P: Params> Node<P> for ClassVar<P::Ex, P::En> {
482     fn accept<'node>(
483         &'node self,
484         c: &mut P::Context,
485         v: &mut dyn Visitor<'node, P = P>,
486     ) -> Result<(), P::Error> {
487         v.visit_class_var(c, self)
488     }
489     fn recurse<'node>(
490         &'node self,
491         c: &mut P::Context,
492         v: &mut dyn Visitor<'node, P = P>,
493     ) -> Result<(), P::Error> {
494         self.final_.accept(c, v)?;
495         self.xhp_attr.accept(c, v)?;
496         self.abstract_.accept(c, v)?;
497         self.readonly.accept(c, v)?;
498         self.visibility.accept(c, v)?;
499         self.type_.accept(c, v)?;
500         self.id.accept(c, v)?;
501         self.expr.accept(c, v)?;
502         self.user_attributes.accept(c, v)?;
503         self.doc_comment.accept(c, v)?;
504         self.is_promoted_variadic.accept(c, v)?;
505         self.is_static.accept(c, v)?;
506         self.span.accept(c, v)?;
507         Ok(())
508     }
510 impl<P: Params> Node<P> for Class_<P::Ex, P::En> {
511     fn accept<'node>(
512         &'node self,
513         c: &mut P::Context,
514         v: &mut dyn Visitor<'node, P = P>,
515     ) -> Result<(), P::Error> {
516         v.visit_class_(c, self)
517     }
518     fn recurse<'node>(
519         &'node self,
520         c: &mut P::Context,
521         v: &mut dyn Visitor<'node, P = P>,
522     ) -> Result<(), P::Error> {
523         self.span.accept(c, v)?;
524         v.visit_en(c, &self.annotation)?;
525         self.mode.accept(c, v)?;
526         self.final_.accept(c, v)?;
527         self.is_xhp.accept(c, v)?;
528         self.has_xhp_keyword.accept(c, v)?;
529         self.kind.accept(c, v)?;
530         self.name.accept(c, v)?;
531         self.tparams.accept(c, v)?;
532         self.extends.accept(c, v)?;
533         self.uses.accept(c, v)?;
534         self.use_as_alias.accept(c, v)?;
535         self.insteadof_alias.accept(c, v)?;
536         self.xhp_attr_uses.accept(c, v)?;
537         self.xhp_category.accept(c, v)?;
538         self.reqs.accept(c, v)?;
539         self.implements.accept(c, v)?;
540         self.where_constraints.accept(c, v)?;
541         self.consts.accept(c, v)?;
542         self.typeconsts.accept(c, v)?;
543         self.vars.accept(c, v)?;
544         self.methods.accept(c, v)?;
545         self.attributes.accept(c, v)?;
546         self.xhp_children.accept(c, v)?;
547         self.xhp_attrs.accept(c, v)?;
548         self.namespace.accept(c, v)?;
549         self.user_attributes.accept(c, v)?;
550         self.file_attributes.accept(c, v)?;
551         self.enum_.accept(c, v)?;
552         self.doc_comment.accept(c, v)?;
553         self.emit_id.accept(c, v)?;
554         Ok(())
555     }
557 impl<P: Params> Node<P> for ClassishKind {
558     fn accept<'node>(
559         &'node self,
560         c: &mut P::Context,
561         v: &mut dyn Visitor<'node, P = P>,
562     ) -> Result<(), P::Error> {
563         v.visit_classish_kind(c, self)
564     }
565     fn recurse<'node>(
566         &'node self,
567         c: &mut P::Context,
568         v: &mut dyn Visitor<'node, P = P>,
569     ) -> Result<(), P::Error> {
570         match self {
571             ClassishKind::Cclass(a0) => {
572                 a0.accept(c, v)?;
573                 Ok(())
574             }
575             ClassishKind::Cinterface => Ok(()),
576             ClassishKind::Ctrait => Ok(()),
577             ClassishKind::Cenum => Ok(()),
578             ClassishKind::CenumClass(a0) => {
579                 a0.accept(c, v)?;
580                 Ok(())
581             }
582         }
583     }
585 impl<P: Params> Node<P> for CollectionTarg<P::Ex> {
586     fn accept<'node>(
587         &'node self,
588         c: &mut P::Context,
589         v: &mut dyn Visitor<'node, P = P>,
590     ) -> Result<(), P::Error> {
591         v.visit_collection_targ(c, self)
592     }
593     fn recurse<'node>(
594         &'node self,
595         c: &mut P::Context,
596         v: &mut dyn Visitor<'node, P = P>,
597     ) -> Result<(), P::Error> {
598         match self {
599             CollectionTarg::CollectionTV(a0) => {
600                 a0.accept(c, v)?;
601                 Ok(())
602             }
603             CollectionTarg::CollectionTKV(a0, a1) => {
604                 a0.accept(c, v)?;
605                 a1.accept(c, v)?;
606                 Ok(())
607             }
608         }
609     }
611 impl<P: Params> Node<P> for ConstraintKind {
612     fn accept<'node>(
613         &'node self,
614         c: &mut P::Context,
615         v: &mut dyn Visitor<'node, P = P>,
616     ) -> Result<(), P::Error> {
617         v.visit_constraint_kind(c, self)
618     }
619     fn recurse<'node>(
620         &'node self,
621         c: &mut P::Context,
622         v: &mut dyn Visitor<'node, P = P>,
623     ) -> Result<(), P::Error> {
624         match self {
625             ConstraintKind::ConstraintAs => Ok(()),
626             ConstraintKind::ConstraintEq => Ok(()),
627             ConstraintKind::ConstraintSuper => Ok(()),
628         }
629     }
631 impl<P: Params> Node<P> for Contexts {
632     fn accept<'node>(
633         &'node self,
634         c: &mut P::Context,
635         v: &mut dyn Visitor<'node, P = P>,
636     ) -> Result<(), P::Error> {
637         v.visit_contexts(c, self)
638     }
639     fn recurse<'node>(
640         &'node self,
641         c: &mut P::Context,
642         v: &mut dyn Visitor<'node, P = P>,
643     ) -> Result<(), P::Error> {
644         self.0.accept(c, v)?;
645         self.1.accept(c, v)?;
646         Ok(())
647     }
649 impl<P: Params> Node<P> for Def<P::Ex, P::En> {
650     fn accept<'node>(
651         &'node self,
652         c: &mut P::Context,
653         v: &mut dyn Visitor<'node, P = P>,
654     ) -> Result<(), P::Error> {
655         v.visit_def(c, self)
656     }
657     fn recurse<'node>(
658         &'node self,
659         c: &mut P::Context,
660         v: &mut dyn Visitor<'node, P = P>,
661     ) -> Result<(), P::Error> {
662         match self {
663             Def::Fun(a0) => {
664                 a0.accept(c, v)?;
665                 Ok(())
666             }
667             Def::Class(a0) => {
668                 a0.accept(c, v)?;
669                 Ok(())
670             }
671             Def::RecordDef(a0) => {
672                 a0.accept(c, v)?;
673                 Ok(())
674             }
675             Def::Stmt(a0) => {
676                 a0.accept(c, v)?;
677                 Ok(())
678             }
679             Def::Typedef(a0) => {
680                 a0.accept(c, v)?;
681                 Ok(())
682             }
683             Def::Constant(a0) => {
684                 a0.accept(c, v)?;
685                 Ok(())
686             }
687             Def::Namespace(a) => {
688                 a.0.accept(c, v)?;
689                 a.1.accept(c, v)?;
690                 Ok(())
691             }
692             Def::NamespaceUse(a0) => {
693                 a0.accept(c, v)?;
694                 Ok(())
695             }
696             Def::SetNamespaceEnv(a0) => {
697                 a0.accept(c, v)?;
698                 Ok(())
699             }
700             Def::FileAttributes(a0) => {
701                 a0.accept(c, v)?;
702                 Ok(())
703             }
704         }
705     }
707 impl<P: Params> Node<P> for DocComment {
708     fn accept<'node>(
709         &'node self,
710         c: &mut P::Context,
711         v: &mut dyn Visitor<'node, P = P>,
712     ) -> Result<(), P::Error> {
713         v.visit_doc_comment(c, self)
714     }
715     fn recurse<'node>(
716         &'node self,
717         c: &mut P::Context,
718         v: &mut dyn Visitor<'node, P = P>,
719     ) -> Result<(), P::Error> {
720         self.0.accept(c, v)?;
721         Ok(())
722     }
724 impl<P: Params> Node<P> for EmitId {
725     fn accept<'node>(
726         &'node self,
727         c: &mut P::Context,
728         v: &mut dyn Visitor<'node, P = P>,
729     ) -> Result<(), P::Error> {
730         v.visit_emit_id(c, self)
731     }
732     fn recurse<'node>(
733         &'node self,
734         c: &mut P::Context,
735         v: &mut dyn Visitor<'node, P = P>,
736     ) -> Result<(), P::Error> {
737         match self {
738             EmitId::EmitId(a0) => {
739                 a0.accept(c, v)?;
740                 Ok(())
741             }
742             EmitId::Anonymous => Ok(()),
743         }
744     }
746 impl<P: Params> Node<P> for Enum_ {
747     fn accept<'node>(
748         &'node self,
749         c: &mut P::Context,
750         v: &mut dyn Visitor<'node, P = P>,
751     ) -> Result<(), P::Error> {
752         v.visit_enum_(c, self)
753     }
754     fn recurse<'node>(
755         &'node self,
756         c: &mut P::Context,
757         v: &mut dyn Visitor<'node, P = P>,
758     ) -> Result<(), P::Error> {
759         self.base.accept(c, v)?;
760         self.constraint.accept(c, v)?;
761         self.includes.accept(c, v)?;
762         Ok(())
763     }
765 impl<P: Params> Node<P> for EnvAnnot {
766     fn accept<'node>(
767         &'node self,
768         c: &mut P::Context,
769         v: &mut dyn Visitor<'node, P = P>,
770     ) -> Result<(), P::Error> {
771         v.visit_env_annot(c, self)
772     }
773     fn recurse<'node>(
774         &'node self,
775         c: &mut P::Context,
776         v: &mut dyn Visitor<'node, P = P>,
777     ) -> Result<(), P::Error> {
778         match self {
779             EnvAnnot::Join => Ok(()),
780             EnvAnnot::Refinement => Ok(()),
781         }
782     }
784 impl<P: Params> Node<P> for Expr<P::Ex, P::En> {
785     fn accept<'node>(
786         &'node self,
787         c: &mut P::Context,
788         v: &mut dyn Visitor<'node, P = P>,
789     ) -> Result<(), P::Error> {
790         v.visit_expr(c, self)
791     }
792     fn recurse<'node>(
793         &'node self,
794         c: &mut P::Context,
795         v: &mut dyn Visitor<'node, P = P>,
796     ) -> Result<(), P::Error> {
797         v.visit_ex(c, &self.0)?;
798         self.1.accept(c, v)?;
799         self.2.accept(c, v)?;
800         Ok(())
801     }
803 impl<P: Params> Node<P> for Expr_<P::Ex, P::En> {
804     fn accept<'node>(
805         &'node self,
806         c: &mut P::Context,
807         v: &mut dyn Visitor<'node, P = P>,
808     ) -> Result<(), P::Error> {
809         v.visit_expr_(c, self)
810     }
811     fn recurse<'node>(
812         &'node self,
813         c: &mut P::Context,
814         v: &mut dyn Visitor<'node, P = P>,
815     ) -> Result<(), P::Error> {
816         match self {
817             Expr_::Darray(a) => {
818                 a.0.accept(c, v)?;
819                 a.1.accept(c, v)?;
820                 Ok(())
821             }
822             Expr_::Varray(a) => {
823                 a.0.accept(c, v)?;
824                 a.1.accept(c, v)?;
825                 Ok(())
826             }
827             Expr_::Shape(a0) => {
828                 a0.accept(c, v)?;
829                 Ok(())
830             }
831             Expr_::ValCollection(a) => {
832                 a.0.accept(c, v)?;
833                 a.1.accept(c, v)?;
834                 a.2.accept(c, v)?;
835                 Ok(())
836             }
837             Expr_::KeyValCollection(a) => {
838                 a.0.accept(c, v)?;
839                 a.1.accept(c, v)?;
840                 a.2.accept(c, v)?;
841                 Ok(())
842             }
843             Expr_::Null => Ok(()),
844             Expr_::This => Ok(()),
845             Expr_::True => Ok(()),
846             Expr_::False => Ok(()),
847             Expr_::Omitted => Ok(()),
848             Expr_::Id(a0) => {
849                 a0.accept(c, v)?;
850                 Ok(())
851             }
852             Expr_::Lvar(a0) => {
853                 a0.accept(c, v)?;
854                 Ok(())
855             }
856             Expr_::Dollardollar(a0) => {
857                 a0.accept(c, v)?;
858                 Ok(())
859             }
860             Expr_::Clone(a0) => {
861                 a0.accept(c, v)?;
862                 Ok(())
863             }
864             Expr_::ArrayGet(a) => {
865                 a.0.accept(c, v)?;
866                 a.1.accept(c, v)?;
867                 Ok(())
868             }
869             Expr_::ObjGet(a) => {
870                 a.0.accept(c, v)?;
871                 a.1.accept(c, v)?;
872                 a.2.accept(c, v)?;
873                 a.3.accept(c, v)?;
874                 Ok(())
875             }
876             Expr_::ClassGet(a) => {
877                 a.0.accept(c, v)?;
878                 a.1.accept(c, v)?;
879                 a.2.accept(c, v)?;
880                 Ok(())
881             }
882             Expr_::ClassConst(a) => {
883                 a.0.accept(c, v)?;
884                 a.1.accept(c, v)?;
885                 Ok(())
886             }
887             Expr_::Call(a) => {
888                 a.0.accept(c, v)?;
889                 a.1.accept(c, v)?;
890                 a.2.accept(c, v)?;
891                 a.3.accept(c, v)?;
892                 Ok(())
893             }
894             Expr_::FunctionPointer(a) => {
895                 a.0.accept(c, v)?;
896                 a.1.accept(c, v)?;
897                 Ok(())
898             }
899             Expr_::Int(a0) => {
900                 a0.accept(c, v)?;
901                 Ok(())
902             }
903             Expr_::Float(a0) => {
904                 a0.accept(c, v)?;
905                 Ok(())
906             }
907             Expr_::String(a0) => {
908                 a0.accept(c, v)?;
909                 Ok(())
910             }
911             Expr_::String2(a0) => {
912                 a0.accept(c, v)?;
913                 Ok(())
914             }
915             Expr_::PrefixedString(a) => {
916                 a.0.accept(c, v)?;
917                 a.1.accept(c, v)?;
918                 Ok(())
919             }
920             Expr_::Yield(a0) => {
921                 a0.accept(c, v)?;
922                 Ok(())
923             }
924             Expr_::Await(a0) => {
925                 a0.accept(c, v)?;
926                 Ok(())
927             }
928             Expr_::ReadonlyExpr(a0) => {
929                 a0.accept(c, v)?;
930                 Ok(())
931             }
932             Expr_::Tuple(a0) => {
933                 a0.accept(c, v)?;
934                 Ok(())
935             }
936             Expr_::List(a0) => {
937                 a0.accept(c, v)?;
938                 Ok(())
939             }
940             Expr_::Cast(a) => {
941                 a.0.accept(c, v)?;
942                 a.1.accept(c, v)?;
943                 Ok(())
944             }
945             Expr_::Unop(a) => {
946                 a.0.accept(c, v)?;
947                 a.1.accept(c, v)?;
948                 Ok(())
949             }
950             Expr_::Binop(a) => {
951                 a.0.accept(c, v)?;
952                 a.1.accept(c, v)?;
953                 a.2.accept(c, v)?;
954                 Ok(())
955             }
956             Expr_::Pipe(a) => {
957                 a.0.accept(c, v)?;
958                 a.1.accept(c, v)?;
959                 a.2.accept(c, v)?;
960                 Ok(())
961             }
962             Expr_::Eif(a) => {
963                 a.0.accept(c, v)?;
964                 a.1.accept(c, v)?;
965                 a.2.accept(c, v)?;
966                 Ok(())
967             }
968             Expr_::Is(a) => {
969                 a.0.accept(c, v)?;
970                 a.1.accept(c, v)?;
971                 Ok(())
972             }
973             Expr_::As(a) => {
974                 a.0.accept(c, v)?;
975                 a.1.accept(c, v)?;
976                 a.2.accept(c, v)?;
977                 Ok(())
978             }
979             Expr_::Upcast(a) => {
980                 a.0.accept(c, v)?;
981                 a.1.accept(c, v)?;
982                 Ok(())
983             }
984             Expr_::New(a) => {
985                 a.0.accept(c, v)?;
986                 a.1.accept(c, v)?;
987                 a.2.accept(c, v)?;
988                 a.3.accept(c, v)?;
989                 v.visit_ex(c, &a.4)?;
990                 Ok(())
991             }
992             Expr_::Record(a) => {
993                 a.0.accept(c, v)?;
994                 a.1.accept(c, v)?;
995                 Ok(())
996             }
997             Expr_::Efun(a) => {
998                 a.0.accept(c, v)?;
999                 a.1.accept(c, v)?;
1000                 Ok(())
1001             }
1002             Expr_::Lfun(a) => {
1003                 a.0.accept(c, v)?;
1004                 a.1.accept(c, v)?;
1005                 Ok(())
1006             }
1007             Expr_::Xml(a) => {
1008                 a.0.accept(c, v)?;
1009                 a.1.accept(c, v)?;
1010                 a.2.accept(c, v)?;
1011                 Ok(())
1012             }
1013             Expr_::Callconv(a) => {
1014                 a.0.accept(c, v)?;
1015                 a.1.accept(c, v)?;
1016                 Ok(())
1017             }
1018             Expr_::Import(a) => {
1019                 a.0.accept(c, v)?;
1020                 a.1.accept(c, v)?;
1021                 Ok(())
1022             }
1023             Expr_::Collection(a) => {
1024                 a.0.accept(c, v)?;
1025                 a.1.accept(c, v)?;
1026                 a.2.accept(c, v)?;
1027                 Ok(())
1028             }
1029             Expr_::ExpressionTree(a0) => {
1030                 a0.accept(c, v)?;
1031                 Ok(())
1032             }
1033             Expr_::Lplaceholder(a0) => {
1034                 a0.accept(c, v)?;
1035                 Ok(())
1036             }
1037             Expr_::FunId(a0) => {
1038                 a0.accept(c, v)?;
1039                 Ok(())
1040             }
1041             Expr_::MethodId(a) => {
1042                 a.0.accept(c, v)?;
1043                 a.1.accept(c, v)?;
1044                 Ok(())
1045             }
1046             Expr_::MethodCaller(a) => {
1047                 a.0.accept(c, v)?;
1048                 a.1.accept(c, v)?;
1049                 Ok(())
1050             }
1051             Expr_::SmethodId(a) => {
1052                 a.0.accept(c, v)?;
1053                 a.1.accept(c, v)?;
1054                 Ok(())
1055             }
1056             Expr_::Pair(a) => {
1057                 a.0.accept(c, v)?;
1058                 a.1.accept(c, v)?;
1059                 a.2.accept(c, v)?;
1060                 Ok(())
1061             }
1062             Expr_::ETSplice(a0) => {
1063                 a0.accept(c, v)?;
1064                 Ok(())
1065             }
1066             Expr_::EnumClassLabel(a) => {
1067                 a.0.accept(c, v)?;
1068                 a.1.accept(c, v)?;
1069                 Ok(())
1070             }
1071             Expr_::Hole(a) => {
1072                 a.0.accept(c, v)?;
1073                 v.visit_ex(c, &a.1)?;
1074                 v.visit_ex(c, &a.2)?;
1075                 a.3.accept(c, v)?;
1076                 Ok(())
1077             }
1078         }
1079     }
1081 impl<P: Params> Node<P> for ExpressionTree<P::Ex, P::En> {
1082     fn accept<'node>(
1083         &'node self,
1084         c: &mut P::Context,
1085         v: &mut dyn Visitor<'node, P = P>,
1086     ) -> Result<(), P::Error> {
1087         v.visit_expression_tree(c, self)
1088     }
1089     fn recurse<'node>(
1090         &'node self,
1091         c: &mut P::Context,
1092         v: &mut dyn Visitor<'node, P = P>,
1093     ) -> Result<(), P::Error> {
1094         self.hint.accept(c, v)?;
1095         self.splices.accept(c, v)?;
1096         self.function_pointers.accept(c, v)?;
1097         self.virtualized_expr.accept(c, v)?;
1098         self.runtime_expr.accept(c, v)?;
1099         Ok(())
1100     }
1102 impl<P: Params> Node<P> for Field<P::Ex, P::En> {
1103     fn accept<'node>(
1104         &'node self,
1105         c: &mut P::Context,
1106         v: &mut dyn Visitor<'node, P = P>,
1107     ) -> Result<(), P::Error> {
1108         v.visit_field(c, self)
1109     }
1110     fn recurse<'node>(
1111         &'node self,
1112         c: &mut P::Context,
1113         v: &mut dyn Visitor<'node, P = P>,
1114     ) -> Result<(), P::Error> {
1115         self.0.accept(c, v)?;
1116         self.1.accept(c, v)?;
1117         Ok(())
1118     }
1120 impl<P: Params> Node<P> for FileAttribute<P::Ex, P::En> {
1121     fn accept<'node>(
1122         &'node self,
1123         c: &mut P::Context,
1124         v: &mut dyn Visitor<'node, P = P>,
1125     ) -> Result<(), P::Error> {
1126         v.visit_file_attribute(c, self)
1127     }
1128     fn recurse<'node>(
1129         &'node self,
1130         c: &mut P::Context,
1131         v: &mut dyn Visitor<'node, P = P>,
1132     ) -> Result<(), P::Error> {
1133         self.user_attributes.accept(c, v)?;
1134         self.namespace.accept(c, v)?;
1135         Ok(())
1136     }
1138 impl<P: Params> Node<P> for FunDef<P::Ex, P::En> {
1139     fn accept<'node>(
1140         &'node self,
1141         c: &mut P::Context,
1142         v: &mut dyn Visitor<'node, P = P>,
1143     ) -> Result<(), P::Error> {
1144         v.visit_fun_def(c, self)
1145     }
1146     fn recurse<'node>(
1147         &'node self,
1148         c: &mut P::Context,
1149         v: &mut dyn Visitor<'node, P = P>,
1150     ) -> Result<(), P::Error> {
1151         self.namespace.accept(c, v)?;
1152         self.file_attributes.accept(c, v)?;
1153         self.mode.accept(c, v)?;
1154         self.fun.accept(c, v)?;
1155         Ok(())
1156     }
1158 impl<P: Params> Node<P> for FunKind {
1159     fn accept<'node>(
1160         &'node self,
1161         c: &mut P::Context,
1162         v: &mut dyn Visitor<'node, P = P>,
1163     ) -> Result<(), P::Error> {
1164         v.visit_fun_kind(c, self)
1165     }
1166     fn recurse<'node>(
1167         &'node self,
1168         c: &mut P::Context,
1169         v: &mut dyn Visitor<'node, P = P>,
1170     ) -> Result<(), P::Error> {
1171         match self {
1172             FunKind::FSync => Ok(()),
1173             FunKind::FAsync => Ok(()),
1174             FunKind::FGenerator => Ok(()),
1175             FunKind::FAsyncGenerator => Ok(()),
1176         }
1177     }
1179 impl<P: Params> Node<P> for FunParam<P::Ex, P::En> {
1180     fn accept<'node>(
1181         &'node self,
1182         c: &mut P::Context,
1183         v: &mut dyn Visitor<'node, P = P>,
1184     ) -> Result<(), P::Error> {
1185         v.visit_fun_param(c, self)
1186     }
1187     fn recurse<'node>(
1188         &'node self,
1189         c: &mut P::Context,
1190         v: &mut dyn Visitor<'node, P = P>,
1191     ) -> Result<(), P::Error> {
1192         v.visit_ex(c, &self.annotation)?;
1193         self.type_hint.accept(c, v)?;
1194         self.is_variadic.accept(c, v)?;
1195         self.pos.accept(c, v)?;
1196         self.name.accept(c, v)?;
1197         self.expr.accept(c, v)?;
1198         self.readonly.accept(c, v)?;
1199         self.callconv.accept(c, v)?;
1200         self.user_attributes.accept(c, v)?;
1201         self.visibility.accept(c, v)?;
1202         Ok(())
1203     }
1205 impl<P: Params> Node<P> for FunVariadicity<P::Ex, P::En> {
1206     fn accept<'node>(
1207         &'node self,
1208         c: &mut P::Context,
1209         v: &mut dyn Visitor<'node, P = P>,
1210     ) -> Result<(), P::Error> {
1211         v.visit_fun_variadicity(c, self)
1212     }
1213     fn recurse<'node>(
1214         &'node self,
1215         c: &mut P::Context,
1216         v: &mut dyn Visitor<'node, P = P>,
1217     ) -> Result<(), P::Error> {
1218         match self {
1219             FunVariadicity::FVvariadicArg(a0) => {
1220                 a0.accept(c, v)?;
1221                 Ok(())
1222             }
1223             FunVariadicity::FVellipsis(a0) => {
1224                 a0.accept(c, v)?;
1225                 Ok(())
1226             }
1227             FunVariadicity::FVnonVariadic => Ok(()),
1228         }
1229     }
1231 impl<P: Params> Node<P> for Fun_<P::Ex, P::En> {
1232     fn accept<'node>(
1233         &'node self,
1234         c: &mut P::Context,
1235         v: &mut dyn Visitor<'node, P = P>,
1236     ) -> Result<(), P::Error> {
1237         v.visit_fun_(c, self)
1238     }
1239     fn recurse<'node>(
1240         &'node self,
1241         c: &mut P::Context,
1242         v: &mut dyn Visitor<'node, P = P>,
1243     ) -> Result<(), P::Error> {
1244         self.span.accept(c, v)?;
1245         self.readonly_this.accept(c, v)?;
1246         v.visit_en(c, &self.annotation)?;
1247         self.readonly_ret.accept(c, v)?;
1248         self.ret.accept(c, v)?;
1249         self.name.accept(c, v)?;
1250         self.tparams.accept(c, v)?;
1251         self.where_constraints.accept(c, v)?;
1252         self.variadic.accept(c, v)?;
1253         self.params.accept(c, v)?;
1254         self.ctxs.accept(c, v)?;
1255         self.unsafe_ctxs.accept(c, v)?;
1256         self.body.accept(c, v)?;
1257         self.fun_kind.accept(c, v)?;
1258         self.user_attributes.accept(c, v)?;
1259         self.external.accept(c, v)?;
1260         self.doc_comment.accept(c, v)?;
1261         Ok(())
1262     }
1264 impl<P: Params> Node<P> for FuncBody<P::Ex, P::En> {
1265     fn accept<'node>(
1266         &'node self,
1267         c: &mut P::Context,
1268         v: &mut dyn Visitor<'node, P = P>,
1269     ) -> Result<(), P::Error> {
1270         v.visit_func_body(c, self)
1271     }
1272     fn recurse<'node>(
1273         &'node self,
1274         c: &mut P::Context,
1275         v: &mut dyn Visitor<'node, P = P>,
1276     ) -> Result<(), P::Error> {
1277         self.fb_ast.accept(c, v)?;
1278         Ok(())
1279     }
1281 impl<P: Params> Node<P> for FunctionPtrId<P::Ex, P::En> {
1282     fn accept<'node>(
1283         &'node self,
1284         c: &mut P::Context,
1285         v: &mut dyn Visitor<'node, P = P>,
1286     ) -> Result<(), P::Error> {
1287         v.visit_function_ptr_id(c, self)
1288     }
1289     fn recurse<'node>(
1290         &'node self,
1291         c: &mut P::Context,
1292         v: &mut dyn Visitor<'node, P = P>,
1293     ) -> Result<(), P::Error> {
1294         match self {
1295             FunctionPtrId::FPId(a0) => {
1296                 a0.accept(c, v)?;
1297                 Ok(())
1298             }
1299             FunctionPtrId::FPClassConst(a0, a1) => {
1300                 a0.accept(c, v)?;
1301                 a1.accept(c, v)?;
1302                 Ok(())
1303             }
1304         }
1305     }
1307 impl<P: Params> Node<P> for Gconst<P::Ex, P::En> {
1308     fn accept<'node>(
1309         &'node self,
1310         c: &mut P::Context,
1311         v: &mut dyn Visitor<'node, P = P>,
1312     ) -> Result<(), P::Error> {
1313         v.visit_gconst(c, self)
1314     }
1315     fn recurse<'node>(
1316         &'node self,
1317         c: &mut P::Context,
1318         v: &mut dyn Visitor<'node, P = P>,
1319     ) -> Result<(), P::Error> {
1320         v.visit_en(c, &self.annotation)?;
1321         self.mode.accept(c, v)?;
1322         self.name.accept(c, v)?;
1323         self.type_.accept(c, v)?;
1324         self.value.accept(c, v)?;
1325         self.namespace.accept(c, v)?;
1326         self.span.accept(c, v)?;
1327         self.emit_id.accept(c, v)?;
1328         Ok(())
1329     }
1331 impl<P: Params> Node<P> for HfParamInfo {
1332     fn accept<'node>(
1333         &'node self,
1334         c: &mut P::Context,
1335         v: &mut dyn Visitor<'node, P = P>,
1336     ) -> Result<(), P::Error> {
1337         v.visit_hf_param_info(c, self)
1338     }
1339     fn recurse<'node>(
1340         &'node self,
1341         c: &mut P::Context,
1342         v: &mut dyn Visitor<'node, P = P>,
1343     ) -> Result<(), P::Error> {
1344         self.kind.accept(c, v)?;
1345         self.readonlyness.accept(c, v)?;
1346         Ok(())
1347     }
1349 impl<P: Params> Node<P> for Hint {
1350     fn accept<'node>(
1351         &'node self,
1352         c: &mut P::Context,
1353         v: &mut dyn Visitor<'node, P = P>,
1354     ) -> Result<(), P::Error> {
1355         v.visit_hint(c, self)
1356     }
1357     fn recurse<'node>(
1358         &'node self,
1359         c: &mut P::Context,
1360         v: &mut dyn Visitor<'node, P = P>,
1361     ) -> Result<(), P::Error> {
1362         self.0.accept(c, v)?;
1363         self.1.accept(c, v)?;
1364         Ok(())
1365     }
1367 impl<P: Params> Node<P> for HintFun {
1368     fn accept<'node>(
1369         &'node self,
1370         c: &mut P::Context,
1371         v: &mut dyn Visitor<'node, P = P>,
1372     ) -> Result<(), P::Error> {
1373         v.visit_hint_fun(c, self)
1374     }
1375     fn recurse<'node>(
1376         &'node self,
1377         c: &mut P::Context,
1378         v: &mut dyn Visitor<'node, P = P>,
1379     ) -> Result<(), P::Error> {
1380         self.is_readonly.accept(c, v)?;
1381         self.param_tys.accept(c, v)?;
1382         self.param_info.accept(c, v)?;
1383         self.variadic_ty.accept(c, v)?;
1384         self.ctxs.accept(c, v)?;
1385         self.return_ty.accept(c, v)?;
1386         self.is_readonly_return.accept(c, v)?;
1387         Ok(())
1388     }
1390 impl<P: Params> Node<P> for Hint_ {
1391     fn accept<'node>(
1392         &'node self,
1393         c: &mut P::Context,
1394         v: &mut dyn Visitor<'node, P = P>,
1395     ) -> Result<(), P::Error> {
1396         v.visit_hint_(c, self)
1397     }
1398     fn recurse<'node>(
1399         &'node self,
1400         c: &mut P::Context,
1401         v: &mut dyn Visitor<'node, P = P>,
1402     ) -> Result<(), P::Error> {
1403         match self {
1404             Hint_::Hoption(a0) => {
1405                 a0.accept(c, v)?;
1406                 Ok(())
1407             }
1408             Hint_::Hlike(a0) => {
1409                 a0.accept(c, v)?;
1410                 Ok(())
1411             }
1412             Hint_::Hfun(a0) => {
1413                 a0.accept(c, v)?;
1414                 Ok(())
1415             }
1416             Hint_::Htuple(a0) => {
1417                 a0.accept(c, v)?;
1418                 Ok(())
1419             }
1420             Hint_::Happly(a0, a1) => {
1421                 a0.accept(c, v)?;
1422                 a1.accept(c, v)?;
1423                 Ok(())
1424             }
1425             Hint_::Hshape(a0) => {
1426                 a0.accept(c, v)?;
1427                 Ok(())
1428             }
1429             Hint_::Haccess(a0, a1) => {
1430                 a0.accept(c, v)?;
1431                 a1.accept(c, v)?;
1432                 Ok(())
1433             }
1434             Hint_::Hsoft(a0) => {
1435                 a0.accept(c, v)?;
1436                 Ok(())
1437             }
1438             Hint_::Hany => Ok(()),
1439             Hint_::Herr => Ok(()),
1440             Hint_::Hmixed => Ok(()),
1441             Hint_::Hnonnull => Ok(()),
1442             Hint_::Habstr(a0, a1) => {
1443                 a0.accept(c, v)?;
1444                 a1.accept(c, v)?;
1445                 Ok(())
1446             }
1447             Hint_::Hdarray(a0, a1) => {
1448                 a0.accept(c, v)?;
1449                 a1.accept(c, v)?;
1450                 Ok(())
1451             }
1452             Hint_::Hvarray(a0) => {
1453                 a0.accept(c, v)?;
1454                 Ok(())
1455             }
1456             Hint_::HvarrayOrDarray(a0, a1) => {
1457                 a0.accept(c, v)?;
1458                 a1.accept(c, v)?;
1459                 Ok(())
1460             }
1461             Hint_::HvecOrDict(a0, a1) => {
1462                 a0.accept(c, v)?;
1463                 a1.accept(c, v)?;
1464                 Ok(())
1465             }
1466             Hint_::Hprim(a0) => {
1467                 a0.accept(c, v)?;
1468                 Ok(())
1469             }
1470             Hint_::Hthis => Ok(()),
1471             Hint_::Hdynamic => Ok(()),
1472             Hint_::Hnothing => Ok(()),
1473             Hint_::Hunion(a0) => {
1474                 a0.accept(c, v)?;
1475                 Ok(())
1476             }
1477             Hint_::Hintersection(a0) => {
1478                 a0.accept(c, v)?;
1479                 Ok(())
1480             }
1481             Hint_::HfunContext(a0) => {
1482                 a0.accept(c, v)?;
1483                 Ok(())
1484             }
1485             Hint_::Hvar(a0) => {
1486                 a0.accept(c, v)?;
1487                 Ok(())
1488             }
1489         }
1490     }
1492 impl<P: Params> Node<P> for HoleSource {
1493     fn accept<'node>(
1494         &'node self,
1495         c: &mut P::Context,
1496         v: &mut dyn Visitor<'node, P = P>,
1497     ) -> Result<(), P::Error> {
1498         v.visit_hole_source(c, self)
1499     }
1500     fn recurse<'node>(
1501         &'node self,
1502         c: &mut P::Context,
1503         v: &mut dyn Visitor<'node, P = P>,
1504     ) -> Result<(), P::Error> {
1505         match self {
1506             HoleSource::Typing => Ok(()),
1507             HoleSource::UnsafeCast(a0) => {
1508                 a0.accept(c, v)?;
1509                 Ok(())
1510             }
1511             HoleSource::EnforcedCast(a0) => {
1512                 a0.accept(c, v)?;
1513                 Ok(())
1514             }
1515         }
1516     }
1518 impl<P: Params> Node<P> for Id {
1519     fn accept<'node>(
1520         &'node self,
1521         c: &mut P::Context,
1522         v: &mut dyn Visitor<'node, P = P>,
1523     ) -> Result<(), P::Error> {
1524         v.visit_id(c, self)
1525     }
1526     fn recurse<'node>(
1527         &'node self,
1528         c: &mut P::Context,
1529         v: &mut dyn Visitor<'node, P = P>,
1530     ) -> Result<(), P::Error> {
1531         self.0.accept(c, v)?;
1532         self.1.accept(c, v)?;
1533         Ok(())
1534     }
1536 impl<P: Params> Node<P> for ImportFlavor {
1537     fn accept<'node>(
1538         &'node self,
1539         c: &mut P::Context,
1540         v: &mut dyn Visitor<'node, P = P>,
1541     ) -> Result<(), P::Error> {
1542         v.visit_import_flavor(c, self)
1543     }
1544     fn recurse<'node>(
1545         &'node self,
1546         c: &mut P::Context,
1547         v: &mut dyn Visitor<'node, P = P>,
1548     ) -> Result<(), P::Error> {
1549         match self {
1550             ImportFlavor::Include => Ok(()),
1551             ImportFlavor::Require => Ok(()),
1552             ImportFlavor::IncludeOnce => Ok(()),
1553             ImportFlavor::RequireOnce => Ok(()),
1554         }
1555     }
1557 impl<P: Params> Node<P> for InsteadofAlias {
1558     fn accept<'node>(
1559         &'node self,
1560         c: &mut P::Context,
1561         v: &mut dyn Visitor<'node, P = P>,
1562     ) -> Result<(), P::Error> {
1563         v.visit_insteadof_alias(c, self)
1564     }
1565     fn recurse<'node>(
1566         &'node self,
1567         c: &mut P::Context,
1568         v: &mut dyn Visitor<'node, P = P>,
1569     ) -> Result<(), P::Error> {
1570         self.0.accept(c, v)?;
1571         self.1.accept(c, v)?;
1572         self.2.accept(c, v)?;
1573         Ok(())
1574     }
1576 impl<P: Params> Node<P> for KvcKind {
1577     fn accept<'node>(
1578         &'node self,
1579         c: &mut P::Context,
1580         v: &mut dyn Visitor<'node, P = P>,
1581     ) -> Result<(), P::Error> {
1582         v.visit_kvc_kind(c, self)
1583     }
1584     fn recurse<'node>(
1585         &'node self,
1586         c: &mut P::Context,
1587         v: &mut dyn Visitor<'node, P = P>,
1588     ) -> Result<(), P::Error> {
1589         match self {
1590             KvcKind::Map => Ok(()),
1591             KvcKind::ImmMap => Ok(()),
1592             KvcKind::Dict => Ok(()),
1593         }
1594     }
1596 impl<P: Params> Node<P> for Lid {
1597     fn accept<'node>(
1598         &'node self,
1599         c: &mut P::Context,
1600         v: &mut dyn Visitor<'node, P = P>,
1601     ) -> Result<(), P::Error> {
1602         v.visit_lid(c, self)
1603     }
1604     fn recurse<'node>(
1605         &'node self,
1606         c: &mut P::Context,
1607         v: &mut dyn Visitor<'node, P = P>,
1608     ) -> Result<(), P::Error> {
1609         self.0.accept(c, v)?;
1610         self.1.accept(c, v)?;
1611         Ok(())
1612     }
1614 impl<P: Params> Node<P> for Method_<P::Ex, P::En> {
1615     fn accept<'node>(
1616         &'node self,
1617         c: &mut P::Context,
1618         v: &mut dyn Visitor<'node, P = P>,
1619     ) -> Result<(), P::Error> {
1620         v.visit_method_(c, self)
1621     }
1622     fn recurse<'node>(
1623         &'node self,
1624         c: &mut P::Context,
1625         v: &mut dyn Visitor<'node, P = P>,
1626     ) -> Result<(), P::Error> {
1627         self.span.accept(c, v)?;
1628         v.visit_en(c, &self.annotation)?;
1629         self.final_.accept(c, v)?;
1630         self.abstract_.accept(c, v)?;
1631         self.static_.accept(c, v)?;
1632         self.readonly_this.accept(c, v)?;
1633         self.visibility.accept(c, v)?;
1634         self.name.accept(c, v)?;
1635         self.tparams.accept(c, v)?;
1636         self.where_constraints.accept(c, v)?;
1637         self.variadic.accept(c, v)?;
1638         self.params.accept(c, v)?;
1639         self.ctxs.accept(c, v)?;
1640         self.unsafe_ctxs.accept(c, v)?;
1641         self.body.accept(c, v)?;
1642         self.fun_kind.accept(c, v)?;
1643         self.user_attributes.accept(c, v)?;
1644         self.readonly_ret.accept(c, v)?;
1645         self.ret.accept(c, v)?;
1646         self.external.accept(c, v)?;
1647         self.doc_comment.accept(c, v)?;
1648         Ok(())
1649     }
1651 impl<P: Params> Node<P> for NastShapeInfo {
1652     fn accept<'node>(
1653         &'node self,
1654         c: &mut P::Context,
1655         v: &mut dyn Visitor<'node, P = P>,
1656     ) -> Result<(), P::Error> {
1657         v.visit_nast_shape_info(c, self)
1658     }
1659     fn recurse<'node>(
1660         &'node self,
1661         c: &mut P::Context,
1662         v: &mut dyn Visitor<'node, P = P>,
1663     ) -> Result<(), P::Error> {
1664         self.allows_unknown_fields.accept(c, v)?;
1665         self.field_map.accept(c, v)?;
1666         Ok(())
1667     }
1669 impl<P: Params> Node<P> for NsKind {
1670     fn accept<'node>(
1671         &'node self,
1672         c: &mut P::Context,
1673         v: &mut dyn Visitor<'node, P = P>,
1674     ) -> Result<(), P::Error> {
1675         v.visit_ns_kind(c, self)
1676     }
1677     fn recurse<'node>(
1678         &'node self,
1679         c: &mut P::Context,
1680         v: &mut dyn Visitor<'node, P = P>,
1681     ) -> Result<(), P::Error> {
1682         match self {
1683             NsKind::NSNamespace => Ok(()),
1684             NsKind::NSClass => Ok(()),
1685             NsKind::NSClassAndNamespace => Ok(()),
1686             NsKind::NSFun => Ok(()),
1687             NsKind::NSConst => Ok(()),
1688         }
1689     }
1691 impl<P: Params> Node<P> for OgNullFlavor {
1692     fn accept<'node>(
1693         &'node self,
1694         c: &mut P::Context,
1695         v: &mut dyn Visitor<'node, P = P>,
1696     ) -> Result<(), P::Error> {
1697         v.visit_og_null_flavor(c, self)
1698     }
1699     fn recurse<'node>(
1700         &'node self,
1701         c: &mut P::Context,
1702         v: &mut dyn Visitor<'node, P = P>,
1703     ) -> Result<(), P::Error> {
1704         match self {
1705             OgNullFlavor::OGNullthrows => Ok(()),
1706             OgNullFlavor::OGNullsafe => Ok(()),
1707         }
1708     }
1710 impl<P: Params> Node<P> for ParamKind {
1711     fn accept<'node>(
1712         &'node self,
1713         c: &mut P::Context,
1714         v: &mut dyn Visitor<'node, P = P>,
1715     ) -> Result<(), P::Error> {
1716         v.visit_param_kind(c, self)
1717     }
1718     fn recurse<'node>(
1719         &'node self,
1720         c: &mut P::Context,
1721         v: &mut dyn Visitor<'node, P = P>,
1722     ) -> Result<(), P::Error> {
1723         match self {
1724             ParamKind::Pinout => Ok(()),
1725         }
1726     }
1728 impl<P: Params> Node<P> for ReadonlyKind {
1729     fn accept<'node>(
1730         &'node self,
1731         c: &mut P::Context,
1732         v: &mut dyn Visitor<'node, P = P>,
1733     ) -> Result<(), P::Error> {
1734         v.visit_readonly_kind(c, self)
1735     }
1736     fn recurse<'node>(
1737         &'node self,
1738         c: &mut P::Context,
1739         v: &mut dyn Visitor<'node, P = P>,
1740     ) -> Result<(), P::Error> {
1741         match self {
1742             ReadonlyKind::Readonly => Ok(()),
1743         }
1744     }
1746 impl<P: Params> Node<P> for RecordDef<P::Ex, P::En> {
1747     fn accept<'node>(
1748         &'node self,
1749         c: &mut P::Context,
1750         v: &mut dyn Visitor<'node, P = P>,
1751     ) -> Result<(), P::Error> {
1752         v.visit_record_def(c, self)
1753     }
1754     fn recurse<'node>(
1755         &'node self,
1756         c: &mut P::Context,
1757         v: &mut dyn Visitor<'node, P = P>,
1758     ) -> Result<(), P::Error> {
1759         v.visit_en(c, &self.annotation)?;
1760         self.name.accept(c, v)?;
1761         self.extends.accept(c, v)?;
1762         self.abstract_.accept(c, v)?;
1763         self.fields.accept(c, v)?;
1764         self.user_attributes.accept(c, v)?;
1765         self.namespace.accept(c, v)?;
1766         self.span.accept(c, v)?;
1767         self.doc_comment.accept(c, v)?;
1768         self.emit_id.accept(c, v)?;
1769         Ok(())
1770     }
1772 impl<P: Params> Node<P> for ReifyKind {
1773     fn accept<'node>(
1774         &'node self,
1775         c: &mut P::Context,
1776         v: &mut dyn Visitor<'node, P = P>,
1777     ) -> Result<(), P::Error> {
1778         v.visit_reify_kind(c, self)
1779     }
1780     fn recurse<'node>(
1781         &'node self,
1782         c: &mut P::Context,
1783         v: &mut dyn Visitor<'node, P = P>,
1784     ) -> Result<(), P::Error> {
1785         match self {
1786             ReifyKind::Erased => Ok(()),
1787             ReifyKind::SoftReified => Ok(()),
1788             ReifyKind::Reified => Ok(()),
1789         }
1790     }
1792 impl<P: Params> Node<P> for ShapeFieldInfo {
1793     fn accept<'node>(
1794         &'node self,
1795         c: &mut P::Context,
1796         v: &mut dyn Visitor<'node, P = P>,
1797     ) -> Result<(), P::Error> {
1798         v.visit_shape_field_info(c, self)
1799     }
1800     fn recurse<'node>(
1801         &'node self,
1802         c: &mut P::Context,
1803         v: &mut dyn Visitor<'node, P = P>,
1804     ) -> Result<(), P::Error> {
1805         self.optional.accept(c, v)?;
1806         self.hint.accept(c, v)?;
1807         self.name.accept(c, v)?;
1808         Ok(())
1809     }
1811 impl<P: Params> Node<P> for ShapeFieldName {
1812     fn accept<'node>(
1813         &'node self,
1814         c: &mut P::Context,
1815         v: &mut dyn Visitor<'node, P = P>,
1816     ) -> Result<(), P::Error> {
1817         v.visit_shape_field_name(c, self)
1818     }
1819     fn recurse<'node>(
1820         &'node self,
1821         c: &mut P::Context,
1822         v: &mut dyn Visitor<'node, P = P>,
1823     ) -> Result<(), P::Error> {
1824         match self {
1825             ShapeFieldName::SFlitInt(a0) => {
1826                 a0.accept(c, v)?;
1827                 Ok(())
1828             }
1829             ShapeFieldName::SFlitStr(a0) => {
1830                 a0.accept(c, v)?;
1831                 Ok(())
1832             }
1833             ShapeFieldName::SFclassConst(a0, a1) => {
1834                 a0.accept(c, v)?;
1835                 a1.accept(c, v)?;
1836                 Ok(())
1837             }
1838         }
1839     }
1841 impl<P: Params> Node<P> for Stmt<P::Ex, P::En> {
1842     fn accept<'node>(
1843         &'node self,
1844         c: &mut P::Context,
1845         v: &mut dyn Visitor<'node, P = P>,
1846     ) -> Result<(), P::Error> {
1847         v.visit_stmt(c, self)
1848     }
1849     fn recurse<'node>(
1850         &'node self,
1851         c: &mut P::Context,
1852         v: &mut dyn Visitor<'node, P = P>,
1853     ) -> Result<(), P::Error> {
1854         self.0.accept(c, v)?;
1855         self.1.accept(c, v)?;
1856         Ok(())
1857     }
1859 impl<P: Params> Node<P> for Stmt_<P::Ex, P::En> {
1860     fn accept<'node>(
1861         &'node self,
1862         c: &mut P::Context,
1863         v: &mut dyn Visitor<'node, P = P>,
1864     ) -> Result<(), P::Error> {
1865         v.visit_stmt_(c, self)
1866     }
1867     fn recurse<'node>(
1868         &'node self,
1869         c: &mut P::Context,
1870         v: &mut dyn Visitor<'node, P = P>,
1871     ) -> Result<(), P::Error> {
1872         match self {
1873             Stmt_::Fallthrough => Ok(()),
1874             Stmt_::Expr(a0) => {
1875                 a0.accept(c, v)?;
1876                 Ok(())
1877             }
1878             Stmt_::Break => Ok(()),
1879             Stmt_::Continue => Ok(()),
1880             Stmt_::Throw(a0) => {
1881                 a0.accept(c, v)?;
1882                 Ok(())
1883             }
1884             Stmt_::Return(a0) => {
1885                 a0.accept(c, v)?;
1886                 Ok(())
1887             }
1888             Stmt_::YieldBreak => Ok(()),
1889             Stmt_::Awaitall(a) => {
1890                 a.0.accept(c, v)?;
1891                 a.1.accept(c, v)?;
1892                 Ok(())
1893             }
1894             Stmt_::If(a) => {
1895                 a.0.accept(c, v)?;
1896                 a.1.accept(c, v)?;
1897                 a.2.accept(c, v)?;
1898                 Ok(())
1899             }
1900             Stmt_::Do(a) => {
1901                 a.0.accept(c, v)?;
1902                 a.1.accept(c, v)?;
1903                 Ok(())
1904             }
1905             Stmt_::While(a) => {
1906                 a.0.accept(c, v)?;
1907                 a.1.accept(c, v)?;
1908                 Ok(())
1909             }
1910             Stmt_::Using(a0) => {
1911                 a0.accept(c, v)?;
1912                 Ok(())
1913             }
1914             Stmt_::For(a) => {
1915                 a.0.accept(c, v)?;
1916                 a.1.accept(c, v)?;
1917                 a.2.accept(c, v)?;
1918                 a.3.accept(c, v)?;
1919                 Ok(())
1920             }
1921             Stmt_::Switch(a) => {
1922                 a.0.accept(c, v)?;
1923                 a.1.accept(c, v)?;
1924                 Ok(())
1925             }
1926             Stmt_::Foreach(a) => {
1927                 a.0.accept(c, v)?;
1928                 a.1.accept(c, v)?;
1929                 a.2.accept(c, v)?;
1930                 Ok(())
1931             }
1932             Stmt_::Try(a) => {
1933                 a.0.accept(c, v)?;
1934                 a.1.accept(c, v)?;
1935                 a.2.accept(c, v)?;
1936                 Ok(())
1937             }
1938             Stmt_::Noop => Ok(()),
1939             Stmt_::Block(a0) => {
1940                 a0.accept(c, v)?;
1941                 Ok(())
1942             }
1943             Stmt_::Markup(a0) => {
1944                 a0.accept(c, v)?;
1945                 Ok(())
1946             }
1947             Stmt_::AssertEnv(a) => {
1948                 a.0.accept(c, v)?;
1949                 a.1.accept(c, v)?;
1950                 Ok(())
1951             }
1952         }
1953     }
1955 impl<P: Params> Node<P> for Targ<P::Ex> {
1956     fn accept<'node>(
1957         &'node self,
1958         c: &mut P::Context,
1959         v: &mut dyn Visitor<'node, P = P>,
1960     ) -> Result<(), P::Error> {
1961         v.visit_targ(c, self)
1962     }
1963     fn recurse<'node>(
1964         &'node self,
1965         c: &mut P::Context,
1966         v: &mut dyn Visitor<'node, P = P>,
1967     ) -> Result<(), P::Error> {
1968         v.visit_ex(c, &self.0)?;
1969         self.1.accept(c, v)?;
1970         Ok(())
1971     }
1973 impl<P: Params> Node<P> for Tparam<P::Ex, P::En> {
1974     fn accept<'node>(
1975         &'node self,
1976         c: &mut P::Context,
1977         v: &mut dyn Visitor<'node, P = P>,
1978     ) -> Result<(), P::Error> {
1979         v.visit_tparam(c, self)
1980     }
1981     fn recurse<'node>(
1982         &'node self,
1983         c: &mut P::Context,
1984         v: &mut dyn Visitor<'node, P = P>,
1985     ) -> Result<(), P::Error> {
1986         self.variance.accept(c, v)?;
1987         self.name.accept(c, v)?;
1988         self.parameters.accept(c, v)?;
1989         self.constraints.accept(c, v)?;
1990         self.reified.accept(c, v)?;
1991         self.user_attributes.accept(c, v)?;
1992         Ok(())
1993     }
1995 impl<P: Params> Node<P> for Tprim {
1996     fn accept<'node>(
1997         &'node self,
1998         c: &mut P::Context,
1999         v: &mut dyn Visitor<'node, P = P>,
2000     ) -> Result<(), P::Error> {
2001         v.visit_tprim(c, self)
2002     }
2003     fn recurse<'node>(
2004         &'node self,
2005         c: &mut P::Context,
2006         v: &mut dyn Visitor<'node, P = P>,
2007     ) -> Result<(), P::Error> {
2008         match self {
2009             Tprim::Tnull => Ok(()),
2010             Tprim::Tvoid => Ok(()),
2011             Tprim::Tint => Ok(()),
2012             Tprim::Tbool => Ok(()),
2013             Tprim::Tfloat => Ok(()),
2014             Tprim::Tstring => Ok(()),
2015             Tprim::Tresource => Ok(()),
2016             Tprim::Tnum => Ok(()),
2017             Tprim::Tarraykey => Ok(()),
2018             Tprim::Tnoreturn => Ok(()),
2019         }
2020     }
2022 impl<P: Params> Node<P> for TypeHint<P::Ex> {
2023     fn accept<'node>(
2024         &'node self,
2025         c: &mut P::Context,
2026         v: &mut dyn Visitor<'node, P = P>,
2027     ) -> Result<(), P::Error> {
2028         v.visit_type_hint(c, self)
2029     }
2030     fn recurse<'node>(
2031         &'node self,
2032         c: &mut P::Context,
2033         v: &mut dyn Visitor<'node, P = P>,
2034     ) -> Result<(), P::Error> {
2035         v.visit_ex(c, &self.0)?;
2036         self.1.accept(c, v)?;
2037         Ok(())
2038     }
2040 impl<P: Params> Node<P> for Typedef<P::Ex, P::En> {
2041     fn accept<'node>(
2042         &'node self,
2043         c: &mut P::Context,
2044         v: &mut dyn Visitor<'node, P = P>,
2045     ) -> Result<(), P::Error> {
2046         v.visit_typedef(c, self)
2047     }
2048     fn recurse<'node>(
2049         &'node self,
2050         c: &mut P::Context,
2051         v: &mut dyn Visitor<'node, P = P>,
2052     ) -> Result<(), P::Error> {
2053         v.visit_en(c, &self.annotation)?;
2054         self.name.accept(c, v)?;
2055         self.tparams.accept(c, v)?;
2056         self.constraint.accept(c, v)?;
2057         self.kind.accept(c, v)?;
2058         self.user_attributes.accept(c, v)?;
2059         self.mode.accept(c, v)?;
2060         self.vis.accept(c, v)?;
2061         self.namespace.accept(c, v)?;
2062         self.span.accept(c, v)?;
2063         self.emit_id.accept(c, v)?;
2064         self.is_ctx.accept(c, v)?;
2065         Ok(())
2066     }
2068 impl<P: Params> Node<P> for TypedefVisibility {
2069     fn accept<'node>(
2070         &'node self,
2071         c: &mut P::Context,
2072         v: &mut dyn Visitor<'node, P = P>,
2073     ) -> Result<(), P::Error> {
2074         v.visit_typedef_visibility(c, self)
2075     }
2076     fn recurse<'node>(
2077         &'node self,
2078         c: &mut P::Context,
2079         v: &mut dyn Visitor<'node, P = P>,
2080     ) -> Result<(), P::Error> {
2081         match self {
2082             TypedefVisibility::Transparent => Ok(()),
2083             TypedefVisibility::Opaque => Ok(()),
2084             TypedefVisibility::Tinternal => Ok(()),
2085         }
2086     }
2088 impl<P: Params> Node<P> for Uop {
2089     fn accept<'node>(
2090         &'node self,
2091         c: &mut P::Context,
2092         v: &mut dyn Visitor<'node, P = P>,
2093     ) -> Result<(), P::Error> {
2094         v.visit_uop(c, self)
2095     }
2096     fn recurse<'node>(
2097         &'node self,
2098         c: &mut P::Context,
2099         v: &mut dyn Visitor<'node, P = P>,
2100     ) -> Result<(), P::Error> {
2101         match self {
2102             Uop::Utild => Ok(()),
2103             Uop::Unot => Ok(()),
2104             Uop::Uplus => Ok(()),
2105             Uop::Uminus => Ok(()),
2106             Uop::Uincr => Ok(()),
2107             Uop::Udecr => Ok(()),
2108             Uop::Upincr => Ok(()),
2109             Uop::Updecr => Ok(()),
2110             Uop::Usilence => Ok(()),
2111         }
2112     }
2114 impl<P: Params> Node<P> for UseAsAlias {
2115     fn accept<'node>(
2116         &'node self,
2117         c: &mut P::Context,
2118         v: &mut dyn Visitor<'node, P = P>,
2119     ) -> Result<(), P::Error> {
2120         v.visit_use_as_alias(c, self)
2121     }
2122     fn recurse<'node>(
2123         &'node self,
2124         c: &mut P::Context,
2125         v: &mut dyn Visitor<'node, P = P>,
2126     ) -> Result<(), P::Error> {
2127         self.0.accept(c, v)?;
2128         self.1.accept(c, v)?;
2129         self.2.accept(c, v)?;
2130         self.3.accept(c, v)?;
2131         Ok(())
2132     }
2134 impl<P: Params> Node<P> for UseAsVisibility {
2135     fn accept<'node>(
2136         &'node self,
2137         c: &mut P::Context,
2138         v: &mut dyn Visitor<'node, P = P>,
2139     ) -> Result<(), P::Error> {
2140         v.visit_use_as_visibility(c, self)
2141     }
2142     fn recurse<'node>(
2143         &'node self,
2144         c: &mut P::Context,
2145         v: &mut dyn Visitor<'node, P = P>,
2146     ) -> Result<(), P::Error> {
2147         match self {
2148             UseAsVisibility::UseAsPublic => Ok(()),
2149             UseAsVisibility::UseAsPrivate => Ok(()),
2150             UseAsVisibility::UseAsProtected => Ok(()),
2151             UseAsVisibility::UseAsFinal => Ok(()),
2152         }
2153     }
2155 impl<P: Params> Node<P> for UserAttribute<P::Ex, P::En> {
2156     fn accept<'node>(
2157         &'node self,
2158         c: &mut P::Context,
2159         v: &mut dyn Visitor<'node, P = P>,
2160     ) -> Result<(), P::Error> {
2161         v.visit_user_attribute(c, self)
2162     }
2163     fn recurse<'node>(
2164         &'node self,
2165         c: &mut P::Context,
2166         v: &mut dyn Visitor<'node, P = P>,
2167     ) -> Result<(), P::Error> {
2168         self.name.accept(c, v)?;
2169         self.params.accept(c, v)?;
2170         Ok(())
2171     }
2173 impl<P: Params> Node<P> for UsingStmt<P::Ex, P::En> {
2174     fn accept<'node>(
2175         &'node self,
2176         c: &mut P::Context,
2177         v: &mut dyn Visitor<'node, P = P>,
2178     ) -> Result<(), P::Error> {
2179         v.visit_using_stmt(c, self)
2180     }
2181     fn recurse<'node>(
2182         &'node self,
2183         c: &mut P::Context,
2184         v: &mut dyn Visitor<'node, P = P>,
2185     ) -> Result<(), P::Error> {
2186         self.is_block_scoped.accept(c, v)?;
2187         self.has_await.accept(c, v)?;
2188         self.exprs.accept(c, v)?;
2189         self.block.accept(c, v)?;
2190         Ok(())
2191     }
2193 impl<P: Params> Node<P> for Variance {
2194     fn accept<'node>(
2195         &'node self,
2196         c: &mut P::Context,
2197         v: &mut dyn Visitor<'node, P = P>,
2198     ) -> Result<(), P::Error> {
2199         v.visit_variance(c, self)
2200     }
2201     fn recurse<'node>(
2202         &'node self,
2203         c: &mut P::Context,
2204         v: &mut dyn Visitor<'node, P = P>,
2205     ) -> Result<(), P::Error> {
2206         match self {
2207             Variance::Covariant => Ok(()),
2208             Variance::Contravariant => Ok(()),
2209             Variance::Invariant => Ok(()),
2210         }
2211     }
2213 impl<P: Params> Node<P> for VcKind {
2214     fn accept<'node>(
2215         &'node self,
2216         c: &mut P::Context,
2217         v: &mut dyn Visitor<'node, P = P>,
2218     ) -> Result<(), P::Error> {
2219         v.visit_vc_kind(c, self)
2220     }
2221     fn recurse<'node>(
2222         &'node self,
2223         c: &mut P::Context,
2224         v: &mut dyn Visitor<'node, P = P>,
2225     ) -> Result<(), P::Error> {
2226         match self {
2227             VcKind::Vector => Ok(()),
2228             VcKind::ImmVector => Ok(()),
2229             VcKind::Vec => Ok(()),
2230             VcKind::Set => Ok(()),
2231             VcKind::ImmSet => Ok(()),
2232             VcKind::Keyset => Ok(()),
2233         }
2234     }
2236 impl<P: Params> Node<P> for Visibility {
2237     fn accept<'node>(
2238         &'node self,
2239         c: &mut P::Context,
2240         v: &mut dyn Visitor<'node, P = P>,
2241     ) -> Result<(), P::Error> {
2242         v.visit_visibility(c, self)
2243     }
2244     fn recurse<'node>(
2245         &'node self,
2246         c: &mut P::Context,
2247         v: &mut dyn Visitor<'node, P = P>,
2248     ) -> Result<(), P::Error> {
2249         match self {
2250             Visibility::Private => Ok(()),
2251             Visibility::Public => Ok(()),
2252             Visibility::Protected => Ok(()),
2253             Visibility::Internal => Ok(()),
2254         }
2255     }
2257 impl<P: Params> Node<P> for WhereConstraintHint {
2258     fn accept<'node>(
2259         &'node self,
2260         c: &mut P::Context,
2261         v: &mut dyn Visitor<'node, P = P>,
2262     ) -> Result<(), P::Error> {
2263         v.visit_where_constraint_hint(c, self)
2264     }
2265     fn recurse<'node>(
2266         &'node self,
2267         c: &mut P::Context,
2268         v: &mut dyn Visitor<'node, P = P>,
2269     ) -> Result<(), P::Error> {
2270         self.0.accept(c, v)?;
2271         self.1.accept(c, v)?;
2272         self.2.accept(c, v)?;
2273         Ok(())
2274     }
2276 impl<P: Params> Node<P> for XhpAttr<P::Ex, P::En> {
2277     fn accept<'node>(
2278         &'node self,
2279         c: &mut P::Context,
2280         v: &mut dyn Visitor<'node, P = P>,
2281     ) -> Result<(), P::Error> {
2282         v.visit_xhp_attr(c, self)
2283     }
2284     fn recurse<'node>(
2285         &'node self,
2286         c: &mut P::Context,
2287         v: &mut dyn Visitor<'node, P = P>,
2288     ) -> Result<(), P::Error> {
2289         self.0.accept(c, v)?;
2290         self.1.accept(c, v)?;
2291         self.2.accept(c, v)?;
2292         self.3.accept(c, v)?;
2293         Ok(())
2294     }
2296 impl<P: Params> Node<P> for XhpAttrInfo {
2297     fn accept<'node>(
2298         &'node self,
2299         c: &mut P::Context,
2300         v: &mut dyn Visitor<'node, P = P>,
2301     ) -> Result<(), P::Error> {
2302         v.visit_xhp_attr_info(c, self)
2303     }
2304     fn recurse<'node>(
2305         &'node self,
2306         c: &mut P::Context,
2307         v: &mut dyn Visitor<'node, P = P>,
2308     ) -> Result<(), P::Error> {
2309         self.tag.accept(c, v)?;
2310         self.enum_values.accept(c, v)?;
2311         Ok(())
2312     }
2314 impl<P: Params> Node<P> for XhpAttrTag {
2315     fn accept<'node>(
2316         &'node self,
2317         c: &mut P::Context,
2318         v: &mut dyn Visitor<'node, P = P>,
2319     ) -> Result<(), P::Error> {
2320         v.visit_xhp_attr_tag(c, self)
2321     }
2322     fn recurse<'node>(
2323         &'node self,
2324         c: &mut P::Context,
2325         v: &mut dyn Visitor<'node, P = P>,
2326     ) -> Result<(), P::Error> {
2327         match self {
2328             XhpAttrTag::Required => Ok(()),
2329             XhpAttrTag::LateInit => Ok(()),
2330         }
2331     }
2333 impl<P: Params> Node<P> for XhpAttribute<P::Ex, P::En> {
2334     fn accept<'node>(
2335         &'node self,
2336         c: &mut P::Context,
2337         v: &mut dyn Visitor<'node, P = P>,
2338     ) -> Result<(), P::Error> {
2339         v.visit_xhp_attribute(c, self)
2340     }
2341     fn recurse<'node>(
2342         &'node self,
2343         c: &mut P::Context,
2344         v: &mut dyn Visitor<'node, P = P>,
2345     ) -> Result<(), P::Error> {
2346         match self {
2347             XhpAttribute::XhpSimple(a0) => {
2348                 a0.accept(c, v)?;
2349                 Ok(())
2350             }
2351             XhpAttribute::XhpSpread(a0) => {
2352                 a0.accept(c, v)?;
2353                 Ok(())
2354             }
2355         }
2356     }
2358 impl<P: Params> Node<P> for XhpChild {
2359     fn accept<'node>(
2360         &'node self,
2361         c: &mut P::Context,
2362         v: &mut dyn Visitor<'node, P = P>,
2363     ) -> Result<(), P::Error> {
2364         v.visit_xhp_child(c, self)
2365     }
2366     fn recurse<'node>(
2367         &'node self,
2368         c: &mut P::Context,
2369         v: &mut dyn Visitor<'node, P = P>,
2370     ) -> Result<(), P::Error> {
2371         match self {
2372             XhpChild::ChildName(a0) => {
2373                 a0.accept(c, v)?;
2374                 Ok(())
2375             }
2376             XhpChild::ChildList(a0) => {
2377                 a0.accept(c, v)?;
2378                 Ok(())
2379             }
2380             XhpChild::ChildUnary(a0, a1) => {
2381                 a0.accept(c, v)?;
2382                 a1.accept(c, v)?;
2383                 Ok(())
2384             }
2385             XhpChild::ChildBinary(a0, a1) => {
2386                 a0.accept(c, v)?;
2387                 a1.accept(c, v)?;
2388                 Ok(())
2389             }
2390         }
2391     }
2393 impl<P: Params> Node<P> for XhpChildOp {
2394     fn accept<'node>(
2395         &'node self,
2396         c: &mut P::Context,
2397         v: &mut dyn Visitor<'node, P = P>,
2398     ) -> Result<(), P::Error> {
2399         v.visit_xhp_child_op(c, self)
2400     }
2401     fn recurse<'node>(
2402         &'node self,
2403         c: &mut P::Context,
2404         v: &mut dyn Visitor<'node, P = P>,
2405     ) -> Result<(), P::Error> {
2406         match self {
2407             XhpChildOp::ChildStar => Ok(()),
2408             XhpChildOp::ChildPlus => Ok(()),
2409             XhpChildOp::ChildQuestion => Ok(()),
2410         }
2411     }
2413 impl<P: Params> Node<P> for XhpEnumValue {
2414     fn accept<'node>(
2415         &'node self,
2416         c: &mut P::Context,
2417         v: &mut dyn Visitor<'node, P = P>,
2418     ) -> Result<(), P::Error> {
2419         v.visit_xhp_enum_value(c, self)
2420     }
2421     fn recurse<'node>(
2422         &'node self,
2423         c: &mut P::Context,
2424         v: &mut dyn Visitor<'node, P = P>,
2425     ) -> Result<(), P::Error> {
2426         match self {
2427             XhpEnumValue::XEVInt(a0) => {
2428                 a0.accept(c, v)?;
2429                 Ok(())
2430             }
2431             XhpEnumValue::XEVString(a0) => {
2432                 a0.accept(c, v)?;
2433                 Ok(())
2434             }
2435         }
2436     }
2438 impl<P: Params> Node<P> for XhpSimple<P::Ex, P::En> {
2439     fn accept<'node>(
2440         &'node self,
2441         c: &mut P::Context,
2442         v: &mut dyn Visitor<'node, P = P>,
2443     ) -> Result<(), P::Error> {
2444         v.visit_xhp_simple(c, self)
2445     }
2446     fn recurse<'node>(
2447         &'node self,
2448         c: &mut P::Context,
2449         v: &mut dyn Visitor<'node, P = P>,
2450     ) -> Result<(), P::Error> {
2451         self.name.accept(c, v)?;
2452         v.visit_ex(c, &self.type_)?;
2453         self.expr.accept(c, v)?;
2454         Ok(())
2455     }