1 // Copyright (c) Facebook, Inc. and its affiliates.
3 // This source code is licensed under the MIT license found in the
4 // LICENSE file in the "hack" directory of this source tree.
6 // @generated SignedSource<<5bfb4c781ebab43cd0fb74db3c5b55ab>>
8 // To regenerate this file, run:
9 // hphp/hack/src/oxidized_regen.sh
13 use crate::LocalIdMap;
14 impl<Ex, En> Stmt_<Ex, En> {
15 pub fn mk_fallthrough() -> Self {
18 pub fn mk_expr(p0: Expr<Ex, En>) -> Self {
19 Stmt_::Expr(Box::new(p0))
21 pub fn mk_break() -> Self {
24 pub fn mk_continue() -> Self {
27 pub fn mk_throw(p0: Expr<Ex, En>) -> Self {
28 Stmt_::Throw(Box::new(p0))
30 pub fn mk_return(p0: Option<Expr<Ex, En>>) -> Self {
31 Stmt_::Return(Box::new(p0))
33 pub fn mk_yield_break() -> Self {
36 pub fn mk_awaitall(p0: Vec<(Option<Lid>, Expr<Ex, En>)>, p1: Block<Ex, En>) -> Self {
37 Stmt_::Awaitall(Box::new((p0, p1)))
39 pub fn mk_if(p0: Expr<Ex, En>, p1: Block<Ex, En>, p2: Block<Ex, En>) -> Self {
40 Stmt_::If(Box::new((p0, p1, p2)))
42 pub fn mk_do(p0: Block<Ex, En>, p1: Expr<Ex, En>) -> Self {
43 Stmt_::Do(Box::new((p0, p1)))
45 pub fn mk_while(p0: Expr<Ex, En>, p1: Block<Ex, En>) -> Self {
46 Stmt_::While(Box::new((p0, p1)))
48 pub fn mk_using(p0: UsingStmt<Ex, En>) -> Self {
49 Stmt_::Using(Box::new(p0))
52 p0: Vec<Expr<Ex, En>>,
53 p1: Option<Expr<Ex, En>>,
54 p2: Vec<Expr<Ex, En>>,
57 Stmt_::For(Box::new((p0, p1, p2, p3)))
59 pub fn mk_switch(p0: Expr<Ex, En>, p1: Vec<Case<Ex, En>>) -> Self {
60 Stmt_::Switch(Box::new((p0, p1)))
62 pub fn mk_foreach(p0: Expr<Ex, En>, p1: AsExpr<Ex, En>, p2: Block<Ex, En>) -> Self {
63 Stmt_::Foreach(Box::new((p0, p1, p2)))
65 pub fn mk_try(p0: Block<Ex, En>, p1: Vec<Catch<Ex, En>>, p2: Block<Ex, En>) -> Self {
66 Stmt_::Try(Box::new((p0, p1, p2)))
68 pub fn mk_noop() -> Self {
71 pub fn mk_block(p0: Block<Ex, En>) -> Self {
74 pub fn mk_markup(p0: Pstring) -> Self {
75 Stmt_::Markup(Box::new(p0))
77 pub fn mk_assert_env(p0: EnvAnnot, p1: LocalIdMap<(Pos, Ex)>) -> Self {
78 Stmt_::AssertEnv(Box::new((p0, p1)))
80 pub fn is_fallthrough(&self) -> bool {
82 Stmt_::Fallthrough => true,
86 pub fn is_expr(&self) -> bool {
88 Stmt_::Expr(..) => true,
92 pub fn is_break(&self) -> bool {
98 pub fn is_continue(&self) -> bool {
100 Stmt_::Continue => true,
104 pub fn is_throw(&self) -> bool {
106 Stmt_::Throw(..) => true,
110 pub fn is_return(&self) -> bool {
112 Stmt_::Return(..) => true,
116 pub fn is_yield_break(&self) -> bool {
118 Stmt_::YieldBreak => true,
122 pub fn is_awaitall(&self) -> bool {
124 Stmt_::Awaitall(..) => true,
128 pub fn is_if(&self) -> bool {
130 Stmt_::If(..) => true,
134 pub fn is_do(&self) -> bool {
136 Stmt_::Do(..) => true,
140 pub fn is_while(&self) -> bool {
142 Stmt_::While(..) => true,
146 pub fn is_using(&self) -> bool {
148 Stmt_::Using(..) => true,
152 pub fn is_for(&self) -> bool {
154 Stmt_::For(..) => true,
158 pub fn is_switch(&self) -> bool {
160 Stmt_::Switch(..) => true,
164 pub fn is_foreach(&self) -> bool {
166 Stmt_::Foreach(..) => true,
170 pub fn is_try(&self) -> bool {
172 Stmt_::Try(..) => true,
176 pub fn is_noop(&self) -> bool {
182 pub fn is_block(&self) -> bool {
184 Stmt_::Block(..) => true,
188 pub fn is_markup(&self) -> bool {
190 Stmt_::Markup(..) => true,
194 pub fn is_assert_env(&self) -> bool {
196 Stmt_::AssertEnv(..) => true,
200 pub fn as_expr(&self) -> Option<&Expr<Ex, En>> {
202 Stmt_::Expr(p0) => Some(&p0),
206 pub fn as_throw(&self) -> Option<&Expr<Ex, En>> {
208 Stmt_::Throw(p0) => Some(&p0),
212 pub fn as_return(&self) -> Option<&Option<Expr<Ex, En>>> {
214 Stmt_::Return(p0) => Some(&p0),
218 pub fn as_awaitall(&self) -> Option<(&Vec<(Option<Lid>, Expr<Ex, En>)>, &Block<Ex, En>)> {
220 Stmt_::Awaitall(p0) => Some((&p0.0, &p0.1)),
224 pub fn as_if(&self) -> Option<(&Expr<Ex, En>, &Block<Ex, En>, &Block<Ex, En>)> {
226 Stmt_::If(p0) => Some((&p0.0, &p0.1, &p0.2)),
230 pub fn as_do(&self) -> Option<(&Block<Ex, En>, &Expr<Ex, En>)> {
232 Stmt_::Do(p0) => Some((&p0.0, &p0.1)),
236 pub fn as_while(&self) -> Option<(&Expr<Ex, En>, &Block<Ex, En>)> {
238 Stmt_::While(p0) => Some((&p0.0, &p0.1)),
242 pub fn as_using(&self) -> Option<&UsingStmt<Ex, En>> {
244 Stmt_::Using(p0) => Some(&p0),
252 &Option<Expr<Ex, En>>,
257 Stmt_::For(p0) => Some((&p0.0, &p0.1, &p0.2, &p0.3)),
261 pub fn as_switch(&self) -> Option<(&Expr<Ex, En>, &Vec<Case<Ex, En>>)> {
263 Stmt_::Switch(p0) => Some((&p0.0, &p0.1)),
267 pub fn as_foreach(&self) -> Option<(&Expr<Ex, En>, &AsExpr<Ex, En>, &Block<Ex, En>)> {
269 Stmt_::Foreach(p0) => Some((&p0.0, &p0.1, &p0.2)),
273 pub fn as_try(&self) -> Option<(&Block<Ex, En>, &Vec<Catch<Ex, En>>, &Block<Ex, En>)> {
275 Stmt_::Try(p0) => Some((&p0.0, &p0.1, &p0.2)),
279 pub fn as_block(&self) -> Option<&Block<Ex, En>> {
281 Stmt_::Block(p0) => Some(p0),
285 pub fn as_markup(&self) -> Option<&Pstring> {
287 Stmt_::Markup(p0) => Some(&p0),
291 pub fn as_assert_env(&self) -> Option<(&EnvAnnot, &LocalIdMap<(Pos, Ex)>)> {
293 Stmt_::AssertEnv(p0) => Some((&p0.0, &p0.1)),
297 pub fn as_expr_mut(&mut self) -> Option<&mut Expr<Ex, En>> {
299 Stmt_::Expr(p0) => Some(p0.as_mut()),
303 pub fn as_throw_mut(&mut self) -> Option<&mut Expr<Ex, En>> {
305 Stmt_::Throw(p0) => Some(p0.as_mut()),
309 pub fn as_return_mut(&mut self) -> Option<&mut Option<Expr<Ex, En>>> {
311 Stmt_::Return(p0) => Some(p0.as_mut()),
315 pub fn as_awaitall_mut(
317 ) -> Option<(&mut Vec<(Option<Lid>, Expr<Ex, En>)>, &mut Block<Ex, En>)> {
319 Stmt_::Awaitall(p0) => Some((&mut p0.0, &mut p0.1)),
325 ) -> Option<(&mut Expr<Ex, En>, &mut Block<Ex, En>, &mut Block<Ex, En>)> {
327 Stmt_::If(p0) => Some((&mut p0.0, &mut p0.1, &mut p0.2)),
331 pub fn as_do_mut(&mut self) -> Option<(&mut Block<Ex, En>, &mut Expr<Ex, En>)> {
333 Stmt_::Do(p0) => Some((&mut p0.0, &mut p0.1)),
337 pub fn as_while_mut(&mut self) -> Option<(&mut Expr<Ex, En>, &mut Block<Ex, En>)> {
339 Stmt_::While(p0) => Some((&mut p0.0, &mut p0.1)),
343 pub fn as_using_mut(&mut self) -> Option<&mut UsingStmt<Ex, En>> {
345 Stmt_::Using(p0) => Some(p0.as_mut()),
352 &mut Vec<Expr<Ex, En>>,
353 &mut Option<Expr<Ex, En>>,
354 &mut Vec<Expr<Ex, En>>,
358 Stmt_::For(p0) => Some((&mut p0.0, &mut p0.1, &mut p0.2, &mut p0.3)),
362 pub fn as_switch_mut(&mut self) -> Option<(&mut Expr<Ex, En>, &mut Vec<Case<Ex, En>>)> {
364 Stmt_::Switch(p0) => Some((&mut p0.0, &mut p0.1)),
368 pub fn as_foreach_mut(
370 ) -> Option<(&mut Expr<Ex, En>, &mut AsExpr<Ex, En>, &mut Block<Ex, En>)> {
372 Stmt_::Foreach(p0) => Some((&mut p0.0, &mut p0.1, &mut p0.2)),
380 &mut Vec<Catch<Ex, En>>,
384 Stmt_::Try(p0) => Some((&mut p0.0, &mut p0.1, &mut p0.2)),
388 pub fn as_block_mut(&mut self) -> Option<&mut Block<Ex, En>> {
390 Stmt_::Block(p0) => Some(p0),
394 pub fn as_markup_mut(&mut self) -> Option<&mut Pstring> {
396 Stmt_::Markup(p0) => Some(p0.as_mut()),
400 pub fn as_assert_env_mut(&mut self) -> Option<(&mut EnvAnnot, &mut LocalIdMap<(Pos, Ex)>)> {
402 Stmt_::AssertEnv(p0) => Some((&mut p0.0, &mut p0.1)),
406 pub fn as_expr_into(self) -> Option<Expr<Ex, En>> {
408 Stmt_::Expr(p0) => Some(*p0),
412 pub fn as_throw_into(self) -> Option<Expr<Ex, En>> {
414 Stmt_::Throw(p0) => Some(*p0),
418 pub fn as_return_into(self) -> Option<Option<Expr<Ex, En>>> {
420 Stmt_::Return(p0) => Some(*p0),
424 pub fn as_awaitall_into(self) -> Option<(Vec<(Option<Lid>, Expr<Ex, En>)>, Block<Ex, En>)> {
426 Stmt_::Awaitall(p0) => Some(((*p0).0, (*p0).1)),
430 pub fn as_if_into(self) -> Option<(Expr<Ex, En>, Block<Ex, En>, Block<Ex, En>)> {
432 Stmt_::If(p0) => Some(((*p0).0, (*p0).1, (*p0).2)),
436 pub fn as_do_into(self) -> Option<(Block<Ex, En>, Expr<Ex, En>)> {
438 Stmt_::Do(p0) => Some(((*p0).0, (*p0).1)),
442 pub fn as_while_into(self) -> Option<(Expr<Ex, En>, Block<Ex, En>)> {
444 Stmt_::While(p0) => Some(((*p0).0, (*p0).1)),
448 pub fn as_using_into(self) -> Option<UsingStmt<Ex, En>> {
450 Stmt_::Using(p0) => Some(*p0),
458 Option<Expr<Ex, En>>,
463 Stmt_::For(p0) => Some(((*p0).0, (*p0).1, (*p0).2, (*p0).3)),
467 pub fn as_switch_into(self) -> Option<(Expr<Ex, En>, Vec<Case<Ex, En>>)> {
469 Stmt_::Switch(p0) => Some(((*p0).0, (*p0).1)),
473 pub fn as_foreach_into(self) -> Option<(Expr<Ex, En>, AsExpr<Ex, En>, Block<Ex, En>)> {
475 Stmt_::Foreach(p0) => Some(((*p0).0, (*p0).1, (*p0).2)),
479 pub fn as_try_into(self) -> Option<(Block<Ex, En>, Vec<Catch<Ex, En>>, Block<Ex, En>)> {
481 Stmt_::Try(p0) => Some(((*p0).0, (*p0).1, (*p0).2)),
485 pub fn as_block_into(self) -> Option<Block<Ex, En>> {
487 Stmt_::Block(p0) => Some(p0),
491 pub fn as_markup_into(self) -> Option<Pstring> {
493 Stmt_::Markup(p0) => Some(*p0),
497 pub fn as_assert_env_into(self) -> Option<(EnvAnnot, LocalIdMap<(Pos, Ex)>)> {
499 Stmt_::AssertEnv(p0) => Some(((*p0).0, (*p0).1)),
505 pub fn mk_join() -> Self {
508 pub fn mk_refinement() -> Self {
511 pub fn is_join(&self) -> bool {
513 EnvAnnot::Join => true,
517 pub fn is_refinement(&self) -> bool {
519 EnvAnnot::Refinement => true,
524 impl<Ex, En> AsExpr<Ex, En> {
525 pub fn mk_as_v(p0: Expr<Ex, En>) -> Self {
528 pub fn mk_as_kv(p0: Expr<Ex, En>, p1: Expr<Ex, En>) -> Self {
531 pub fn mk_await_as_v(p0: Pos, p1: Expr<Ex, En>) -> Self {
532 AsExpr::AwaitAsV(p0, p1)
534 pub fn mk_await_as_kv(p0: Pos, p1: Expr<Ex, En>, p2: Expr<Ex, En>) -> Self {
535 AsExpr::AwaitAsKv(p0, p1, p2)
537 pub fn is_as_v(&self) -> bool {
539 AsExpr::AsV(..) => true,
543 pub fn is_as_kv(&self) -> bool {
545 AsExpr::AsKv(..) => true,
549 pub fn is_await_as_v(&self) -> bool {
551 AsExpr::AwaitAsV(..) => true,
555 pub fn is_await_as_kv(&self) -> bool {
557 AsExpr::AwaitAsKv(..) => true,
561 pub fn as_as_v(&self) -> Option<&Expr<Ex, En>> {
563 AsExpr::AsV(p0) => Some(p0),
567 pub fn as_as_kv(&self) -> Option<(&Expr<Ex, En>, &Expr<Ex, En>)> {
569 AsExpr::AsKv(p0, p1) => Some((p0, p1)),
573 pub fn as_await_as_v(&self) -> Option<(&Pos, &Expr<Ex, En>)> {
575 AsExpr::AwaitAsV(p0, p1) => Some((p0, p1)),
579 pub fn as_await_as_kv(&self) -> Option<(&Pos, &Expr<Ex, En>, &Expr<Ex, En>)> {
581 AsExpr::AwaitAsKv(p0, p1, p2) => Some((p0, p1, p2)),
585 pub fn as_as_v_mut(&mut self) -> Option<&mut Expr<Ex, En>> {
587 AsExpr::AsV(p0) => Some(p0),
591 pub fn as_as_kv_mut(&mut self) -> Option<(&mut Expr<Ex, En>, &mut Expr<Ex, En>)> {
593 AsExpr::AsKv(p0, p1) => Some((p0, p1)),
597 pub fn as_await_as_v_mut(&mut self) -> Option<(&mut Pos, &mut Expr<Ex, En>)> {
599 AsExpr::AwaitAsV(p0, p1) => Some((p0, p1)),
603 pub fn as_await_as_kv_mut(
605 ) -> Option<(&mut Pos, &mut Expr<Ex, En>, &mut Expr<Ex, En>)> {
607 AsExpr::AwaitAsKv(p0, p1, p2) => Some((p0, p1, p2)),
611 pub fn as_as_v_into(self) -> Option<Expr<Ex, En>> {
613 AsExpr::AsV(p0) => Some(p0),
617 pub fn as_as_kv_into(self) -> Option<(Expr<Ex, En>, Expr<Ex, En>)> {
619 AsExpr::AsKv(p0, p1) => Some((p0, p1)),
623 pub fn as_await_as_v_into(self) -> Option<(Pos, Expr<Ex, En>)> {
625 AsExpr::AwaitAsV(p0, p1) => Some((p0, p1)),
629 pub fn as_await_as_kv_into(self) -> Option<(Pos, Expr<Ex, En>, Expr<Ex, En>)> {
631 AsExpr::AwaitAsKv(p0, p1, p2) => Some((p0, p1, p2)),
636 impl<Ex, En> ClassId_<Ex, En> {
637 pub fn mk_ciparent() -> Self {
640 pub fn mk_ciself() -> Self {
643 pub fn mk_cistatic() -> Self {
646 pub fn mk_ciexpr(p0: Expr<Ex, En>) -> Self {
649 pub fn mk_ci(p0: ClassName) -> Self {
652 pub fn is_ciparent(&self) -> bool {
654 ClassId_::CIparent => true,
658 pub fn is_ciself(&self) -> bool {
660 ClassId_::CIself => true,
664 pub fn is_cistatic(&self) -> bool {
666 ClassId_::CIstatic => true,
670 pub fn is_ciexpr(&self) -> bool {
672 ClassId_::CIexpr(..) => true,
676 pub fn is_ci(&self) -> bool {
678 ClassId_::CI(..) => true,
682 pub fn as_ciexpr(&self) -> Option<&Expr<Ex, En>> {
684 ClassId_::CIexpr(p0) => Some(p0),
688 pub fn as_ci(&self) -> Option<&ClassName> {
690 ClassId_::CI(p0) => Some(p0),
694 pub fn as_ciexpr_mut(&mut self) -> Option<&mut Expr<Ex, En>> {
696 ClassId_::CIexpr(p0) => Some(p0),
700 pub fn as_ci_mut(&mut self) -> Option<&mut ClassName> {
702 ClassId_::CI(p0) => Some(p0),
706 pub fn as_ciexpr_into(self) -> Option<Expr<Ex, En>> {
708 ClassId_::CIexpr(p0) => Some(p0),
712 pub fn as_ci_into(self) -> Option<ClassName> {
714 ClassId_::CI(p0) => Some(p0),
719 impl<Ex> CollectionTarg<Ex> {
720 pub fn mk_collectiontv(p0: Targ<Ex>) -> Self {
721 CollectionTarg::CollectionTV(p0)
723 pub fn mk_collectiontkv(p0: Targ<Ex>, p1: Targ<Ex>) -> Self {
724 CollectionTarg::CollectionTKV(p0, p1)
726 pub fn is_collectiontv(&self) -> bool {
728 CollectionTarg::CollectionTV(..) => true,
732 pub fn is_collectiontkv(&self) -> bool {
734 CollectionTarg::CollectionTKV(..) => true,
738 pub fn as_collectiontv(&self) -> Option<&Targ<Ex>> {
740 CollectionTarg::CollectionTV(p0) => Some(p0),
744 pub fn as_collectiontkv(&self) -> Option<(&Targ<Ex>, &Targ<Ex>)> {
746 CollectionTarg::CollectionTKV(p0, p1) => Some((p0, p1)),
750 pub fn as_collectiontv_mut(&mut self) -> Option<&mut Targ<Ex>> {
752 CollectionTarg::CollectionTV(p0) => Some(p0),
756 pub fn as_collectiontkv_mut(&mut self) -> Option<(&mut Targ<Ex>, &mut Targ<Ex>)> {
758 CollectionTarg::CollectionTKV(p0, p1) => Some((p0, p1)),
762 pub fn as_collectiontv_into(self) -> Option<Targ<Ex>> {
764 CollectionTarg::CollectionTV(p0) => Some(p0),
768 pub fn as_collectiontkv_into(self) -> Option<(Targ<Ex>, Targ<Ex>)> {
770 CollectionTarg::CollectionTKV(p0, p1) => Some((p0, p1)),
775 impl<Ex, En> FunctionPtrId<Ex, En> {
776 pub fn mk_fpid(p0: Sid) -> Self {
777 FunctionPtrId::FPId(p0)
779 pub fn mk_fpclass_const(p0: ClassId<Ex, En>, p1: Pstring) -> Self {
780 FunctionPtrId::FPClassConst(p0, p1)
782 pub fn is_fpid(&self) -> bool {
784 FunctionPtrId::FPId(..) => true,
788 pub fn is_fpclass_const(&self) -> bool {
790 FunctionPtrId::FPClassConst(..) => true,
794 pub fn as_fpid(&self) -> Option<&Sid> {
796 FunctionPtrId::FPId(p0) => Some(p0),
800 pub fn as_fpclass_const(&self) -> Option<(&ClassId<Ex, En>, &Pstring)> {
802 FunctionPtrId::FPClassConst(p0, p1) => Some((p0, p1)),
806 pub fn as_fpid_mut(&mut self) -> Option<&mut Sid> {
808 FunctionPtrId::FPId(p0) => Some(p0),
812 pub fn as_fpclass_const_mut(&mut self) -> Option<(&mut ClassId<Ex, En>, &mut Pstring)> {
814 FunctionPtrId::FPClassConst(p0, p1) => Some((p0, p1)),
818 pub fn as_fpid_into(self) -> Option<Sid> {
820 FunctionPtrId::FPId(p0) => Some(p0),
824 pub fn as_fpclass_const_into(self) -> Option<(ClassId<Ex, En>, Pstring)> {
826 FunctionPtrId::FPClassConst(p0, p1) => Some((p0, p1)),
831 impl<Ex, En> Expr_<Ex, En> {
833 p0: Option<(Targ<Ex>, Targ<Ex>)>,
834 p1: Vec<(Expr<Ex, En>, Expr<Ex, En>)>,
836 Expr_::Darray(Box::new((p0, p1)))
838 pub fn mk_varray(p0: Option<Targ<Ex>>, p1: Vec<Expr<Ex, En>>) -> Self {
839 Expr_::Varray(Box::new((p0, p1)))
841 pub fn mk_shape(p0: Vec<(ast_defs::ShapeFieldName, Expr<Ex, En>)>) -> Self {
844 pub fn mk_val_collection(p0: VcKind, p1: Option<Targ<Ex>>, p2: Vec<Expr<Ex, En>>) -> Self {
845 Expr_::ValCollection(Box::new((p0, p1, p2)))
847 pub fn mk_key_val_collection(
849 p1: Option<(Targ<Ex>, Targ<Ex>)>,
850 p2: Vec<Field<Ex, En>>,
852 Expr_::KeyValCollection(Box::new((p0, p1, p2)))
854 pub fn mk_null() -> Self {
857 pub fn mk_this() -> Self {
860 pub fn mk_true() -> Self {
863 pub fn mk_false() -> Self {
866 pub fn mk_omitted() -> Self {
869 pub fn mk_id(p0: Sid) -> Self {
870 Expr_::Id(Box::new(p0))
872 pub fn mk_lvar(p0: Lid) -> Self {
873 Expr_::Lvar(Box::new(p0))
875 pub fn mk_dollardollar(p0: Lid) -> Self {
876 Expr_::Dollardollar(Box::new(p0))
878 pub fn mk_clone(p0: Expr<Ex, En>) -> Self {
879 Expr_::Clone(Box::new(p0))
881 pub fn mk_array_get(p0: Expr<Ex, En>, p1: Option<Expr<Ex, En>>) -> Self {
882 Expr_::ArrayGet(Box::new((p0, p1)))
884 pub fn mk_obj_get(p0: Expr<Ex, En>, p1: Expr<Ex, En>, p2: OgNullFlavor, p3: bool) -> Self {
885 Expr_::ObjGet(Box::new((p0, p1, p2, p3)))
887 pub fn mk_class_get(p0: ClassId<Ex, En>, p1: ClassGetExpr<Ex, En>, p2: bool) -> Self {
888 Expr_::ClassGet(Box::new((p0, p1, p2)))
890 pub fn mk_class_const(p0: ClassId<Ex, En>, p1: Pstring) -> Self {
891 Expr_::ClassConst(Box::new((p0, p1)))
896 p2: Vec<(ast_defs::ParamKind, Expr<Ex, En>)>,
897 p3: Option<Expr<Ex, En>>,
899 Expr_::Call(Box::new((p0, p1, p2, p3)))
901 pub fn mk_function_pointer(p0: FunctionPtrId<Ex, En>, p1: Vec<Targ<Ex>>) -> Self {
902 Expr_::FunctionPointer(Box::new((p0, p1)))
904 pub fn mk_int(p0: String) -> Self {
907 pub fn mk_float(p0: String) -> Self {
910 pub fn mk_string(p0: bstr::BString) -> Self {
913 pub fn mk_string2(p0: Vec<Expr<Ex, En>>) -> Self {
916 pub fn mk_prefixed_string(p0: String, p1: Expr<Ex, En>) -> Self {
917 Expr_::PrefixedString(Box::new((p0, p1)))
919 pub fn mk_yield(p0: Afield<Ex, En>) -> Self {
920 Expr_::Yield(Box::new(p0))
922 pub fn mk_await(p0: Expr<Ex, En>) -> Self {
923 Expr_::Await(Box::new(p0))
925 pub fn mk_readonly_expr(p0: Expr<Ex, En>) -> Self {
926 Expr_::ReadonlyExpr(Box::new(p0))
928 pub fn mk_tuple(p0: Vec<Expr<Ex, En>>) -> Self {
931 pub fn mk_list(p0: Vec<Expr<Ex, En>>) -> Self {
934 pub fn mk_cast(p0: Hint, p1: Expr<Ex, En>) -> Self {
935 Expr_::Cast(Box::new((p0, p1)))
937 pub fn mk_unop(p0: ast_defs::Uop, p1: Expr<Ex, En>) -> Self {
938 Expr_::Unop(Box::new((p0, p1)))
940 pub fn mk_binop(p0: ast_defs::Bop, p1: Expr<Ex, En>, p2: Expr<Ex, En>) -> Self {
941 Expr_::Binop(Box::new((p0, p1, p2)))
943 pub fn mk_pipe(p0: Lid, p1: Expr<Ex, En>, p2: Expr<Ex, En>) -> Self {
944 Expr_::Pipe(Box::new((p0, p1, p2)))
946 pub fn mk_eif(p0: Expr<Ex, En>, p1: Option<Expr<Ex, En>>, p2: Expr<Ex, En>) -> Self {
947 Expr_::Eif(Box::new((p0, p1, p2)))
949 pub fn mk_is(p0: Expr<Ex, En>, p1: Hint) -> Self {
950 Expr_::Is(Box::new((p0, p1)))
952 pub fn mk_as(p0: Expr<Ex, En>, p1: Hint, p2: bool) -> Self {
953 Expr_::As(Box::new((p0, p1, p2)))
955 pub fn mk_upcast(p0: Expr<Ex, En>, p1: Hint) -> Self {
956 Expr_::Upcast(Box::new((p0, p1)))
961 p2: Vec<Expr<Ex, En>>,
962 p3: Option<Expr<Ex, En>>,
965 Expr_::New(Box::new((p0, p1, p2, p3, p4)))
967 pub fn mk_record(p0: Sid, p1: Vec<(Expr<Ex, En>, Expr<Ex, En>)>) -> Self {
968 Expr_::Record(Box::new((p0, p1)))
970 pub fn mk_efun(p0: Fun_<Ex, En>, p1: Vec<Lid>) -> Self {
971 Expr_::Efun(Box::new((p0, p1)))
973 pub fn mk_lfun(p0: Fun_<Ex, En>, p1: Vec<Lid>) -> Self {
974 Expr_::Lfun(Box::new((p0, p1)))
976 pub fn mk_xml(p0: ClassName, p1: Vec<XhpAttribute<Ex, En>>, p2: Vec<Expr<Ex, En>>) -> Self {
977 Expr_::Xml(Box::new((p0, p1, p2)))
979 pub fn mk_import(p0: ImportFlavor, p1: Expr<Ex, En>) -> Self {
980 Expr_::Import(Box::new((p0, p1)))
982 pub fn mk_collection(
984 p1: Option<CollectionTarg<Ex>>,
985 p2: Vec<Afield<Ex, En>>,
987 Expr_::Collection(Box::new((p0, p1, p2)))
989 pub fn mk_expression_tree(p0: ExpressionTree<Ex, En>) -> Self {
990 Expr_::ExpressionTree(Box::new(p0))
992 pub fn mk_lplaceholder(p0: Pos) -> Self {
993 Expr_::Lplaceholder(Box::new(p0))
995 pub fn mk_fun_id(p0: Sid) -> Self {
996 Expr_::FunId(Box::new(p0))
998 pub fn mk_method_id(p0: Expr<Ex, En>, p1: Pstring) -> Self {
999 Expr_::MethodId(Box::new((p0, p1)))
1001 pub fn mk_method_caller(p0: ClassName, p1: Pstring) -> Self {
1002 Expr_::MethodCaller(Box::new((p0, p1)))
1004 pub fn mk_smethod_id(p0: ClassId<Ex, En>, p1: Pstring) -> Self {
1005 Expr_::SmethodId(Box::new((p0, p1)))
1007 pub fn mk_pair(p0: Option<(Targ<Ex>, Targ<Ex>)>, p1: Expr<Ex, En>, p2: Expr<Ex, En>) -> Self {
1008 Expr_::Pair(Box::new((p0, p1, p2)))
1010 pub fn mk_etsplice(p0: Expr<Ex, En>) -> Self {
1011 Expr_::ETSplice(Box::new(p0))
1013 pub fn mk_enum_class_label(p0: Option<ClassName>, p1: String) -> Self {
1014 Expr_::EnumClassLabel(Box::new((p0, p1)))
1016 pub fn mk_hole(p0: Expr<Ex, En>, p1: Ex, p2: Ex, p3: HoleSource) -> Self {
1017 Expr_::Hole(Box::new((p0, p1, p2, p3)))
1019 pub fn is_darray(&self) -> bool {
1021 Expr_::Darray(..) => true,
1025 pub fn is_varray(&self) -> bool {
1027 Expr_::Varray(..) => true,
1031 pub fn is_shape(&self) -> bool {
1033 Expr_::Shape(..) => true,
1037 pub fn is_val_collection(&self) -> bool {
1039 Expr_::ValCollection(..) => true,
1043 pub fn is_key_val_collection(&self) -> bool {
1045 Expr_::KeyValCollection(..) => true,
1049 pub fn is_null(&self) -> bool {
1051 Expr_::Null => true,
1055 pub fn is_this(&self) -> bool {
1057 Expr_::This => true,
1061 pub fn is_true(&self) -> bool {
1063 Expr_::True => true,
1067 pub fn is_false(&self) -> bool {
1069 Expr_::False => true,
1073 pub fn is_omitted(&self) -> bool {
1075 Expr_::Omitted => true,
1079 pub fn is_id(&self) -> bool {
1081 Expr_::Id(..) => true,
1085 pub fn is_lvar(&self) -> bool {
1087 Expr_::Lvar(..) => true,
1091 pub fn is_dollardollar(&self) -> bool {
1093 Expr_::Dollardollar(..) => true,
1097 pub fn is_clone(&self) -> bool {
1099 Expr_::Clone(..) => true,
1103 pub fn is_array_get(&self) -> bool {
1105 Expr_::ArrayGet(..) => true,
1109 pub fn is_obj_get(&self) -> bool {
1111 Expr_::ObjGet(..) => true,
1115 pub fn is_class_get(&self) -> bool {
1117 Expr_::ClassGet(..) => true,
1121 pub fn is_class_const(&self) -> bool {
1123 Expr_::ClassConst(..) => true,
1127 pub fn is_call(&self) -> bool {
1129 Expr_::Call(..) => true,
1133 pub fn is_function_pointer(&self) -> bool {
1135 Expr_::FunctionPointer(..) => true,
1139 pub fn is_int(&self) -> bool {
1141 Expr_::Int(..) => true,
1145 pub fn is_float(&self) -> bool {
1147 Expr_::Float(..) => true,
1151 pub fn is_string(&self) -> bool {
1153 Expr_::String(..) => true,
1157 pub fn is_string2(&self) -> bool {
1159 Expr_::String2(..) => true,
1163 pub fn is_prefixed_string(&self) -> bool {
1165 Expr_::PrefixedString(..) => true,
1169 pub fn is_yield(&self) -> bool {
1171 Expr_::Yield(..) => true,
1175 pub fn is_await(&self) -> bool {
1177 Expr_::Await(..) => true,
1181 pub fn is_readonly_expr(&self) -> bool {
1183 Expr_::ReadonlyExpr(..) => true,
1187 pub fn is_tuple(&self) -> bool {
1189 Expr_::Tuple(..) => true,
1193 pub fn is_list(&self) -> bool {
1195 Expr_::List(..) => true,
1199 pub fn is_cast(&self) -> bool {
1201 Expr_::Cast(..) => true,
1205 pub fn is_unop(&self) -> bool {
1207 Expr_::Unop(..) => true,
1211 pub fn is_binop(&self) -> bool {
1213 Expr_::Binop(..) => true,
1217 pub fn is_pipe(&self) -> bool {
1219 Expr_::Pipe(..) => true,
1223 pub fn is_eif(&self) -> bool {
1225 Expr_::Eif(..) => true,
1229 pub fn is_is(&self) -> bool {
1231 Expr_::Is(..) => true,
1235 pub fn is_as(&self) -> bool {
1237 Expr_::As(..) => true,
1241 pub fn is_upcast(&self) -> bool {
1243 Expr_::Upcast(..) => true,
1247 pub fn is_new(&self) -> bool {
1249 Expr_::New(..) => true,
1253 pub fn is_record(&self) -> bool {
1255 Expr_::Record(..) => true,
1259 pub fn is_efun(&self) -> bool {
1261 Expr_::Efun(..) => true,
1265 pub fn is_lfun(&self) -> bool {
1267 Expr_::Lfun(..) => true,
1271 pub fn is_xml(&self) -> bool {
1273 Expr_::Xml(..) => true,
1277 pub fn is_import(&self) -> bool {
1279 Expr_::Import(..) => true,
1283 pub fn is_collection(&self) -> bool {
1285 Expr_::Collection(..) => true,
1289 pub fn is_expression_tree(&self) -> bool {
1291 Expr_::ExpressionTree(..) => true,
1295 pub fn is_lplaceholder(&self) -> bool {
1297 Expr_::Lplaceholder(..) => true,
1301 pub fn is_fun_id(&self) -> bool {
1303 Expr_::FunId(..) => true,
1307 pub fn is_method_id(&self) -> bool {
1309 Expr_::MethodId(..) => true,
1313 pub fn is_method_caller(&self) -> bool {
1315 Expr_::MethodCaller(..) => true,
1319 pub fn is_smethod_id(&self) -> bool {
1321 Expr_::SmethodId(..) => true,
1325 pub fn is_pair(&self) -> bool {
1327 Expr_::Pair(..) => true,
1331 pub fn is_etsplice(&self) -> bool {
1333 Expr_::ETSplice(..) => true,
1337 pub fn is_enum_class_label(&self) -> bool {
1339 Expr_::EnumClassLabel(..) => true,
1343 pub fn is_hole(&self) -> bool {
1345 Expr_::Hole(..) => true,
1352 &Option<(Targ<Ex>, Targ<Ex>)>,
1353 &Vec<(Expr<Ex, En>, Expr<Ex, En>)>,
1356 Expr_::Darray(p0) => Some((&p0.0, &p0.1)),
1360 pub fn as_varray(&self) -> Option<(&Option<Targ<Ex>>, &Vec<Expr<Ex, En>>)> {
1362 Expr_::Varray(p0) => Some((&p0.0, &p0.1)),
1366 pub fn as_shape(&self) -> Option<&Vec<(ast_defs::ShapeFieldName, Expr<Ex, En>)>> {
1368 Expr_::Shape(p0) => Some(p0),
1372 pub fn as_val_collection(&self) -> Option<(&VcKind, &Option<Targ<Ex>>, &Vec<Expr<Ex, En>>)> {
1374 Expr_::ValCollection(p0) => Some((&p0.0, &p0.1, &p0.2)),
1378 pub fn as_key_val_collection(
1380 ) -> Option<(&KvcKind, &Option<(Targ<Ex>, Targ<Ex>)>, &Vec<Field<Ex, En>>)> {
1382 Expr_::KeyValCollection(p0) => Some((&p0.0, &p0.1, &p0.2)),
1386 pub fn as_id(&self) -> Option<&Sid> {
1388 Expr_::Id(p0) => Some(&p0),
1392 pub fn as_lvar(&self) -> Option<&Lid> {
1394 Expr_::Lvar(p0) => Some(&p0),
1398 pub fn as_dollardollar(&self) -> Option<&Lid> {
1400 Expr_::Dollardollar(p0) => Some(&p0),
1404 pub fn as_clone(&self) -> Option<&Expr<Ex, En>> {
1406 Expr_::Clone(p0) => Some(&p0),
1410 pub fn as_array_get(&self) -> Option<(&Expr<Ex, En>, &Option<Expr<Ex, En>>)> {
1412 Expr_::ArrayGet(p0) => Some((&p0.0, &p0.1)),
1416 pub fn as_obj_get(&self) -> Option<(&Expr<Ex, En>, &Expr<Ex, En>, &OgNullFlavor, &bool)> {
1418 Expr_::ObjGet(p0) => Some((&p0.0, &p0.1, &p0.2, &p0.3)),
1422 pub fn as_class_get(&self) -> Option<(&ClassId<Ex, En>, &ClassGetExpr<Ex, En>, &bool)> {
1424 Expr_::ClassGet(p0) => Some((&p0.0, &p0.1, &p0.2)),
1428 pub fn as_class_const(&self) -> Option<(&ClassId<Ex, En>, &Pstring)> {
1430 Expr_::ClassConst(p0) => Some((&p0.0, &p0.1)),
1439 &Vec<(ast_defs::ParamKind, Expr<Ex, En>)>,
1440 &Option<Expr<Ex, En>>,
1443 Expr_::Call(p0) => Some((&p0.0, &p0.1, &p0.2, &p0.3)),
1447 pub fn as_function_pointer(&self) -> Option<(&FunctionPtrId<Ex, En>, &Vec<Targ<Ex>>)> {
1449 Expr_::FunctionPointer(p0) => Some((&p0.0, &p0.1)),
1453 pub fn as_int(&self) -> Option<&String> {
1455 Expr_::Int(p0) => Some(p0),
1459 pub fn as_float(&self) -> Option<&String> {
1461 Expr_::Float(p0) => Some(p0),
1465 pub fn as_string(&self) -> Option<&bstr::BString> {
1467 Expr_::String(p0) => Some(p0),
1471 pub fn as_string2(&self) -> Option<&Vec<Expr<Ex, En>>> {
1473 Expr_::String2(p0) => Some(p0),
1477 pub fn as_prefixed_string(&self) -> Option<(&String, &Expr<Ex, En>)> {
1479 Expr_::PrefixedString(p0) => Some((&p0.0, &p0.1)),
1483 pub fn as_yield(&self) -> Option<&Afield<Ex, En>> {
1485 Expr_::Yield(p0) => Some(&p0),
1489 pub fn as_await(&self) -> Option<&Expr<Ex, En>> {
1491 Expr_::Await(p0) => Some(&p0),
1495 pub fn as_readonly_expr(&self) -> Option<&Expr<Ex, En>> {
1497 Expr_::ReadonlyExpr(p0) => Some(&p0),
1501 pub fn as_tuple(&self) -> Option<&Vec<Expr<Ex, En>>> {
1503 Expr_::Tuple(p0) => Some(p0),
1507 pub fn as_list(&self) -> Option<&Vec<Expr<Ex, En>>> {
1509 Expr_::List(p0) => Some(p0),
1513 pub fn as_cast(&self) -> Option<(&Hint, &Expr<Ex, En>)> {
1515 Expr_::Cast(p0) => Some((&p0.0, &p0.1)),
1519 pub fn as_unop(&self) -> Option<(&ast_defs::Uop, &Expr<Ex, En>)> {
1521 Expr_::Unop(p0) => Some((&p0.0, &p0.1)),
1525 pub fn as_binop(&self) -> Option<(&ast_defs::Bop, &Expr<Ex, En>, &Expr<Ex, En>)> {
1527 Expr_::Binop(p0) => Some((&p0.0, &p0.1, &p0.2)),
1531 pub fn as_pipe(&self) -> Option<(&Lid, &Expr<Ex, En>, &Expr<Ex, En>)> {
1533 Expr_::Pipe(p0) => Some((&p0.0, &p0.1, &p0.2)),
1537 pub fn as_eif(&self) -> Option<(&Expr<Ex, En>, &Option<Expr<Ex, En>>, &Expr<Ex, En>)> {
1539 Expr_::Eif(p0) => Some((&p0.0, &p0.1, &p0.2)),
1543 pub fn as_is(&self) -> Option<(&Expr<Ex, En>, &Hint)> {
1545 Expr_::Is(p0) => Some((&p0.0, &p0.1)),
1549 pub fn as_as(&self) -> Option<(&Expr<Ex, En>, &Hint, &bool)> {
1551 Expr_::As(p0) => Some((&p0.0, &p0.1, &p0.2)),
1555 pub fn as_upcast(&self) -> Option<(&Expr<Ex, En>, &Hint)> {
1557 Expr_::Upcast(p0) => Some((&p0.0, &p0.1)),
1567 &Option<Expr<Ex, En>>,
1571 Expr_::New(p0) => Some((&p0.0, &p0.1, &p0.2, &p0.3, &p0.4)),
1575 pub fn as_record(&self) -> Option<(&Sid, &Vec<(Expr<Ex, En>, Expr<Ex, En>)>)> {
1577 Expr_::Record(p0) => Some((&p0.0, &p0.1)),
1581 pub fn as_efun(&self) -> Option<(&Fun_<Ex, En>, &Vec<Lid>)> {
1583 Expr_::Efun(p0) => Some((&p0.0, &p0.1)),
1587 pub fn as_lfun(&self) -> Option<(&Fun_<Ex, En>, &Vec<Lid>)> {
1589 Expr_::Lfun(p0) => Some((&p0.0, &p0.1)),
1593 pub fn as_xml(&self) -> Option<(&ClassName, &Vec<XhpAttribute<Ex, En>>, &Vec<Expr<Ex, En>>)> {
1595 Expr_::Xml(p0) => Some((&p0.0, &p0.1, &p0.2)),
1599 pub fn as_import(&self) -> Option<(&ImportFlavor, &Expr<Ex, En>)> {
1601 Expr_::Import(p0) => Some((&p0.0, &p0.1)),
1605 pub fn as_collection(
1609 &Option<CollectionTarg<Ex>>,
1610 &Vec<Afield<Ex, En>>,
1613 Expr_::Collection(p0) => Some((&p0.0, &p0.1, &p0.2)),
1617 pub fn as_expression_tree(&self) -> Option<&ExpressionTree<Ex, En>> {
1619 Expr_::ExpressionTree(p0) => Some(&p0),
1623 pub fn as_lplaceholder(&self) -> Option<&Pos> {
1625 Expr_::Lplaceholder(p0) => Some(&p0),
1629 pub fn as_fun_id(&self) -> Option<&Sid> {
1631 Expr_::FunId(p0) => Some(&p0),
1635 pub fn as_method_id(&self) -> Option<(&Expr<Ex, En>, &Pstring)> {
1637 Expr_::MethodId(p0) => Some((&p0.0, &p0.1)),
1641 pub fn as_method_caller(&self) -> Option<(&ClassName, &Pstring)> {
1643 Expr_::MethodCaller(p0) => Some((&p0.0, &p0.1)),
1647 pub fn as_smethod_id(&self) -> Option<(&ClassId<Ex, En>, &Pstring)> {
1649 Expr_::SmethodId(p0) => Some((&p0.0, &p0.1)),
1653 pub fn as_pair(&self) -> Option<(&Option<(Targ<Ex>, Targ<Ex>)>, &Expr<Ex, En>, &Expr<Ex, En>)> {
1655 Expr_::Pair(p0) => Some((&p0.0, &p0.1, &p0.2)),
1659 pub fn as_etsplice(&self) -> Option<&Expr<Ex, En>> {
1661 Expr_::ETSplice(p0) => Some(&p0),
1665 pub fn as_enum_class_label(&self) -> Option<(&Option<ClassName>, &String)> {
1667 Expr_::EnumClassLabel(p0) => Some((&p0.0, &p0.1)),
1671 pub fn as_hole(&self) -> Option<(&Expr<Ex, En>, &Ex, &Ex, &HoleSource)> {
1673 Expr_::Hole(p0) => Some((&p0.0, &p0.1, &p0.2, &p0.3)),
1677 pub fn as_darray_mut(
1680 &mut Option<(Targ<Ex>, Targ<Ex>)>,
1681 &mut Vec<(Expr<Ex, En>, Expr<Ex, En>)>,
1684 Expr_::Darray(p0) => Some((&mut p0.0, &mut p0.1)),
1688 pub fn as_varray_mut(&mut self) -> Option<(&mut Option<Targ<Ex>>, &mut Vec<Expr<Ex, En>>)> {
1690 Expr_::Varray(p0) => Some((&mut p0.0, &mut p0.1)),
1694 pub fn as_shape_mut(&mut self) -> Option<&mut Vec<(ast_defs::ShapeFieldName, Expr<Ex, En>)>> {
1696 Expr_::Shape(p0) => Some(p0),
1700 pub fn as_val_collection_mut(
1702 ) -> Option<(&mut VcKind, &mut Option<Targ<Ex>>, &mut Vec<Expr<Ex, En>>)> {
1704 Expr_::ValCollection(p0) => Some((&mut p0.0, &mut p0.1, &mut p0.2)),
1708 pub fn as_key_val_collection_mut(
1712 &mut Option<(Targ<Ex>, Targ<Ex>)>,
1713 &mut Vec<Field<Ex, En>>,
1716 Expr_::KeyValCollection(p0) => Some((&mut p0.0, &mut p0.1, &mut p0.2)),
1720 pub fn as_id_mut(&mut self) -> Option<&mut Sid> {
1722 Expr_::Id(p0) => Some(p0.as_mut()),
1726 pub fn as_lvar_mut(&mut self) -> Option<&mut Lid> {
1728 Expr_::Lvar(p0) => Some(p0.as_mut()),
1732 pub fn as_dollardollar_mut(&mut self) -> Option<&mut Lid> {
1734 Expr_::Dollardollar(p0) => Some(p0.as_mut()),
1738 pub fn as_clone_mut(&mut self) -> Option<&mut Expr<Ex, En>> {
1740 Expr_::Clone(p0) => Some(p0.as_mut()),
1744 pub fn as_array_get_mut(&mut self) -> Option<(&mut Expr<Ex, En>, &mut Option<Expr<Ex, En>>)> {
1746 Expr_::ArrayGet(p0) => Some((&mut p0.0, &mut p0.1)),
1750 pub fn as_obj_get_mut(
1759 Expr_::ObjGet(p0) => Some((&mut p0.0, &mut p0.1, &mut p0.2, &mut p0.3)),
1763 pub fn as_class_get_mut(
1765 ) -> Option<(&mut ClassId<Ex, En>, &mut ClassGetExpr<Ex, En>, &mut bool)> {
1767 Expr_::ClassGet(p0) => Some((&mut p0.0, &mut p0.1, &mut p0.2)),
1771 pub fn as_class_const_mut(&mut self) -> Option<(&mut ClassId<Ex, En>, &mut Pstring)> {
1773 Expr_::ClassConst(p0) => Some((&mut p0.0, &mut p0.1)),
1782 &mut Vec<(ast_defs::ParamKind, Expr<Ex, En>)>,
1783 &mut Option<Expr<Ex, En>>,
1786 Expr_::Call(p0) => Some((&mut p0.0, &mut p0.1, &mut p0.2, &mut p0.3)),
1790 pub fn as_function_pointer_mut(
1792 ) -> Option<(&mut FunctionPtrId<Ex, En>, &mut Vec<Targ<Ex>>)> {
1794 Expr_::FunctionPointer(p0) => Some((&mut p0.0, &mut p0.1)),
1798 pub fn as_int_mut(&mut self) -> Option<&mut String> {
1800 Expr_::Int(p0) => Some(p0),
1804 pub fn as_float_mut(&mut self) -> Option<&mut String> {
1806 Expr_::Float(p0) => Some(p0),
1810 pub fn as_string_mut(&mut self) -> Option<&mut bstr::BString> {
1812 Expr_::String(p0) => Some(p0),
1816 pub fn as_string2_mut(&mut self) -> Option<&mut Vec<Expr<Ex, En>>> {
1818 Expr_::String2(p0) => Some(p0),
1822 pub fn as_prefixed_string_mut(&mut self) -> Option<(&mut String, &mut Expr<Ex, En>)> {
1824 Expr_::PrefixedString(p0) => Some((&mut p0.0, &mut p0.1)),
1828 pub fn as_yield_mut(&mut self) -> Option<&mut Afield<Ex, En>> {
1830 Expr_::Yield(p0) => Some(p0.as_mut()),
1834 pub fn as_await_mut(&mut self) -> Option<&mut Expr<Ex, En>> {
1836 Expr_::Await(p0) => Some(p0.as_mut()),
1840 pub fn as_readonly_expr_mut(&mut self) -> Option<&mut Expr<Ex, En>> {
1842 Expr_::ReadonlyExpr(p0) => Some(p0.as_mut()),
1846 pub fn as_tuple_mut(&mut self) -> Option<&mut Vec<Expr<Ex, En>>> {
1848 Expr_::Tuple(p0) => Some(p0),
1852 pub fn as_list_mut(&mut self) -> Option<&mut Vec<Expr<Ex, En>>> {
1854 Expr_::List(p0) => Some(p0),
1858 pub fn as_cast_mut(&mut self) -> Option<(&mut Hint, &mut Expr<Ex, En>)> {
1860 Expr_::Cast(p0) => Some((&mut p0.0, &mut p0.1)),
1864 pub fn as_unop_mut(&mut self) -> Option<(&mut ast_defs::Uop, &mut Expr<Ex, En>)> {
1866 Expr_::Unop(p0) => Some((&mut p0.0, &mut p0.1)),
1870 pub fn as_binop_mut(
1872 ) -> Option<(&mut ast_defs::Bop, &mut Expr<Ex, En>, &mut Expr<Ex, En>)> {
1874 Expr_::Binop(p0) => Some((&mut p0.0, &mut p0.1, &mut p0.2)),
1878 pub fn as_pipe_mut(&mut self) -> Option<(&mut Lid, &mut Expr<Ex, En>, &mut Expr<Ex, En>)> {
1880 Expr_::Pipe(p0) => Some((&mut p0.0, &mut p0.1, &mut p0.2)),
1888 &mut Option<Expr<Ex, En>>,
1892 Expr_::Eif(p0) => Some((&mut p0.0, &mut p0.1, &mut p0.2)),
1896 pub fn as_is_mut(&mut self) -> Option<(&mut Expr<Ex, En>, &mut Hint)> {
1898 Expr_::Is(p0) => Some((&mut p0.0, &mut p0.1)),
1902 pub fn as_as_mut(&mut self) -> Option<(&mut Expr<Ex, En>, &mut Hint, &mut bool)> {
1904 Expr_::As(p0) => Some((&mut p0.0, &mut p0.1, &mut p0.2)),
1908 pub fn as_upcast_mut(&mut self) -> Option<(&mut Expr<Ex, En>, &mut Hint)> {
1910 Expr_::Upcast(p0) => Some((&mut p0.0, &mut p0.1)),
1917 &mut ClassId<Ex, En>,
1919 &mut Vec<Expr<Ex, En>>,
1920 &mut Option<Expr<Ex, En>>,
1924 Expr_::New(p0) => Some((&mut p0.0, &mut p0.1, &mut p0.2, &mut p0.3, &mut p0.4)),
1928 pub fn as_record_mut(&mut self) -> Option<(&mut Sid, &mut Vec<(Expr<Ex, En>, Expr<Ex, En>)>)> {
1930 Expr_::Record(p0) => Some((&mut p0.0, &mut p0.1)),
1934 pub fn as_efun_mut(&mut self) -> Option<(&mut Fun_<Ex, En>, &mut Vec<Lid>)> {
1936 Expr_::Efun(p0) => Some((&mut p0.0, &mut p0.1)),
1940 pub fn as_lfun_mut(&mut self) -> Option<(&mut Fun_<Ex, En>, &mut Vec<Lid>)> {
1942 Expr_::Lfun(p0) => Some((&mut p0.0, &mut p0.1)),
1950 &mut Vec<XhpAttribute<Ex, En>>,
1951 &mut Vec<Expr<Ex, En>>,
1954 Expr_::Xml(p0) => Some((&mut p0.0, &mut p0.1, &mut p0.2)),
1958 pub fn as_import_mut(&mut self) -> Option<(&mut ImportFlavor, &mut Expr<Ex, En>)> {
1960 Expr_::Import(p0) => Some((&mut p0.0, &mut p0.1)),
1964 pub fn as_collection_mut(
1968 &mut Option<CollectionTarg<Ex>>,
1969 &mut Vec<Afield<Ex, En>>,
1972 Expr_::Collection(p0) => Some((&mut p0.0, &mut p0.1, &mut p0.2)),
1976 pub fn as_expression_tree_mut(&mut self) -> Option<&mut ExpressionTree<Ex, En>> {
1978 Expr_::ExpressionTree(p0) => Some(p0.as_mut()),
1982 pub fn as_lplaceholder_mut(&mut self) -> Option<&mut Pos> {
1984 Expr_::Lplaceholder(p0) => Some(p0.as_mut()),
1988 pub fn as_fun_id_mut(&mut self) -> Option<&mut Sid> {
1990 Expr_::FunId(p0) => Some(p0.as_mut()),
1994 pub fn as_method_id_mut(&mut self) -> Option<(&mut Expr<Ex, En>, &mut Pstring)> {
1996 Expr_::MethodId(p0) => Some((&mut p0.0, &mut p0.1)),
2000 pub fn as_method_caller_mut(&mut self) -> Option<(&mut ClassName, &mut Pstring)> {
2002 Expr_::MethodCaller(p0) => Some((&mut p0.0, &mut p0.1)),
2006 pub fn as_smethod_id_mut(&mut self) -> Option<(&mut ClassId<Ex, En>, &mut Pstring)> {
2008 Expr_::SmethodId(p0) => Some((&mut p0.0, &mut p0.1)),
2015 &mut Option<(Targ<Ex>, Targ<Ex>)>,
2020 Expr_::Pair(p0) => Some((&mut p0.0, &mut p0.1, &mut p0.2)),
2024 pub fn as_etsplice_mut(&mut self) -> Option<&mut Expr<Ex, En>> {
2026 Expr_::ETSplice(p0) => Some(p0.as_mut()),
2030 pub fn as_enum_class_label_mut(&mut self) -> Option<(&mut Option<ClassName>, &mut String)> {
2032 Expr_::EnumClassLabel(p0) => Some((&mut p0.0, &mut p0.1)),
2038 ) -> Option<(&mut Expr<Ex, En>, &mut Ex, &mut Ex, &mut HoleSource)> {
2040 Expr_::Hole(p0) => Some((&mut p0.0, &mut p0.1, &mut p0.2, &mut p0.3)),
2044 pub fn as_darray_into(
2047 Option<(Targ<Ex>, Targ<Ex>)>,
2048 Vec<(Expr<Ex, En>, Expr<Ex, En>)>,
2051 Expr_::Darray(p0) => Some(((*p0).0, (*p0).1)),
2055 pub fn as_varray_into(self) -> Option<(Option<Targ<Ex>>, Vec<Expr<Ex, En>>)> {
2057 Expr_::Varray(p0) => Some(((*p0).0, (*p0).1)),
2061 pub fn as_shape_into(self) -> Option<Vec<(ast_defs::ShapeFieldName, Expr<Ex, En>)>> {
2063 Expr_::Shape(p0) => Some(p0),
2067 pub fn as_val_collection_into(self) -> Option<(VcKind, Option<Targ<Ex>>, Vec<Expr<Ex, En>>)> {
2069 Expr_::ValCollection(p0) => Some(((*p0).0, (*p0).1, (*p0).2)),
2073 pub fn as_key_val_collection_into(
2075 ) -> Option<(KvcKind, Option<(Targ<Ex>, Targ<Ex>)>, Vec<Field<Ex, En>>)> {
2077 Expr_::KeyValCollection(p0) => Some(((*p0).0, (*p0).1, (*p0).2)),
2081 pub fn as_id_into(self) -> Option<Sid> {
2083 Expr_::Id(p0) => Some(*p0),
2087 pub fn as_lvar_into(self) -> Option<Lid> {
2089 Expr_::Lvar(p0) => Some(*p0),
2093 pub fn as_dollardollar_into(self) -> Option<Lid> {
2095 Expr_::Dollardollar(p0) => Some(*p0),
2099 pub fn as_clone_into(self) -> Option<Expr<Ex, En>> {
2101 Expr_::Clone(p0) => Some(*p0),
2105 pub fn as_array_get_into(self) -> Option<(Expr<Ex, En>, Option<Expr<Ex, En>>)> {
2107 Expr_::ArrayGet(p0) => Some(((*p0).0, (*p0).1)),
2111 pub fn as_obj_get_into(self) -> Option<(Expr<Ex, En>, Expr<Ex, En>, OgNullFlavor, bool)> {
2113 Expr_::ObjGet(p0) => Some(((*p0).0, (*p0).1, (*p0).2, (*p0).3)),
2117 pub fn as_class_get_into(self) -> Option<(ClassId<Ex, En>, ClassGetExpr<Ex, En>, bool)> {
2119 Expr_::ClassGet(p0) => Some(((*p0).0, (*p0).1, (*p0).2)),
2123 pub fn as_class_const_into(self) -> Option<(ClassId<Ex, En>, Pstring)> {
2125 Expr_::ClassConst(p0) => Some(((*p0).0, (*p0).1)),
2129 pub fn as_call_into(
2134 Vec<(ast_defs::ParamKind, Expr<Ex, En>)>,
2135 Option<Expr<Ex, En>>,
2138 Expr_::Call(p0) => Some(((*p0).0, (*p0).1, (*p0).2, (*p0).3)),
2142 pub fn as_function_pointer_into(self) -> Option<(FunctionPtrId<Ex, En>, Vec<Targ<Ex>>)> {
2144 Expr_::FunctionPointer(p0) => Some(((*p0).0, (*p0).1)),
2148 pub fn as_int_into(self) -> Option<String> {
2150 Expr_::Int(p0) => Some(p0),
2154 pub fn as_float_into(self) -> Option<String> {
2156 Expr_::Float(p0) => Some(p0),
2160 pub fn as_string_into(self) -> Option<bstr::BString> {
2162 Expr_::String(p0) => Some(p0),
2166 pub fn as_string2_into(self) -> Option<Vec<Expr<Ex, En>>> {
2168 Expr_::String2(p0) => Some(p0),
2172 pub fn as_prefixed_string_into(self) -> Option<(String, Expr<Ex, En>)> {
2174 Expr_::PrefixedString(p0) => Some(((*p0).0, (*p0).1)),
2178 pub fn as_yield_into(self) -> Option<Afield<Ex, En>> {
2180 Expr_::Yield(p0) => Some(*p0),
2184 pub fn as_await_into(self) -> Option<Expr<Ex, En>> {
2186 Expr_::Await(p0) => Some(*p0),
2190 pub fn as_readonly_expr_into(self) -> Option<Expr<Ex, En>> {
2192 Expr_::ReadonlyExpr(p0) => Some(*p0),
2196 pub fn as_tuple_into(self) -> Option<Vec<Expr<Ex, En>>> {
2198 Expr_::Tuple(p0) => Some(p0),
2202 pub fn as_list_into(self) -> Option<Vec<Expr<Ex, En>>> {
2204 Expr_::List(p0) => Some(p0),
2208 pub fn as_cast_into(self) -> Option<(Hint, Expr<Ex, En>)> {
2210 Expr_::Cast(p0) => Some(((*p0).0, (*p0).1)),
2214 pub fn as_unop_into(self) -> Option<(ast_defs::Uop, Expr<Ex, En>)> {
2216 Expr_::Unop(p0) => Some(((*p0).0, (*p0).1)),
2220 pub fn as_binop_into(self) -> Option<(ast_defs::Bop, Expr<Ex, En>, Expr<Ex, En>)> {
2222 Expr_::Binop(p0) => Some(((*p0).0, (*p0).1, (*p0).2)),
2226 pub fn as_pipe_into(self) -> Option<(Lid, Expr<Ex, En>, Expr<Ex, En>)> {
2228 Expr_::Pipe(p0) => Some(((*p0).0, (*p0).1, (*p0).2)),
2232 pub fn as_eif_into(self) -> Option<(Expr<Ex, En>, Option<Expr<Ex, En>>, Expr<Ex, En>)> {
2234 Expr_::Eif(p0) => Some(((*p0).0, (*p0).1, (*p0).2)),
2238 pub fn as_is_into(self) -> Option<(Expr<Ex, En>, Hint)> {
2240 Expr_::Is(p0) => Some(((*p0).0, (*p0).1)),
2244 pub fn as_as_into(self) -> Option<(Expr<Ex, En>, Hint, bool)> {
2246 Expr_::As(p0) => Some(((*p0).0, (*p0).1, (*p0).2)),
2250 pub fn as_upcast_into(self) -> Option<(Expr<Ex, En>, Hint)> {
2252 Expr_::Upcast(p0) => Some(((*p0).0, (*p0).1)),
2262 Option<Expr<Ex, En>>,
2266 Expr_::New(p0) => Some(((*p0).0, (*p0).1, (*p0).2, (*p0).3, (*p0).4)),
2270 pub fn as_record_into(self) -> Option<(Sid, Vec<(Expr<Ex, En>, Expr<Ex, En>)>)> {
2272 Expr_::Record(p0) => Some(((*p0).0, (*p0).1)),
2276 pub fn as_efun_into(self) -> Option<(Fun_<Ex, En>, Vec<Lid>)> {
2278 Expr_::Efun(p0) => Some(((*p0).0, (*p0).1)),
2282 pub fn as_lfun_into(self) -> Option<(Fun_<Ex, En>, Vec<Lid>)> {
2284 Expr_::Lfun(p0) => Some(((*p0).0, (*p0).1)),
2288 pub fn as_xml_into(self) -> Option<(ClassName, Vec<XhpAttribute<Ex, En>>, Vec<Expr<Ex, En>>)> {
2290 Expr_::Xml(p0) => Some(((*p0).0, (*p0).1, (*p0).2)),
2294 pub fn as_import_into(self) -> Option<(ImportFlavor, Expr<Ex, En>)> {
2296 Expr_::Import(p0) => Some(((*p0).0, (*p0).1)),
2300 pub fn as_collection_into(
2302 ) -> Option<(ClassName, Option<CollectionTarg<Ex>>, Vec<Afield<Ex, En>>)> {
2304 Expr_::Collection(p0) => Some(((*p0).0, (*p0).1, (*p0).2)),
2308 pub fn as_expression_tree_into(self) -> Option<ExpressionTree<Ex, En>> {
2310 Expr_::ExpressionTree(p0) => Some(*p0),
2314 pub fn as_lplaceholder_into(self) -> Option<Pos> {
2316 Expr_::Lplaceholder(p0) => Some(*p0),
2320 pub fn as_fun_id_into(self) -> Option<Sid> {
2322 Expr_::FunId(p0) => Some(*p0),
2326 pub fn as_method_id_into(self) -> Option<(Expr<Ex, En>, Pstring)> {
2328 Expr_::MethodId(p0) => Some(((*p0).0, (*p0).1)),
2332 pub fn as_method_caller_into(self) -> Option<(ClassName, Pstring)> {
2334 Expr_::MethodCaller(p0) => Some(((*p0).0, (*p0).1)),
2338 pub fn as_smethod_id_into(self) -> Option<(ClassId<Ex, En>, Pstring)> {
2340 Expr_::SmethodId(p0) => Some(((*p0).0, (*p0).1)),
2344 pub fn as_pair_into(
2346 ) -> Option<(Option<(Targ<Ex>, Targ<Ex>)>, Expr<Ex, En>, Expr<Ex, En>)> {
2348 Expr_::Pair(p0) => Some(((*p0).0, (*p0).1, (*p0).2)),
2352 pub fn as_etsplice_into(self) -> Option<Expr<Ex, En>> {
2354 Expr_::ETSplice(p0) => Some(*p0),
2358 pub fn as_enum_class_label_into(self) -> Option<(Option<ClassName>, String)> {
2360 Expr_::EnumClassLabel(p0) => Some(((*p0).0, (*p0).1)),
2364 pub fn as_hole_into(self) -> Option<(Expr<Ex, En>, Ex, Ex, HoleSource)> {
2366 Expr_::Hole(p0) => Some(((*p0).0, (*p0).1, (*p0).2, (*p0).3)),
2372 pub fn mk_typing() -> Self {
2375 pub fn mk_unsafe_cast(p0: Vec<Hint>) -> Self {
2376 HoleSource::UnsafeCast(p0)
2378 pub fn mk_enforced_cast(p0: Vec<Hint>) -> Self {
2379 HoleSource::EnforcedCast(p0)
2381 pub fn is_typing(&self) -> bool {
2383 HoleSource::Typing => true,
2387 pub fn is_unsafe_cast(&self) -> bool {
2389 HoleSource::UnsafeCast(..) => true,
2393 pub fn is_enforced_cast(&self) -> bool {
2395 HoleSource::EnforcedCast(..) => true,
2399 pub fn as_unsafe_cast(&self) -> Option<&Vec<Hint>> {
2401 HoleSource::UnsafeCast(p0) => Some(p0),
2405 pub fn as_enforced_cast(&self) -> Option<&Vec<Hint>> {
2407 HoleSource::EnforcedCast(p0) => Some(p0),
2411 pub fn as_unsafe_cast_mut(&mut self) -> Option<&mut Vec<Hint>> {
2413 HoleSource::UnsafeCast(p0) => Some(p0),
2417 pub fn as_enforced_cast_mut(&mut self) -> Option<&mut Vec<Hint>> {
2419 HoleSource::EnforcedCast(p0) => Some(p0),
2423 pub fn as_unsafe_cast_into(self) -> Option<Vec<Hint>> {
2425 HoleSource::UnsafeCast(p0) => Some(p0),
2429 pub fn as_enforced_cast_into(self) -> Option<Vec<Hint>> {
2431 HoleSource::EnforcedCast(p0) => Some(p0),
2436 impl<Ex, En> ClassGetExpr<Ex, En> {
2437 pub fn mk_cgstring(p0: Pstring) -> Self {
2438 ClassGetExpr::CGstring(p0)
2440 pub fn mk_cgexpr(p0: Expr<Ex, En>) -> Self {
2441 ClassGetExpr::CGexpr(p0)
2443 pub fn is_cgstring(&self) -> bool {
2445 ClassGetExpr::CGstring(..) => true,
2449 pub fn is_cgexpr(&self) -> bool {
2451 ClassGetExpr::CGexpr(..) => true,
2455 pub fn as_cgstring(&self) -> Option<&Pstring> {
2457 ClassGetExpr::CGstring(p0) => Some(p0),
2461 pub fn as_cgexpr(&self) -> Option<&Expr<Ex, En>> {
2463 ClassGetExpr::CGexpr(p0) => Some(p0),
2467 pub fn as_cgstring_mut(&mut self) -> Option<&mut Pstring> {
2469 ClassGetExpr::CGstring(p0) => Some(p0),
2473 pub fn as_cgexpr_mut(&mut self) -> Option<&mut Expr<Ex, En>> {
2475 ClassGetExpr::CGexpr(p0) => Some(p0),
2479 pub fn as_cgstring_into(self) -> Option<Pstring> {
2481 ClassGetExpr::CGstring(p0) => Some(p0),
2485 pub fn as_cgexpr_into(self) -> Option<Expr<Ex, En>> {
2487 ClassGetExpr::CGexpr(p0) => Some(p0),
2492 impl<Ex, En> Case<Ex, En> {
2493 pub fn mk_default(p0: Pos, p1: Block<Ex, En>) -> Self {
2494 Case::Default(p0, p1)
2496 pub fn mk_case(p0: Expr<Ex, En>, p1: Block<Ex, En>) -> Self {
2499 pub fn is_default(&self) -> bool {
2501 Case::Default(..) => true,
2505 pub fn is_case(&self) -> bool {
2507 Case::Case(..) => true,
2511 pub fn as_default(&self) -> Option<(&Pos, &Block<Ex, En>)> {
2513 Case::Default(p0, p1) => Some((p0, p1)),
2517 pub fn as_case(&self) -> Option<(&Expr<Ex, En>, &Block<Ex, En>)> {
2519 Case::Case(p0, p1) => Some((p0, p1)),
2523 pub fn as_default_mut(&mut self) -> Option<(&mut Pos, &mut Block<Ex, En>)> {
2525 Case::Default(p0, p1) => Some((p0, p1)),
2529 pub fn as_case_mut(&mut self) -> Option<(&mut Expr<Ex, En>, &mut Block<Ex, En>)> {
2531 Case::Case(p0, p1) => Some((p0, p1)),
2535 pub fn as_default_into(self) -> Option<(Pos, Block<Ex, En>)> {
2537 Case::Default(p0, p1) => Some((p0, p1)),
2541 pub fn as_case_into(self) -> Option<(Expr<Ex, En>, Block<Ex, En>)> {
2543 Case::Case(p0, p1) => Some((p0, p1)),
2548 impl<Ex, En> Afield<Ex, En> {
2549 pub fn mk_afvalue(p0: Expr<Ex, En>) -> Self {
2552 pub fn mk_afkvalue(p0: Expr<Ex, En>, p1: Expr<Ex, En>) -> Self {
2553 Afield::AFkvalue(p0, p1)
2555 pub fn is_afvalue(&self) -> bool {
2557 Afield::AFvalue(..) => true,
2561 pub fn is_afkvalue(&self) -> bool {
2563 Afield::AFkvalue(..) => true,
2567 pub fn as_afvalue(&self) -> Option<&Expr<Ex, En>> {
2569 Afield::AFvalue(p0) => Some(p0),
2573 pub fn as_afkvalue(&self) -> Option<(&Expr<Ex, En>, &Expr<Ex, En>)> {
2575 Afield::AFkvalue(p0, p1) => Some((p0, p1)),
2579 pub fn as_afvalue_mut(&mut self) -> Option<&mut Expr<Ex, En>> {
2581 Afield::AFvalue(p0) => Some(p0),
2585 pub fn as_afkvalue_mut(&mut self) -> Option<(&mut Expr<Ex, En>, &mut Expr<Ex, En>)> {
2587 Afield::AFkvalue(p0, p1) => Some((p0, p1)),
2591 pub fn as_afvalue_into(self) -> Option<Expr<Ex, En>> {
2593 Afield::AFvalue(p0) => Some(p0),
2597 pub fn as_afkvalue_into(self) -> Option<(Expr<Ex, En>, Expr<Ex, En>)> {
2599 Afield::AFkvalue(p0, p1) => Some((p0, p1)),
2604 impl<Ex, En> XhpAttribute<Ex, En> {
2605 pub fn mk_xhp_simple(p0: XhpSimple<Ex, En>) -> Self {
2606 XhpAttribute::XhpSimple(p0)
2608 pub fn mk_xhp_spread(p0: Expr<Ex, En>) -> Self {
2609 XhpAttribute::XhpSpread(p0)
2611 pub fn is_xhp_simple(&self) -> bool {
2613 XhpAttribute::XhpSimple(..) => true,
2617 pub fn is_xhp_spread(&self) -> bool {
2619 XhpAttribute::XhpSpread(..) => true,
2623 pub fn as_xhp_simple(&self) -> Option<&XhpSimple<Ex, En>> {
2625 XhpAttribute::XhpSimple(p0) => Some(p0),
2629 pub fn as_xhp_spread(&self) -> Option<&Expr<Ex, En>> {
2631 XhpAttribute::XhpSpread(p0) => Some(p0),
2635 pub fn as_xhp_simple_mut(&mut self) -> Option<&mut XhpSimple<Ex, En>> {
2637 XhpAttribute::XhpSimple(p0) => Some(p0),
2641 pub fn as_xhp_spread_mut(&mut self) -> Option<&mut Expr<Ex, En>> {
2643 XhpAttribute::XhpSpread(p0) => Some(p0),
2647 pub fn as_xhp_simple_into(self) -> Option<XhpSimple<Ex, En>> {
2649 XhpAttribute::XhpSimple(p0) => Some(p0),
2653 pub fn as_xhp_spread_into(self) -> Option<Expr<Ex, En>> {
2655 XhpAttribute::XhpSpread(p0) => Some(p0),
2660 impl<Ex, En> FunVariadicity<Ex, En> {
2661 pub fn mk_fvvariadic_arg(p0: FunParam<Ex, En>) -> Self {
2662 FunVariadicity::FVvariadicArg(p0)
2664 pub fn mk_fvellipsis(p0: Pos) -> Self {
2665 FunVariadicity::FVellipsis(p0)
2667 pub fn mk_fvnon_variadic() -> Self {
2668 FunVariadicity::FVnonVariadic
2670 pub fn is_fvvariadic_arg(&self) -> bool {
2672 FunVariadicity::FVvariadicArg(..) => true,
2676 pub fn is_fvellipsis(&self) -> bool {
2678 FunVariadicity::FVellipsis(..) => true,
2682 pub fn is_fvnon_variadic(&self) -> bool {
2684 FunVariadicity::FVnonVariadic => true,
2688 pub fn as_fvvariadic_arg(&self) -> Option<&FunParam<Ex, En>> {
2690 FunVariadicity::FVvariadicArg(p0) => Some(p0),
2694 pub fn as_fvellipsis(&self) -> Option<&Pos> {
2696 FunVariadicity::FVellipsis(p0) => Some(p0),
2700 pub fn as_fvvariadic_arg_mut(&mut self) -> Option<&mut FunParam<Ex, En>> {
2702 FunVariadicity::FVvariadicArg(p0) => Some(p0),
2706 pub fn as_fvellipsis_mut(&mut self) -> Option<&mut Pos> {
2708 FunVariadicity::FVellipsis(p0) => Some(p0),
2712 pub fn as_fvvariadic_arg_into(self) -> Option<FunParam<Ex, En>> {
2714 FunVariadicity::FVvariadicArg(p0) => Some(p0),
2718 pub fn as_fvellipsis_into(self) -> Option<Pos> {
2720 FunVariadicity::FVellipsis(p0) => Some(p0),
2726 pub fn mk_emit_id(p0: isize) -> Self {
2729 pub fn mk_anonymous() -> Self {
2732 pub fn is_emit_id(&self) -> bool {
2734 EmitId::EmitId(..) => true,
2738 pub fn is_anonymous(&self) -> bool {
2740 EmitId::Anonymous => true,
2744 pub fn as_emit_id(&self) -> Option<&isize> {
2746 EmitId::EmitId(p0) => Some(p0),
2750 pub fn as_emit_id_mut(&mut self) -> Option<&mut isize> {
2752 EmitId::EmitId(p0) => Some(p0),
2756 pub fn as_emit_id_into(self) -> Option<isize> {
2758 EmitId::EmitId(p0) => Some(p0),
2764 pub fn mk_required() -> Self {
2765 XhpAttrTag::Required
2767 pub fn mk_late_init() -> Self {
2768 XhpAttrTag::LateInit
2770 pub fn is_required(&self) -> bool {
2772 XhpAttrTag::Required => true,
2776 pub fn is_late_init(&self) -> bool {
2778 XhpAttrTag::LateInit => true,
2783 impl<Ex, En> ClassAttr<Ex, En> {
2784 pub fn mk_caname(p0: Sid) -> Self {
2785 ClassAttr::CAName(p0)
2787 pub fn mk_cafield(p0: CaField<Ex, En>) -> Self {
2788 ClassAttr::CAField(p0)
2790 pub fn is_caname(&self) -> bool {
2792 ClassAttr::CAName(..) => true,
2796 pub fn is_cafield(&self) -> bool {
2798 ClassAttr::CAField(..) => true,
2802 pub fn as_caname(&self) -> Option<&Sid> {
2804 ClassAttr::CAName(p0) => Some(p0),
2808 pub fn as_cafield(&self) -> Option<&CaField<Ex, En>> {
2810 ClassAttr::CAField(p0) => Some(p0),
2814 pub fn as_caname_mut(&mut self) -> Option<&mut Sid> {
2816 ClassAttr::CAName(p0) => Some(p0),
2820 pub fn as_cafield_mut(&mut self) -> Option<&mut CaField<Ex, En>> {
2822 ClassAttr::CAField(p0) => Some(p0),
2826 pub fn as_caname_into(self) -> Option<Sid> {
2828 ClassAttr::CAName(p0) => Some(p0),
2832 pub fn as_cafield_into(self) -> Option<CaField<Ex, En>> {
2834 ClassAttr::CAField(p0) => Some(p0),
2840 pub fn mk_cahint(p0: Hint) -> Self {
2843 pub fn mk_caenum(p0: Vec<String>) -> Self {
2846 pub fn is_cahint(&self) -> bool {
2848 CaType::CAHint(..) => true,
2852 pub fn is_caenum(&self) -> bool {
2854 CaType::CAEnum(..) => true,
2858 pub fn as_cahint(&self) -> Option<&Hint> {
2860 CaType::CAHint(p0) => Some(p0),
2864 pub fn as_caenum(&self) -> Option<&Vec<String>> {
2866 CaType::CAEnum(p0) => Some(p0),
2870 pub fn as_cahint_mut(&mut self) -> Option<&mut Hint> {
2872 CaType::CAHint(p0) => Some(p0),
2876 pub fn as_caenum_mut(&mut self) -> Option<&mut Vec<String>> {
2878 CaType::CAEnum(p0) => Some(p0),
2882 pub fn as_cahint_into(self) -> Option<Hint> {
2884 CaType::CAHint(p0) => Some(p0),
2888 pub fn as_caenum_into(self) -> Option<Vec<String>> {
2890 CaType::CAEnum(p0) => Some(p0),
2895 impl<Ex, En> ClassConstKind<Ex, En> {
2896 pub fn mk_ccabstract(p0: Option<Expr<Ex, En>>) -> Self {
2897 ClassConstKind::CCAbstract(p0)
2899 pub fn mk_ccconcrete(p0: Expr<Ex, En>) -> Self {
2900 ClassConstKind::CCConcrete(p0)
2902 pub fn is_ccabstract(&self) -> bool {
2904 ClassConstKind::CCAbstract(..) => true,
2908 pub fn is_ccconcrete(&self) -> bool {
2910 ClassConstKind::CCConcrete(..) => true,
2914 pub fn as_ccabstract(&self) -> Option<&Option<Expr<Ex, En>>> {
2916 ClassConstKind::CCAbstract(p0) => Some(p0),
2920 pub fn as_ccconcrete(&self) -> Option<&Expr<Ex, En>> {
2922 ClassConstKind::CCConcrete(p0) => Some(p0),
2926 pub fn as_ccabstract_mut(&mut self) -> Option<&mut Option<Expr<Ex, En>>> {
2928 ClassConstKind::CCAbstract(p0) => Some(p0),
2932 pub fn as_ccconcrete_mut(&mut self) -> Option<&mut Expr<Ex, En>> {
2934 ClassConstKind::CCConcrete(p0) => Some(p0),
2938 pub fn as_ccabstract_into(self) -> Option<Option<Expr<Ex, En>>> {
2940 ClassConstKind::CCAbstract(p0) => Some(p0),
2944 pub fn as_ccconcrete_into(self) -> Option<Expr<Ex, En>> {
2946 ClassConstKind::CCConcrete(p0) => Some(p0),
2951 impl ClassTypeconst {
2952 pub fn mk_tcabstract(p0: ClassAbstractTypeconst) -> Self {
2953 ClassTypeconst::TCAbstract(p0)
2955 pub fn mk_tcconcrete(p0: ClassConcreteTypeconst) -> Self {
2956 ClassTypeconst::TCConcrete(p0)
2958 pub fn is_tcabstract(&self) -> bool {
2960 ClassTypeconst::TCAbstract(..) => true,
2964 pub fn is_tcconcrete(&self) -> bool {
2966 ClassTypeconst::TCConcrete(..) => true,
2970 pub fn as_tcabstract(&self) -> Option<&ClassAbstractTypeconst> {
2972 ClassTypeconst::TCAbstract(p0) => Some(p0),
2976 pub fn as_tcconcrete(&self) -> Option<&ClassConcreteTypeconst> {
2978 ClassTypeconst::TCConcrete(p0) => Some(p0),
2982 pub fn as_tcabstract_mut(&mut self) -> Option<&mut ClassAbstractTypeconst> {
2984 ClassTypeconst::TCAbstract(p0) => Some(p0),
2988 pub fn as_tcconcrete_mut(&mut self) -> Option<&mut ClassConcreteTypeconst> {
2990 ClassTypeconst::TCConcrete(p0) => Some(p0),
2994 pub fn as_tcabstract_into(self) -> Option<ClassAbstractTypeconst> {
2996 ClassTypeconst::TCAbstract(p0) => Some(p0),
3000 pub fn as_tcconcrete_into(self) -> Option<ClassConcreteTypeconst> {
3002 ClassTypeconst::TCConcrete(p0) => Some(p0),
3007 impl<Ex, En> Def<Ex, En> {
3008 pub fn mk_fun(p0: FunDef<Ex, En>) -> Self {
3009 Def::Fun(Box::new(p0))
3011 pub fn mk_class(p0: Class_<Ex, En>) -> Self {
3012 Def::Class(Box::new(p0))
3014 pub fn mk_record_def(p0: RecordDef<Ex, En>) -> Self {
3015 Def::RecordDef(Box::new(p0))
3017 pub fn mk_stmt(p0: Stmt<Ex, En>) -> Self {
3018 Def::Stmt(Box::new(p0))
3020 pub fn mk_typedef(p0: Typedef<Ex, En>) -> Self {
3021 Def::Typedef(Box::new(p0))
3023 pub fn mk_constant(p0: Gconst<Ex, En>) -> Self {
3024 Def::Constant(Box::new(p0))
3026 pub fn mk_namespace(p0: Sid, p1: Program<Ex, En>) -> Self {
3027 Def::Namespace(Box::new((p0, p1)))
3029 pub fn mk_namespace_use(p0: Vec<(NsKind, Sid, Sid)>) -> Self {
3030 Def::NamespaceUse(p0)
3032 pub fn mk_set_namespace_env(p0: Nsenv) -> Self {
3033 Def::SetNamespaceEnv(Box::new(p0))
3035 pub fn mk_file_attributes(p0: FileAttribute<Ex, En>) -> Self {
3036 Def::FileAttributes(Box::new(p0))
3038 pub fn is_fun(&self) -> bool {
3040 Def::Fun(..) => true,
3044 pub fn is_class(&self) -> bool {
3046 Def::Class(..) => true,
3050 pub fn is_record_def(&self) -> bool {
3052 Def::RecordDef(..) => true,
3056 pub fn is_stmt(&self) -> bool {
3058 Def::Stmt(..) => true,
3062 pub fn is_typedef(&self) -> bool {
3064 Def::Typedef(..) => true,
3068 pub fn is_constant(&self) -> bool {
3070 Def::Constant(..) => true,
3074 pub fn is_namespace(&self) -> bool {
3076 Def::Namespace(..) => true,
3080 pub fn is_namespace_use(&self) -> bool {
3082 Def::NamespaceUse(..) => true,
3086 pub fn is_set_namespace_env(&self) -> bool {
3088 Def::SetNamespaceEnv(..) => true,
3092 pub fn is_file_attributes(&self) -> bool {
3094 Def::FileAttributes(..) => true,
3098 pub fn as_fun(&self) -> Option<&FunDef<Ex, En>> {
3100 Def::Fun(p0) => Some(&p0),
3104 pub fn as_class(&self) -> Option<&Class_<Ex, En>> {
3106 Def::Class(p0) => Some(&p0),
3110 pub fn as_record_def(&self) -> Option<&RecordDef<Ex, En>> {
3112 Def::RecordDef(p0) => Some(&p0),
3116 pub fn as_stmt(&self) -> Option<&Stmt<Ex, En>> {
3118 Def::Stmt(p0) => Some(&p0),
3122 pub fn as_typedef(&self) -> Option<&Typedef<Ex, En>> {
3124 Def::Typedef(p0) => Some(&p0),
3128 pub fn as_constant(&self) -> Option<&Gconst<Ex, En>> {
3130 Def::Constant(p0) => Some(&p0),
3134 pub fn as_namespace(&self) -> Option<(&Sid, &Program<Ex, En>)> {
3136 Def::Namespace(p0) => Some((&p0.0, &p0.1)),
3140 pub fn as_namespace_use(&self) -> Option<&Vec<(NsKind, Sid, Sid)>> {
3142 Def::NamespaceUse(p0) => Some(p0),
3146 pub fn as_set_namespace_env(&self) -> Option<&Nsenv> {
3148 Def::SetNamespaceEnv(p0) => Some(&p0),
3152 pub fn as_file_attributes(&self) -> Option<&FileAttribute<Ex, En>> {
3154 Def::FileAttributes(p0) => Some(&p0),
3158 pub fn as_fun_mut(&mut self) -> Option<&mut FunDef<Ex, En>> {
3160 Def::Fun(p0) => Some(p0.as_mut()),
3164 pub fn as_class_mut(&mut self) -> Option<&mut Class_<Ex, En>> {
3166 Def::Class(p0) => Some(p0.as_mut()),
3170 pub fn as_record_def_mut(&mut self) -> Option<&mut RecordDef<Ex, En>> {
3172 Def::RecordDef(p0) => Some(p0.as_mut()),
3176 pub fn as_stmt_mut(&mut self) -> Option<&mut Stmt<Ex, En>> {
3178 Def::Stmt(p0) => Some(p0.as_mut()),
3182 pub fn as_typedef_mut(&mut self) -> Option<&mut Typedef<Ex, En>> {
3184 Def::Typedef(p0) => Some(p0.as_mut()),
3188 pub fn as_constant_mut(&mut self) -> Option<&mut Gconst<Ex, En>> {
3190 Def::Constant(p0) => Some(p0.as_mut()),
3194 pub fn as_namespace_mut(&mut self) -> Option<(&mut Sid, &mut Program<Ex, En>)> {
3196 Def::Namespace(p0) => Some((&mut p0.0, &mut p0.1)),
3200 pub fn as_namespace_use_mut(&mut self) -> Option<&mut Vec<(NsKind, Sid, Sid)>> {
3202 Def::NamespaceUse(p0) => Some(p0),
3206 pub fn as_set_namespace_env_mut(&mut self) -> Option<&mut Nsenv> {
3208 Def::SetNamespaceEnv(p0) => Some(p0.as_mut()),
3212 pub fn as_file_attributes_mut(&mut self) -> Option<&mut FileAttribute<Ex, En>> {
3214 Def::FileAttributes(p0) => Some(p0.as_mut()),
3218 pub fn as_fun_into(self) -> Option<FunDef<Ex, En>> {
3220 Def::Fun(p0) => Some(*p0),
3224 pub fn as_class_into(self) -> Option<Class_<Ex, En>> {
3226 Def::Class(p0) => Some(*p0),
3230 pub fn as_record_def_into(self) -> Option<RecordDef<Ex, En>> {
3232 Def::RecordDef(p0) => Some(*p0),
3236 pub fn as_stmt_into(self) -> Option<Stmt<Ex, En>> {
3238 Def::Stmt(p0) => Some(*p0),
3242 pub fn as_typedef_into(self) -> Option<Typedef<Ex, En>> {
3244 Def::Typedef(p0) => Some(*p0),
3248 pub fn as_constant_into(self) -> Option<Gconst<Ex, En>> {
3250 Def::Constant(p0) => Some(*p0),
3254 pub fn as_namespace_into(self) -> Option<(Sid, Program<Ex, En>)> {
3256 Def::Namespace(p0) => Some(((*p0).0, (*p0).1)),
3260 pub fn as_namespace_use_into(self) -> Option<Vec<(NsKind, Sid, Sid)>> {
3262 Def::NamespaceUse(p0) => Some(p0),
3266 pub fn as_set_namespace_env_into(self) -> Option<Nsenv> {
3268 Def::SetNamespaceEnv(p0) => Some(*p0),
3272 pub fn as_file_attributes_into(self) -> Option<FileAttribute<Ex, En>> {
3274 Def::FileAttributes(p0) => Some(*p0),
3280 pub fn mk_nsnamespace() -> Self {
3283 pub fn mk_nsclass() -> Self {
3286 pub fn mk_nsclass_and_namespace() -> Self {
3287 NsKind::NSClassAndNamespace
3289 pub fn mk_nsfun() -> Self {
3292 pub fn mk_nsconst() -> Self {
3295 pub fn is_nsnamespace(&self) -> bool {
3297 NsKind::NSNamespace => true,
3301 pub fn is_nsclass(&self) -> bool {
3303 NsKind::NSClass => true,
3307 pub fn is_nsclass_and_namespace(&self) -> bool {
3309 NsKind::NSClassAndNamespace => true,
3313 pub fn is_nsfun(&self) -> bool {
3315 NsKind::NSFun => true,
3319 pub fn is_nsconst(&self) -> bool {
3321 NsKind::NSConst => true,
3326 impl BreakContinueLevel {
3327 pub fn mk_level_ok(p0: Option<isize>) -> Self {
3328 BreakContinueLevel::LevelOk(p0)
3330 pub fn mk_level_non_literal() -> Self {
3331 BreakContinueLevel::LevelNonLiteral
3333 pub fn mk_level_non_positive() -> Self {
3334 BreakContinueLevel::LevelNonPositive
3336 pub fn is_level_ok(&self) -> bool {
3338 BreakContinueLevel::LevelOk(..) => true,
3342 pub fn is_level_non_literal(&self) -> bool {
3344 BreakContinueLevel::LevelNonLiteral => true,
3348 pub fn is_level_non_positive(&self) -> bool {
3350 BreakContinueLevel::LevelNonPositive => true,
3354 pub fn as_level_ok(&self) -> Option<&Option<isize>> {
3356 BreakContinueLevel::LevelOk(p0) => Some(p0),
3360 pub fn as_level_ok_mut(&mut self) -> Option<&mut Option<isize>> {
3362 BreakContinueLevel::LevelOk(p0) => Some(p0),
3366 pub fn as_level_ok_into(self) -> Option<Option<isize>> {
3368 BreakContinueLevel::LevelOk(p0) => Some(p0),