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