- init init_aminusmethid (
- n_minus: nullable TMinus
- )
- do
- empty_init
- _n_minus = n_minus.as(not null)
- n_minus.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_minus == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TMinus
- _n_minus = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_minus)
- end
-end
-redef class AStarMethid
- private init empty_init do end
-
- init init_astarmethid (
- n_star: nullable TStar
- )
- do
- empty_init
- _n_star = n_star.as(not null)
- n_star.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_star == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TStar
- _n_star = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_star)
- end
-end
-redef class ASlashMethid
- private init empty_init do end
-
- init init_aslashmethid (
- n_slash: nullable TSlash
- )
- do
- empty_init
- _n_slash = n_slash.as(not null)
- n_slash.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_slash == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TSlash
- _n_slash = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_slash)
- end
-end
-redef class APercentMethid
- private init empty_init do end
-
- init init_apercentmethid (
- n_percent: nullable TPercent
- )
- do
- empty_init
- _n_percent = n_percent.as(not null)
- n_percent.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_percent == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TPercent
- _n_percent = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_percent)
- end
-end
-redef class AEqMethid
- private init empty_init do end
-
- init init_aeqmethid (
- n_eq: nullable TEq
- )
- do
- empty_init
- _n_eq = n_eq.as(not null)
- n_eq.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_eq == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TEq
- _n_eq = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_eq)
- end
-end
-redef class ANeMethid
- private init empty_init do end
-
- init init_anemethid (
- n_ne: nullable TNe
- )
- do
- empty_init
- _n_ne = n_ne.as(not null)
- n_ne.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_ne == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TNe
- _n_ne = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_ne)
- end
-end
-redef class ALeMethid
- private init empty_init do end
-
- init init_alemethid (
- n_le: nullable TLe
- )
- do
- empty_init
- _n_le = n_le.as(not null)
- n_le.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_le == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TLe
- _n_le = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_le)
- end
-end
-redef class AGeMethid
- private init empty_init do end
-
- init init_agemethid (
- n_ge: nullable TGe
- )
- do
- empty_init
- _n_ge = n_ge.as(not null)
- n_ge.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_ge == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TGe
- _n_ge = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_ge)
- end
-end
-redef class ALtMethid
- private init empty_init do end
-
- init init_altmethid (
- n_lt: nullable TLt
- )
- do
- empty_init
- _n_lt = n_lt.as(not null)
- n_lt.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_lt == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TLt
- _n_lt = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_lt)
- end
-end
-redef class AGtMethid
- private init empty_init do end
-
- init init_agtmethid (
- n_gt: nullable TGt
- )
- do
- empty_init
- _n_gt = n_gt.as(not null)
- n_gt.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_gt == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TGt
- _n_gt = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_gt)
- end
-end
-redef class ALlMethid
- private init empty_init do end
-
- init init_allmethid (
- n_ll: nullable TLl
- )
- do
- empty_init
- _n_ll = n_ll.as(not null)
- n_ll.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_ll == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TLl
- _n_ll = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_ll)
- end
-end
-redef class AGgMethid
- private init empty_init do end
-
- init init_aggmethid (
- n_gg: nullable TGg
- )
- do
- empty_init
- _n_gg = n_gg.as(not null)
- n_gg.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_gg == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TGg
- _n_gg = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_gg)
- end
-end
-redef class ABraMethid
- private init empty_init do end
-
- init init_abramethid (
- n_obra: nullable TObra,
- n_cbra: nullable TCbra
- )
- do
- empty_init
- _n_obra = n_obra.as(not null)
- n_obra.parent = self
- _n_cbra = n_cbra.as(not null)
- n_cbra.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_obra == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TObra
- _n_obra = new_child
- else
- abort
- end
- return
- end
- if _n_cbra == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TCbra
- _n_cbra = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_obra)
- v.enter_visit(_n_cbra)
- end
-end
-redef class AStarshipMethid
- private init empty_init do end
-
- init init_astarshipmethid (
- n_starship: nullable TStarship
- )
- do
- empty_init
- _n_starship = n_starship.as(not null)
- n_starship.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_starship == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TStarship
- _n_starship = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_starship)
- end
-end
-redef class AAssignMethid
- private init empty_init do end
-
- init init_aassignmethid (
- n_id: nullable TId,
- n_assign: nullable TAssign
- )
- do
- empty_init
- _n_id = n_id.as(not null)
- n_id.parent = self
- _n_assign = n_assign.as(not null)
- n_assign.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_id == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TId
- _n_id = new_child
- else
- abort
- end
- return
- end
- if _n_assign == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TAssign
- _n_assign = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_id)
- v.enter_visit(_n_assign)
- end
-end
-redef class ABraassignMethid
- private init empty_init do end
-
- init init_abraassignmethid (
- n_obra: nullable TObra,
- n_cbra: nullable TCbra,
- n_assign: nullable TAssign
- )
- do
- empty_init
- _n_obra = n_obra.as(not null)
- n_obra.parent = self
- _n_cbra = n_cbra.as(not null)
- n_cbra.parent = self
- _n_assign = n_assign.as(not null)
- n_assign.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_obra == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TObra
- _n_obra = new_child
- else
- abort
- end
- return
- end
- if _n_cbra == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TCbra
- _n_cbra = new_child
- else
- abort
- end
- return
- end
- if _n_assign == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TAssign
- _n_assign = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_obra)
- v.enter_visit(_n_cbra)
- v.enter_visit(_n_assign)
- end
-end
-redef class ASignature
- private init empty_init do end
-
- init init_asignature (
- n_opar: nullable TOpar,
- n_params: Collection[Object], # Should be Collection[AParam]
- n_cpar: nullable TCpar,
- n_type: nullable AType,
- n_closure_decls: Collection[Object] # Should be Collection[AClosureDecl]
- )
- do
- empty_init
- _n_opar = n_opar
- if n_opar != null then
- n_opar.parent = self
- end
- for n in n_params do
- assert n isa AParam
- _n_params.add(n)
- n.parent = self
- end
- _n_cpar = n_cpar
- if n_cpar != null then
- n_cpar.parent = self
- end
- _n_type = n_type
- if n_type != null then
- n_type.parent = self
- end
- for n in n_closure_decls do
- assert n isa AClosureDecl
- _n_closure_decls.add(n)
- n.parent = self
- end
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_opar == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TOpar
- _n_opar = new_child
- else
- _n_opar = null
- end
- return
- end
- for i in [0.._n_params.length[ do
- if _n_params[i] == old_child then
- if new_child != null then
- assert new_child isa AParam
- _n_params[i] = new_child
- new_child.parent = self
- else
- _n_params.remove_at(i)
- end
- return
- end
- end
- if _n_cpar == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TCpar
- _n_cpar = new_child
- else
- _n_cpar = null
- end
- return
- end
- if _n_type == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AType
- _n_type = new_child
- else
- _n_type = null
- end
- return
- end
- for i in [0.._n_closure_decls.length[ do
- if _n_closure_decls[i] == old_child then
- if new_child != null then
- assert new_child isa AClosureDecl
- _n_closure_decls[i] = new_child
- new_child.parent = self
- else
- _n_closure_decls.remove_at(i)
- end
- return
- end
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- if _n_opar != null then
- v.enter_visit(_n_opar.as(not null))
- end
- for n in _n_params do
- v.enter_visit(n)
- end
- if _n_cpar != null then
- v.enter_visit(_n_cpar.as(not null))
- end
- if _n_type != null then
- v.enter_visit(_n_type.as(not null))
- end
- for n in _n_closure_decls do
- v.enter_visit(n)
- end
- end
-end
-redef class AParam
- private init empty_init do end
-
- init init_aparam (
- n_id: nullable TId,
- n_type: nullable AType,
- n_dotdotdot: nullable TDotdotdot,
- n_annotations: nullable AAnnotations
- )
- do
- empty_init
- _n_id = n_id.as(not null)
- n_id.parent = self
- _n_type = n_type
- if n_type != null then
- n_type.parent = self
- end
- _n_dotdotdot = n_dotdotdot
- if n_dotdotdot != null then
- n_dotdotdot.parent = self
- end
- _n_annotations = n_annotations
- if n_annotations != null then
- n_annotations.parent = self
- end
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_id == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TId
- _n_id = new_child
- else
- abort
- end
- return
- end
- if _n_type == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AType
- _n_type = new_child
- else
- _n_type = null
- end
- return
- end
- if _n_dotdotdot == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TDotdotdot
- _n_dotdotdot = new_child
- else
- _n_dotdotdot = null
- end
- return
- end
- if _n_annotations == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AAnnotations
- _n_annotations = new_child
- else
- _n_annotations = null
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_id)
- if _n_type != null then
- v.enter_visit(_n_type.as(not null))
- end
- if _n_dotdotdot != null then
- v.enter_visit(_n_dotdotdot.as(not null))
- end
- if _n_annotations != null then
- v.enter_visit(_n_annotations.as(not null))
- end
- end
-end
-redef class AClosureDecl
- private init empty_init do end
-
- init init_aclosuredecl (
- n_kwbreak: nullable TKwbreak,
- n_bang: nullable TBang,
- n_id: nullable TId,
- n_signature: nullable ASignature,
- n_expr: nullable AExpr
- )
- do
- empty_init
- _n_kwbreak = n_kwbreak
- if n_kwbreak != null then
- n_kwbreak.parent = self
- end
- _n_bang = n_bang.as(not null)
- n_bang.parent = self
- _n_id = n_id.as(not null)
- n_id.parent = self
- _n_signature = n_signature.as(not null)
- n_signature.parent = self
- _n_expr = n_expr
- if n_expr != null then
- n_expr.parent = self
- end
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_kwbreak == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwbreak
- _n_kwbreak = new_child
- else
- _n_kwbreak = null
- end
- return
- end
- if _n_bang == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TBang
- _n_bang = new_child
- else
- abort
- end
- return
- end
- if _n_id == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TId
- _n_id = new_child
- else
- abort
- end
- return
- end
- if _n_signature == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa ASignature
- _n_signature = new_child
- else
- abort
- end
- return
- end
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- _n_expr = null
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- if _n_kwbreak != null then
- v.enter_visit(_n_kwbreak.as(not null))
- end
- v.enter_visit(_n_bang)
- v.enter_visit(_n_id)
- v.enter_visit(_n_signature)
- if _n_expr != null then
- v.enter_visit(_n_expr.as(not null))
- end
- end
-end
-redef class AType
- private init empty_init do end
-
- init init_atype (
- n_kwnullable: nullable TKwnullable,
- n_id: nullable TClassid,
- n_types: Collection[Object], # Should be Collection[AType]
- n_annotations: nullable AAnnotations
- )
- do
- empty_init
- _n_kwnullable = n_kwnullable
- if n_kwnullable != null then
- n_kwnullable.parent = self
- end
- _n_id = n_id.as(not null)
- n_id.parent = self
- for n in n_types do
- assert n isa AType
- _n_types.add(n)
- n.parent = self
- end
- _n_annotations = n_annotations
- if n_annotations != null then
- n_annotations.parent = self
- end
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_kwnullable == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwnullable
- _n_kwnullable = new_child
- else
- _n_kwnullable = null
- end
- return
- end
- if _n_id == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TClassid
- _n_id = new_child
- else
- abort
- end
- return
- end
- for i in [0.._n_types.length[ do
- if _n_types[i] == old_child then
- if new_child != null then
- assert new_child isa AType
- _n_types[i] = new_child
- new_child.parent = self
- else
- _n_types.remove_at(i)
- end
- return
- end
- end
- if _n_annotations == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AAnnotations
- _n_annotations = new_child
- else
- _n_annotations = null
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- if _n_kwnullable != null then
- v.enter_visit(_n_kwnullable.as(not null))
- end
- v.enter_visit(_n_id)
- for n in _n_types do
- v.enter_visit(n)
- end
- if _n_annotations != null then
- v.enter_visit(_n_annotations.as(not null))
- end
- end
-end
-redef class ALabel
- private init empty_init do end
-
- init init_alabel (
- n_kwlabel: nullable TKwlabel,
- n_id: nullable TId
- )
- do
- empty_init
- _n_kwlabel = n_kwlabel.as(not null)
- n_kwlabel.parent = self
- _n_id = n_id.as(not null)
- n_id.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_kwlabel == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwlabel
- _n_kwlabel = new_child
- else
- abort
- end
- return
- end
- if _n_id == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TId
- _n_id = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_kwlabel)
- v.enter_visit(_n_id)
- end
-end
-redef class ABlockExpr
- private init empty_init do end
-
- init init_ablockexpr (
- n_expr: Collection[Object], # Should be Collection[AExpr]
- n_kwend: nullable TKwend
- )
- do
- empty_init
- for n in n_expr do
- assert n isa AExpr
- _n_expr.add(n)
- n.parent = self
- end
- _n_kwend = n_kwend
- if n_kwend != null then
- n_kwend.parent = self
- end
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- for i in [0.._n_expr.length[ do
- if _n_expr[i] == old_child then
- if new_child != null then
- assert new_child isa AExpr
- _n_expr[i] = new_child
- new_child.parent = self
- else
- _n_expr.remove_at(i)
- end
- return
- end
- end
- if _n_kwend == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwend
- _n_kwend = new_child
- else
- _n_kwend = null
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- for n in _n_expr do
- v.enter_visit(n)
- end
- if _n_kwend != null then
- v.enter_visit(_n_kwend.as(not null))
- end
- end
-end
-redef class AVardeclExpr
- private init empty_init do end
-
- init init_avardeclexpr (
- n_kwvar: nullable TKwvar,
- n_id: nullable TId,
- n_type: nullable AType,
- n_assign: nullable TAssign,
- n_expr: nullable AExpr,
- n_annotations: nullable AAnnotations
- )
- do
- empty_init
- _n_kwvar = n_kwvar.as(not null)
- n_kwvar.parent = self
- _n_id = n_id.as(not null)
- n_id.parent = self
- _n_type = n_type
- if n_type != null then
- n_type.parent = self
- end
- _n_assign = n_assign
- if n_assign != null then
- n_assign.parent = self
- end
- _n_expr = n_expr
- if n_expr != null then
- n_expr.parent = self
- end
- _n_annotations = n_annotations
- if n_annotations != null then
- n_annotations.parent = self
- end
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_kwvar == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwvar
- _n_kwvar = new_child
- else
- abort
- end
- return
- end
- if _n_id == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TId
- _n_id = new_child
- else
- abort
- end
- return
- end
- if _n_type == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AType
- _n_type = new_child
- else
- _n_type = null
- end
- return
- end
- if _n_assign == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TAssign
- _n_assign = new_child
- else
- _n_assign = null
- end
- return
- end
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- _n_expr = null
- end
- return
- end
- if _n_annotations == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AAnnotations
- _n_annotations = new_child
- else
- _n_annotations = null
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_kwvar)
- v.enter_visit(_n_id)
- if _n_type != null then
- v.enter_visit(_n_type.as(not null))
- end
- if _n_assign != null then
- v.enter_visit(_n_assign.as(not null))
- end
- if _n_expr != null then
- v.enter_visit(_n_expr.as(not null))
- end
- if _n_annotations != null then
- v.enter_visit(_n_annotations.as(not null))
- end
- end
-end
-redef class AReturnExpr
- private init empty_init do end
-
- init init_areturnexpr (
- n_kwreturn: nullable TKwreturn,
- n_expr: nullable AExpr
- )
- do
- empty_init
- _n_kwreturn = n_kwreturn
- if n_kwreturn != null then
- n_kwreturn.parent = self
- end
- _n_expr = n_expr
- if n_expr != null then
- n_expr.parent = self
- end
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_kwreturn == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwreturn
- _n_kwreturn = new_child
- else
- _n_kwreturn = null
- end
- return
- end
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- _n_expr = null
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- if _n_kwreturn != null then
- v.enter_visit(_n_kwreturn.as(not null))
- end
- if _n_expr != null then
- v.enter_visit(_n_expr.as(not null))
- end
- end
-end
-redef class ABreakExpr
- private init empty_init do end
-
- init init_abreakexpr (
- n_kwbreak: nullable TKwbreak,
- n_label: nullable ALabel,
- n_expr: nullable AExpr
- )
- do
- empty_init
- _n_kwbreak = n_kwbreak.as(not null)
- n_kwbreak.parent = self
- _n_label = n_label
- if n_label != null then
- n_label.parent = self
- end
- _n_expr = n_expr
- if n_expr != null then
- n_expr.parent = self
- end
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_kwbreak == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwbreak
- _n_kwbreak = new_child
- else
- abort
- end
- return
- end
- if _n_label == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa ALabel
- _n_label = new_child
- else
- _n_label = null
- end
- return
- end
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- _n_expr = null
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_kwbreak)
- if _n_label != null then
- v.enter_visit(_n_label.as(not null))
- end
- if _n_expr != null then
- v.enter_visit(_n_expr.as(not null))
- end
- end
-end
-redef class AAbortExpr
- private init empty_init do end
-
- init init_aabortexpr (
- n_kwabort: nullable TKwabort
- )
- do
- empty_init
- _n_kwabort = n_kwabort.as(not null)
- n_kwabort.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_kwabort == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwabort
- _n_kwabort = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_kwabort)
- end
-end
-redef class AContinueExpr
- private init empty_init do end
-
- init init_acontinueexpr (
- n_kwcontinue: nullable TKwcontinue,
- n_label: nullable ALabel,
- n_expr: nullable AExpr
- )
- do
- empty_init
- _n_kwcontinue = n_kwcontinue
- if n_kwcontinue != null then
- n_kwcontinue.parent = self
- end
- _n_label = n_label
- if n_label != null then
- n_label.parent = self
- end
- _n_expr = n_expr
- if n_expr != null then
- n_expr.parent = self
- end
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_kwcontinue == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwcontinue
- _n_kwcontinue = new_child
- else
- _n_kwcontinue = null
- end
- return
- end
- if _n_label == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa ALabel
- _n_label = new_child
- else
- _n_label = null
- end
- return
- end
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- _n_expr = null
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- if _n_kwcontinue != null then
- v.enter_visit(_n_kwcontinue.as(not null))
- end
- if _n_label != null then
- v.enter_visit(_n_label.as(not null))
- end
- if _n_expr != null then
- v.enter_visit(_n_expr.as(not null))
- end
- end
-end
-redef class ADoExpr
- private init empty_init do end
-
- init init_adoexpr (
- n_kwdo: nullable TKwdo,
- n_block: nullable AExpr,
- n_label: nullable ALabel
- )
- do
- empty_init
- _n_kwdo = n_kwdo.as(not null)
- n_kwdo.parent = self
- _n_block = n_block
- if n_block != null then
- n_block.parent = self
- end
- _n_label = n_label
- if n_label != null then
- n_label.parent = self
- end
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_kwdo == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwdo
- _n_kwdo = new_child
- else
- abort
- end
- return
- end
- if _n_block == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_block = new_child
- else
- _n_block = null
- end
- return
- end
- if _n_label == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa ALabel
- _n_label = new_child
- else
- _n_label = null
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_kwdo)
- if _n_block != null then
- v.enter_visit(_n_block.as(not null))
- end
- if _n_label != null then
- v.enter_visit(_n_label.as(not null))
- end
- end
-end
-redef class AIfExpr
- private init empty_init do end
-
- init init_aifexpr (
- n_kwif: nullable TKwif,
- n_expr: nullable AExpr,
- n_then: nullable AExpr,
- n_else: nullable AExpr
- )
- do
- empty_init
- _n_kwif = n_kwif.as(not null)
- n_kwif.parent = self
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_then = n_then
- if n_then != null then
- n_then.parent = self
- end
- _n_else = n_else
- if n_else != null then
- n_else.parent = self
- end
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_kwif == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwif
- _n_kwif = new_child
- else
- abort
- end
- return
- end
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- abort
- end
- return
- end
- if _n_then == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_then = new_child
- else
- _n_then = null
- end
- return
- end
- if _n_else == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_else = new_child
- else
- _n_else = null
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_kwif)
- v.enter_visit(_n_expr)
- if _n_then != null then
- v.enter_visit(_n_then.as(not null))
- end
- if _n_else != null then
- v.enter_visit(_n_else.as(not null))
- end
- end
-end
-redef class AIfexprExpr
- private init empty_init do end
-
- init init_aifexprexpr (
- n_kwif: nullable TKwif,
- n_expr: nullable AExpr,
- n_kwthen: nullable TKwthen,
- n_then: nullable AExpr,
- n_kwelse: nullable TKwelse,
- n_else: nullable AExpr
- )
- do
- empty_init
- _n_kwif = n_kwif.as(not null)
- n_kwif.parent = self
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_kwthen = n_kwthen.as(not null)
- n_kwthen.parent = self
- _n_then = n_then.as(not null)
- n_then.parent = self
- _n_kwelse = n_kwelse.as(not null)
- n_kwelse.parent = self
- _n_else = n_else.as(not null)
- n_else.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_kwif == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwif
- _n_kwif = new_child
- else
- abort
- end
- return
- end
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- abort
- end
- return
- end
- if _n_kwthen == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwthen
- _n_kwthen = new_child
- else
- abort
- end
- return
- end
- if _n_then == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_then = new_child
- else
- abort
- end
- return
- end
- if _n_kwelse == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwelse
- _n_kwelse = new_child
- else
- abort
- end
- return
- end
- if _n_else == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_else = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_kwif)
- v.enter_visit(_n_expr)
- v.enter_visit(_n_kwthen)
- v.enter_visit(_n_then)
- v.enter_visit(_n_kwelse)
- v.enter_visit(_n_else)
- end
-end
-redef class AWhileExpr
- private init empty_init do end
-
- init init_awhileexpr (
- n_kwwhile: nullable TKwwhile,
- n_expr: nullable AExpr,
- n_kwdo: nullable TKwdo,
- n_block: nullable AExpr,
- n_label: nullable ALabel
- )
- do
- empty_init
- _n_kwwhile = n_kwwhile.as(not null)
- n_kwwhile.parent = self
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_kwdo = n_kwdo.as(not null)
- n_kwdo.parent = self
- _n_block = n_block
- if n_block != null then
- n_block.parent = self
- end
- _n_label = n_label
- if n_label != null then
- n_label.parent = self
- end
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_kwwhile == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwwhile
- _n_kwwhile = new_child
- else
- abort
- end
- return
- end
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- abort
- end
- return
- end
- if _n_kwdo == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwdo
- _n_kwdo = new_child
- else
- abort
- end
- return
- end
- if _n_block == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_block = new_child
- else
- _n_block = null
- end
- return
- end
- if _n_label == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa ALabel
- _n_label = new_child
- else
- _n_label = null
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_kwwhile)
- v.enter_visit(_n_expr)
- v.enter_visit(_n_kwdo)
- if _n_block != null then
- v.enter_visit(_n_block.as(not null))
- end
- if _n_label != null then
- v.enter_visit(_n_label.as(not null))
- end
- end
-end
-redef class ALoopExpr
- private init empty_init do end
-
- init init_aloopexpr (
- n_kwloop: nullable TKwloop,
- n_block: nullable AExpr,
- n_label: nullable ALabel
- )
- do
- empty_init
- _n_kwloop = n_kwloop.as(not null)
- n_kwloop.parent = self
- _n_block = n_block
- if n_block != null then
- n_block.parent = self
- end
- _n_label = n_label
- if n_label != null then
- n_label.parent = self
- end
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_kwloop == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwloop
- _n_kwloop = new_child
- else
- abort
- end
- return
- end
- if _n_block == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_block = new_child
- else
- _n_block = null
- end
- return
- end
- if _n_label == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa ALabel
- _n_label = new_child
- else
- _n_label = null
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_kwloop)
- if _n_block != null then
- v.enter_visit(_n_block.as(not null))
- end
- if _n_label != null then
- v.enter_visit(_n_label.as(not null))
- end
- end
-end
-redef class AForExpr
- private init empty_init do end
-
- init init_aforexpr (
- n_kwfor: nullable TKwfor,
- n_ids: Collection[Object], # Should be Collection[TId]
- n_expr: nullable AExpr,
- n_kwdo: nullable TKwdo,
- n_block: nullable AExpr,
- n_label: nullable ALabel
- )
- do
- empty_init
- _n_kwfor = n_kwfor.as(not null)
- n_kwfor.parent = self
- for n in n_ids do
- assert n isa TId
- _n_ids.add(n)
- n.parent = self
- end
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_kwdo = n_kwdo.as(not null)
- n_kwdo.parent = self
- _n_block = n_block
- if n_block != null then
- n_block.parent = self
- end
- _n_label = n_label
- if n_label != null then
- n_label.parent = self
- end
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_kwfor == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwfor
- _n_kwfor = new_child
- else
- abort
- end
- return
- end
- for i in [0.._n_ids.length[ do
- if _n_ids[i] == old_child then
- if new_child != null then
- assert new_child isa TId
- _n_ids[i] = new_child
- new_child.parent = self
- else
- _n_ids.remove_at(i)
- end
- return
- end
- end
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- abort
- end
- return
- end
- if _n_kwdo == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwdo
- _n_kwdo = new_child
- else
- abort
- end
- return
- end
- if _n_block == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_block = new_child
- else
- _n_block = null
- end
- return
- end
- if _n_label == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa ALabel
- _n_label = new_child
- else
- _n_label = null
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_kwfor)
- for n in _n_ids do
- v.enter_visit(n)
- end
- v.enter_visit(_n_expr)
- v.enter_visit(_n_kwdo)
- if _n_block != null then
- v.enter_visit(_n_block.as(not null))
- end
- if _n_label != null then
- v.enter_visit(_n_label.as(not null))
- end
- end
-end
-redef class AAssertExpr
- private init empty_init do end
-
- init init_aassertexpr (
- n_kwassert: nullable TKwassert,
- n_id: nullable TId,
- n_expr: nullable AExpr,
- n_else: nullable AExpr
- )
- do
- empty_init
- _n_kwassert = n_kwassert.as(not null)
- n_kwassert.parent = self
- _n_id = n_id
- if n_id != null then
- n_id.parent = self
- end
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_else = n_else
- if n_else != null then
- n_else.parent = self
- end
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_kwassert == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwassert
- _n_kwassert = new_child
- else
- abort
- end
- return
- end
- if _n_id == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TId
- _n_id = new_child
- else
- _n_id = null
- end
- return
- end
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- abort
- end
- return
- end
- if _n_else == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_else = new_child
- else
- _n_else = null
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_kwassert)
- if _n_id != null then
- v.enter_visit(_n_id.as(not null))
- end
- v.enter_visit(_n_expr)
- if _n_else != null then
- v.enter_visit(_n_else.as(not null))
- end
- end
-end
-redef class AOnceExpr
- private init empty_init do end
-
- init init_aonceexpr (
- n_kwonce: nullable TKwonce,
- n_expr: nullable AExpr
- )
- do
- empty_init
- _n_kwonce = n_kwonce.as(not null)
- n_kwonce.parent = self
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_kwonce == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwonce
- _n_kwonce = new_child
- else
- abort
- end
- return
- end
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_kwonce)
- v.enter_visit(_n_expr)
- end
-end
-redef class ASendExpr
- private init empty_init do end
-
- init init_asendexpr (
- n_expr: nullable AExpr
- )
- do
- empty_init
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_expr)
- end
-end
-redef class ABinopExpr
- private init empty_init do end
-
- init init_abinopexpr (
- n_expr: nullable AExpr,
- n_expr2: nullable AExpr
- )
- do
- empty_init
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_expr2 = n_expr2.as(not null)
- n_expr2.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- abort
- end
- return
- end
- if _n_expr2 == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr2 = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_expr)
- v.enter_visit(_n_expr2)
- end
-end
-redef class AOrExpr
- private init empty_init do end
-
- init init_aorexpr (
- n_expr: nullable AExpr,
- n_expr2: nullable AExpr
- )
- do
- empty_init
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_expr2 = n_expr2.as(not null)
- n_expr2.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- abort
- end
- return
- end
- if _n_expr2 == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr2 = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_expr)
- v.enter_visit(_n_expr2)
- end
-end
-redef class AAndExpr
- private init empty_init do end
-
- init init_aandexpr (
- n_expr: nullable AExpr,
- n_expr2: nullable AExpr
- )
- do
- empty_init
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_expr2 = n_expr2.as(not null)
- n_expr2.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- abort
- end
- return
- end
- if _n_expr2 == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr2 = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_expr)
- v.enter_visit(_n_expr2)
- end
-end
-redef class AOrElseExpr
- private init empty_init do end
-
- init init_aorelseexpr (
- n_expr: nullable AExpr,
- n_expr2: nullable AExpr
- )
- do
- empty_init
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_expr2 = n_expr2.as(not null)
- n_expr2.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- abort
- end
- return
- end
- if _n_expr2 == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr2 = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_expr)
- v.enter_visit(_n_expr2)
- end
-end
-redef class ANotExpr
- private init empty_init do end
-
- init init_anotexpr (
- n_kwnot: nullable TKwnot,
- n_expr: nullable AExpr
- )
- do
- empty_init
- _n_kwnot = n_kwnot.as(not null)
- n_kwnot.parent = self
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_kwnot == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwnot
- _n_kwnot = new_child
- else
- abort
- end
- return
- end
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_kwnot)
- v.enter_visit(_n_expr)
- end
-end
-redef class AEqExpr
- private init empty_init do end
-
- init init_aeqexpr (
- n_expr: nullable AExpr,
- n_expr2: nullable AExpr
- )
- do
- empty_init
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_expr2 = n_expr2.as(not null)
- n_expr2.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- abort
- end
- return
- end
- if _n_expr2 == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr2 = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_expr)
- v.enter_visit(_n_expr2)
- end
-end
-redef class AEeExpr
- private init empty_init do end
-
- init init_aeeexpr (
- n_expr: nullable AExpr,
- n_expr2: nullable AExpr
- )
- do
- empty_init
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_expr2 = n_expr2.as(not null)
- n_expr2.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- abort
- end
- return
- end
- if _n_expr2 == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr2 = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_expr)
- v.enter_visit(_n_expr2)
- end
-end
-redef class ANeExpr
- private init empty_init do end
-
- init init_aneexpr (
- n_expr: nullable AExpr,
- n_expr2: nullable AExpr
- )
- do
- empty_init
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_expr2 = n_expr2.as(not null)
- n_expr2.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- abort
- end
- return
- end
- if _n_expr2 == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr2 = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_expr)
- v.enter_visit(_n_expr2)
- end
-end
-redef class ALtExpr
- private init empty_init do end
-
- init init_altexpr (
- n_expr: nullable AExpr,
- n_expr2: nullable AExpr
- )
- do
- empty_init
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_expr2 = n_expr2.as(not null)
- n_expr2.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- abort
- end
- return
- end
- if _n_expr2 == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr2 = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_expr)
- v.enter_visit(_n_expr2)
- end
-end
-redef class ALeExpr
- private init empty_init do end
-
- init init_aleexpr (
- n_expr: nullable AExpr,
- n_expr2: nullable AExpr
- )
- do
- empty_init
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_expr2 = n_expr2.as(not null)
- n_expr2.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- abort
- end
- return
- end
- if _n_expr2 == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr2 = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_expr)
- v.enter_visit(_n_expr2)
- end
-end
-redef class ALlExpr
- private init empty_init do end
-
- init init_allexpr (
- n_expr: nullable AExpr,
- n_expr2: nullable AExpr
- )
- do
- empty_init
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_expr2 = n_expr2.as(not null)
- n_expr2.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- abort
- end
- return
- end
- if _n_expr2 == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr2 = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_expr)
- v.enter_visit(_n_expr2)
- end
-end
-redef class AGtExpr
- private init empty_init do end
-
- init init_agtexpr (
- n_expr: nullable AExpr,
- n_expr2: nullable AExpr
- )
- do
- empty_init
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_expr2 = n_expr2.as(not null)
- n_expr2.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- abort
- end
- return
- end
- if _n_expr2 == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr2 = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_expr)
- v.enter_visit(_n_expr2)
- end
-end
-redef class AGeExpr
- private init empty_init do end
-
- init init_ageexpr (
- n_expr: nullable AExpr,
- n_expr2: nullable AExpr
- )
- do
- empty_init
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_expr2 = n_expr2.as(not null)
- n_expr2.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- abort
- end
- return
- end
- if _n_expr2 == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr2 = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_expr)
- v.enter_visit(_n_expr2)
- end
-end
-redef class AGgExpr
- private init empty_init do end
-
- init init_aggexpr (
- n_expr: nullable AExpr,
- n_expr2: nullable AExpr
- )
- do
- empty_init
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_expr2 = n_expr2.as(not null)
- n_expr2.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- abort
- end
- return
- end
- if _n_expr2 == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr2 = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_expr)
- v.enter_visit(_n_expr2)
- end
-end
-redef class AIsaExpr
- private init empty_init do end
-
- init init_aisaexpr (
- n_expr: nullable AExpr,
- n_type: nullable AType
- )
- do
- empty_init
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_type = n_type.as(not null)
- n_type.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- abort
- end
- return
- end
- if _n_type == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AType
- _n_type = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_expr)
- v.enter_visit(_n_type)
- end
-end
-redef class APlusExpr
- private init empty_init do end
-
- init init_aplusexpr (
- n_expr: nullable AExpr,
- n_expr2: nullable AExpr
- )
- do
- empty_init
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_expr2 = n_expr2.as(not null)
- n_expr2.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- abort
- end
- return
- end
- if _n_expr2 == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr2 = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_expr)
- v.enter_visit(_n_expr2)
- end
-end
-redef class AMinusExpr
- private init empty_init do end
-
- init init_aminusexpr (
- n_expr: nullable AExpr,
- n_expr2: nullable AExpr
- )
- do
- empty_init
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_expr2 = n_expr2.as(not null)
- n_expr2.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_expr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr = new_child
- else
- abort
- end
- return
- end
- if _n_expr2 == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_expr2 = new_child
- else
- abort
- end
- return