- if _n_kwinit == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwinit
- _n_kwinit = new_child
- else
- abort
- end
- return
- end
- if _n_args == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExprs
- _n_args = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun n_expr=(node)
- do
- _n_expr = node
- node.parent = self
- end
- redef fun n_kwinit=(node)
- do
- _n_kwinit = node
- node.parent = self
- end
- redef fun n_args=(node)
- do
- _n_args = node
- node.parent = self
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_expr)
- v.enter_visit(_n_kwinit)
- v.enter_visit(_n_args)
- end
-end
-redef class ABraExpr
- private init empty_init do end
-
- init init_abraexpr (
- n_expr: nullable AExpr,
- n_args: nullable AExprs,
- n_closure_defs: Collection[Object] # Should be Collection[AClosureDef]
- )
- do
- empty_init
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_args = n_args.as(not null)
- n_args.parent = self
- for n in n_closure_defs do
- assert n isa AClosureDef
- _n_closure_defs.add(n)
- n.parent = self
- end
- 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_args == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExprs
- _n_args = new_child
- else
- abort
- end
- return
- end
- for i in [0.._n_closure_defs.length[ do
- if _n_closure_defs[i] == old_child then
- if new_child != null then
- assert new_child isa AClosureDef
- _n_closure_defs[i] = new_child
- new_child.parent = self
- else
- _n_closure_defs.remove_at(i)
- end
- return
- end
- end
- end
-
- redef fun n_expr=(node)
- do
- _n_expr = node
- node.parent = self
- end
- redef fun n_args=(node)
- do
- _n_args = node
- node.parent = self
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_expr)
- v.enter_visit(_n_args)
- for n in _n_closure_defs do
- v.enter_visit(n)
- end
- end
-end
-redef class ABraAssignExpr
- private init empty_init do end
-
- init init_abraassignexpr (
- n_expr: nullable AExpr,
- n_args: nullable AExprs,
- n_assign: nullable TAssign,
- n_value: nullable AExpr
- )
- do
- empty_init
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_args = n_args.as(not null)
- n_args.parent = self
- _n_assign = n_assign.as(not null)
- n_assign.parent = self
- _n_value = n_value.as(not null)
- n_value.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_args == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExprs
- _n_args = 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
- if _n_value == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_value = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun n_expr=(node)
- do
- _n_expr = node
- node.parent = self
- end
- redef fun n_args=(node)
- do
- _n_args = node
- node.parent = self
- end
- redef fun n_assign=(node)
- do
- _n_assign = node
- node.parent = self
- end
- redef fun n_value=(node)
- do
- _n_value = node
- node.parent = self
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_expr)
- v.enter_visit(_n_args)
- v.enter_visit(_n_assign)
- v.enter_visit(_n_value)
- end
-end
-redef class ABraReassignExpr
- private init empty_init do end
-
- init init_abrareassignexpr (
- n_expr: nullable AExpr,
- n_args: nullable AExprs,
- n_assign_op: nullable AAssignOp,
- n_value: nullable AExpr
- )
- do
- empty_init
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_args = n_args.as(not null)
- n_args.parent = self
- _n_assign_op = n_assign_op.as(not null)
- n_assign_op.parent = self
- _n_value = n_value.as(not null)
- n_value.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_args == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExprs
- _n_args = new_child
- else
- abort
- end
- return
- end
- if _n_assign_op == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AAssignOp
- _n_assign_op = new_child
- else
- abort
- end
- return
- end
- if _n_value == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_value = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun n_expr=(node)
- do
- _n_expr = node
- node.parent = self
- end
- redef fun n_args=(node)
- do
- _n_args = node
- node.parent = self
- end
- redef fun n_assign_op=(node)
- do
- _n_assign_op = node
- node.parent = self
- end
- redef fun n_value=(node)
- do
- _n_value = node
- node.parent = self
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_expr)
- v.enter_visit(_n_args)
- v.enter_visit(_n_assign_op)
- v.enter_visit(_n_value)
- end
-end
-redef class AClosureCallExpr
- private init empty_init do end
-
- init init_aclosurecallexpr (
- n_id: nullable TId,
- n_args: nullable AExprs,
- n_closure_defs: Collection[Object] # Should be Collection[AClosureDef]
- )
- do
- empty_init
- _n_id = n_id.as(not null)
- n_id.parent = self
- _n_args = n_args.as(not null)
- n_args.parent = self
- for n in n_closure_defs do
- assert n isa AClosureDef
- _n_closure_defs.add(n)
- n.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_args == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExprs
- _n_args = new_child
- else
- abort
- end
- return
- end
- for i in [0.._n_closure_defs.length[ do
- if _n_closure_defs[i] == old_child then
- if new_child != null then
- assert new_child isa AClosureDef
- _n_closure_defs[i] = new_child
- new_child.parent = self
- else
- _n_closure_defs.remove_at(i)
- end
- return
- end
- end
- end
-
- redef fun n_id=(node)
- do
- _n_id = node
- node.parent = self
- end
- redef fun n_args=(node)
- do
- _n_args = node
- node.parent = self
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_id)
- v.enter_visit(_n_args)
- for n in _n_closure_defs do
- v.enter_visit(n)
- end
- end
-end
-redef class AVarExpr
- private init empty_init do end
-
- init init_avarexpr (
- n_id: nullable TId
- )
- do
- empty_init
- _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_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 n_id=(node)
- do
- _n_id = node
- node.parent = self
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_id)
- end
-end
-redef class AVarAssignExpr
- private init empty_init do end
-
- init init_avarassignexpr (
- n_id: nullable TId,
- n_assign: nullable TAssign,
- n_value: nullable AExpr
- )
- 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
- _n_value = n_value.as(not null)
- n_value.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
- if _n_value == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_value = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun n_id=(node)
- do
- _n_id = node
- node.parent = self
- end
- redef fun n_assign=(node)
- do
- _n_assign = node
- node.parent = self
- end
- redef fun n_value=(node)
- do
- _n_value = node
- node.parent = self
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_id)
- v.enter_visit(_n_assign)
- v.enter_visit(_n_value)
- end
-end
-redef class AVarReassignExpr
- private init empty_init do end
-
- init init_avarreassignexpr (
- n_id: nullable TId,
- n_assign_op: nullable AAssignOp,
- n_value: nullable AExpr
- )
- do
- empty_init
- _n_id = n_id.as(not null)
- n_id.parent = self
- _n_assign_op = n_assign_op.as(not null)
- n_assign_op.parent = self
- _n_value = n_value.as(not null)
- n_value.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_op == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AAssignOp
- _n_assign_op = new_child
- else
- abort
- end
- return
- end
- if _n_value == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExpr
- _n_value = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun n_id=(node)
- do
- _n_id = node
- node.parent = self
- end
- redef fun n_assign_op=(node)
- do
- _n_assign_op = node
- node.parent = self
- end
- redef fun n_value=(node)
- do
- _n_value = node
- node.parent = self
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_id)
- v.enter_visit(_n_assign_op)
- v.enter_visit(_n_value)
- end
-end
-redef class ARangeExpr
- private init empty_init do end
-
- init init_arangeexpr (
- n_expr: nullable AExpr,
- n_expr2: nullable AExpr,
- n_annotations: nullable AAnnotations
- )
- 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
- _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_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
- 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 n_expr=(node)
- do
- _n_expr = node
- node.parent = self
- end
- redef fun n_expr2=(node)
- do
- _n_expr2 = node
- node.parent = self
- end
- redef fun n_annotations=(node)
- do
- _n_annotations = node
- if node != null then
- node.parent = self
- end
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_expr)
- v.enter_visit(_n_expr2)
- if _n_annotations != null then
- v.enter_visit(_n_annotations.as(not null))
- end
- end
-end
-redef class ACrangeExpr
- private init empty_init do end
-
- init init_acrangeexpr (
- n_obra: nullable TObra,
- n_expr: nullable AExpr,
- n_expr2: nullable AExpr,
- n_cbra: nullable TCbra,
- n_annotations: nullable AAnnotations
- )
- do
- empty_init
- _n_obra = n_obra.as(not null)
- n_obra.parent = self
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_expr2 = n_expr2.as(not null)
- n_expr2.parent = self
- _n_cbra = n_cbra.as(not null)
- n_cbra.parent = self
- _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_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_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
- 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_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 n_obra=(node)
- do
- _n_obra = node
- node.parent = self
- end
- redef fun n_expr=(node)
- do
- _n_expr = node
- node.parent = self
- end
- redef fun n_expr2=(node)
- do
- _n_expr2 = node
- node.parent = self
- end
- redef fun n_cbra=(node)
- do
- _n_cbra = node
- node.parent = self
- end
- redef fun n_annotations=(node)
- do
- _n_annotations = node
- if node != null then
- node.parent = self
- end
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_obra)
- v.enter_visit(_n_expr)
- v.enter_visit(_n_expr2)
- v.enter_visit(_n_cbra)
- if _n_annotations != null then
- v.enter_visit(_n_annotations.as(not null))
- end
- end
-end
-redef class AOrangeExpr
- private init empty_init do end
-
- init init_aorangeexpr (
- n_obra: nullable TObra,
- n_expr: nullable AExpr,
- n_expr2: nullable AExpr,
- n_cbra: nullable TObra,
- n_annotations: nullable AAnnotations
- )
- do
- empty_init
- _n_obra = n_obra.as(not null)
- n_obra.parent = self
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_expr2 = n_expr2.as(not null)
- n_expr2.parent = self
- _n_cbra = n_cbra.as(not null)
- n_cbra.parent = self
- _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_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_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
- if _n_cbra == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TObra
- _n_cbra = new_child
- else
- abort
- 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 n_obra=(node)
- do
- _n_obra = node
- node.parent = self
- end
- redef fun n_expr=(node)
- do
- _n_expr = node
- node.parent = self
- end
- redef fun n_expr2=(node)
- do
- _n_expr2 = node
- node.parent = self
- end
- redef fun n_cbra=(node)
- do
- _n_cbra = node
- node.parent = self
- end
- redef fun n_annotations=(node)
- do
- _n_annotations = node
- if node != null then
- node.parent = self
- end
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_obra)
- v.enter_visit(_n_expr)
- v.enter_visit(_n_expr2)
- v.enter_visit(_n_cbra)
- if _n_annotations != null then
- v.enter_visit(_n_annotations.as(not null))
- end
- end
-end
-redef class AArrayExpr
- private init empty_init do end
-
- init init_aarrayexpr (
- n_exprs: nullable AExprs,
- n_annotations: nullable AAnnotations
- )
- do
- empty_init
- _n_exprs = n_exprs.as(not null)
- n_exprs.parent = self
- _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_exprs == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AExprs
- _n_exprs = new_child
- else
- abort
- 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 n_exprs=(node)
- do
- _n_exprs = node
- node.parent = self
- end
- redef fun n_annotations=(node)
- do
- _n_annotations = node
- if node != null then
- node.parent = self
- end
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_exprs)
- if _n_annotations != null then
- v.enter_visit(_n_annotations.as(not null))
- end
- end
-end
-redef class ASelfExpr
- private init empty_init do end
-
- init init_aselfexpr (
- n_kwself: nullable TKwself,
- n_annotations: nullable AAnnotations
- )
- do
- empty_init
- _n_kwself = n_kwself.as(not null)
- n_kwself.parent = self
- _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_kwself == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwself
- _n_kwself = new_child
- else
- abort
- 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 n_kwself=(node)
- do
- _n_kwself = node
- node.parent = self
- end
- redef fun n_annotations=(node)
- do
- _n_annotations = node
- if node != null then
- node.parent = self
- end
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_kwself)
- if _n_annotations != null then
- v.enter_visit(_n_annotations.as(not null))
- end
- end
-end
-redef class AImplicitSelfExpr
- private init empty_init do end
-
- init init_aimplicitselfexpr
- do
- empty_init
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- end
-
-
-
- redef fun visit_all(v: Visitor)
- do
- end
-end
-redef class ATrueExpr
- private init empty_init do end
-
- init init_atrueexpr (
- n_kwtrue: nullable TKwtrue,
- n_annotations: nullable AAnnotations
- )
- do
- empty_init
- _n_kwtrue = n_kwtrue.as(not null)
- n_kwtrue.parent = self
- _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_kwtrue == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwtrue
- _n_kwtrue = new_child
- else
- abort
- 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 n_kwtrue=(node)
- do
- _n_kwtrue = node
- node.parent = self
- end
- redef fun n_annotations=(node)
- do
- _n_annotations = node
- if node != null then
- node.parent = self
- end
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_kwtrue)
- if _n_annotations != null then
- v.enter_visit(_n_annotations.as(not null))
- end
- end
-end
-redef class AFalseExpr
- private init empty_init do end
-
- init init_afalseexpr (
- n_kwfalse: nullable TKwfalse,
- n_annotations: nullable AAnnotations
- )
- do
- empty_init
- _n_kwfalse = n_kwfalse.as(not null)
- n_kwfalse.parent = self
- _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_kwfalse == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwfalse
- _n_kwfalse = new_child
- else
- abort
- 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 n_kwfalse=(node)
- do
- _n_kwfalse = node
- node.parent = self
- end
- redef fun n_annotations=(node)
- do
- _n_annotations = node
- if node != null then
- node.parent = self
- end
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_kwfalse)
- if _n_annotations != null then
- v.enter_visit(_n_annotations.as(not null))
- end
- end
-end
-redef class ANullExpr
- private init empty_init do end
-
- init init_anullexpr (
- n_kwnull: nullable TKwnull,
- n_annotations: nullable AAnnotations
- )
- do
- empty_init
- _n_kwnull = n_kwnull.as(not null)
- n_kwnull.parent = self
- _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_kwnull == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwnull
- _n_kwnull = new_child
- else
- abort
- 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 n_kwnull=(node)
- do
- _n_kwnull = node
- node.parent = self
- end
- redef fun n_annotations=(node)
- do
- _n_annotations = node
- if node != null then
- node.parent = self
- end
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_kwnull)
- if _n_annotations != null then
- v.enter_visit(_n_annotations.as(not null))
- end
- end
-end
-redef class AIntExpr
- private init empty_init do end
-
- init init_aintexpr (
- n_number: nullable TNumber,
- n_annotations: nullable AAnnotations
- )
- do
- empty_init
- _n_number = n_number.as(not null)
- n_number.parent = self
- _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_number == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TNumber
- _n_number = new_child
- else
- abort
- 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 n_number=(node)
- do
- _n_number = node
- node.parent = self
- end
- redef fun n_annotations=(node)
- do
- _n_annotations = node
- if node != null then
- node.parent = self
- end
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_number)
- if _n_annotations != null then
- v.enter_visit(_n_annotations.as(not null))
- end
- end
-end
-redef class AFloatExpr
- private init empty_init do end
-
- init init_afloatexpr (
- n_float: nullable TFloat,
- n_annotations: nullable AAnnotations
- )
- do
- empty_init
- _n_float = n_float.as(not null)
- n_float.parent = self
- _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_float == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TFloat
- _n_float = new_child
- else
- abort
- 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 n_float=(node)
- do
- _n_float = node
- node.parent = self
- end
- redef fun n_annotations=(node)
- do
- _n_annotations = node
- if node != null then
- node.parent = self
- end
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_float)
- if _n_annotations != null then
- v.enter_visit(_n_annotations.as(not null))
- end
- end
-end
-redef class ACharExpr
- private init empty_init do end
-
- init init_acharexpr (
- n_char: nullable TChar,
- n_annotations: nullable AAnnotations
- )
- do
- empty_init
- _n_char = n_char.as(not null)
- n_char.parent = self
- _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_char == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TChar
- _n_char = new_child
- else
- abort
- 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 n_char=(node)
- do
- _n_char = node
- node.parent = self
- end
- redef fun n_annotations=(node)
- do
- _n_annotations = node
- if node != null then
- node.parent = self
- end
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_char)
- if _n_annotations != null then
- v.enter_visit(_n_annotations.as(not null))
- end
- end
-end
-redef class AStringExpr
- private init empty_init do end
-
- init init_astringexpr (
- n_string: nullable TString,
- n_annotations: nullable AAnnotations
- )
- do
- empty_init
- _n_string = n_string.as(not null)
- n_string.parent = self
- _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_string == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TString
- _n_string = new_child
- else
- abort
- 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 n_string=(node)
- do
- _n_string = node
- node.parent = self
- end
- redef fun n_annotations=(node)
- do
- _n_annotations = node
- if node != null then
- node.parent = self
- end
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_string)
- if _n_annotations != null then
- v.enter_visit(_n_annotations.as(not null))
- end
- end
-end
-redef class AStartStringExpr
- private init empty_init do end
-
- init init_astartstringexpr (
- n_string: nullable TStartString
- )
- do
- empty_init
- _n_string = n_string.as(not null)
- n_string.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_string == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TStartString
- _n_string = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun n_string=(node)
- do
- _n_string = node
- node.parent = self
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_string)
- end
-end
-redef class AMidStringExpr
- private init empty_init do end
-
- init init_amidstringexpr (
- n_string: nullable TMidString
- )
- do
- empty_init
- _n_string = n_string.as(not null)
- n_string.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_string == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TMidString
- _n_string = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun n_string=(node)
- do
- _n_string = node
- node.parent = self
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_string)
- end
-end
-redef class AEndStringExpr
- private init empty_init do end
-
- init init_aendstringexpr (
- n_string: nullable TEndString
- )
- do
- empty_init
- _n_string = n_string.as(not null)
- n_string.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_string == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TEndString
- _n_string = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun n_string=(node)
- do
- _n_string = node
- node.parent = self
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_string)
- end
-end
-redef class ASuperstringExpr
- private init empty_init do end
-
- init init_asuperstringexpr (
- n_exprs: Collection[Object], # Should be Collection[AExpr]
- n_annotations: nullable AAnnotations
- )
- do
- empty_init
- for n in n_exprs do
- assert n isa AExpr
- _n_exprs.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
- for i in [0.._n_exprs.length[ do
- if _n_exprs[i] == old_child then
- if new_child != null then
- assert new_child isa AExpr
- _n_exprs[i] = new_child
- new_child.parent = self
- else
- _n_exprs.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 n_annotations=(node)
- do
- _n_annotations = node
- if node != null then
- node.parent = self
- end
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- for n in _n_exprs do
- v.enter_visit(n)
- end
- if _n_annotations != null then
- v.enter_visit(_n_annotations.as(not null))
- end
- end
-end
-redef class AParExpr
- private init empty_init do end
-
- init init_aparexpr (
- n_opar: nullable TOpar,
- n_expr: nullable AExpr,
- n_cpar: nullable TCpar,
- n_annotations: nullable AAnnotations
- )
- do
- empty_init
- _n_opar = n_opar.as(not null)
- n_opar.parent = self
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_cpar = n_cpar.as(not null)
- n_cpar.parent = self
- _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_opar == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TOpar
- _n_opar = 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_cpar == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TCpar
- _n_cpar = new_child
- else
- abort
- 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 n_opar=(node)
- do
- _n_opar = node
- node.parent = self
- end
- redef fun n_expr=(node)
- do
- _n_expr = node
- node.parent = self
- end
- redef fun n_cpar=(node)
- do
- _n_cpar = node
- node.parent = self
- end
- redef fun n_annotations=(node)
- do
- _n_annotations = node
- if node != null then
- node.parent = self
- end
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_opar)
- v.enter_visit(_n_expr)
- v.enter_visit(_n_cpar)
- if _n_annotations != null then
- v.enter_visit(_n_annotations.as(not null))
- end
- end
-end
-redef class AAsCastExpr
- private init empty_init do end
-
- init init_aascastexpr (
- n_expr: nullable AExpr,
- n_kwas: nullable TKwas,
- n_opar: nullable TOpar,
- n_type: nullable AType,
- n_cpar: nullable TCpar
- )
- do
- empty_init
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_kwas = n_kwas.as(not null)
- n_kwas.parent = self
- _n_opar = n_opar.as(not null)
- n_opar.parent = self
- _n_type = n_type.as(not null)
- n_type.parent = self
- _n_cpar = n_cpar.as(not null)
- n_cpar.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_kwas == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwas
- _n_kwas = new_child
- else
- abort
- end
- return
- end
- 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
- 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
- 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
- abort
- end
- return
- end
- end
-
- redef fun n_expr=(node)
- do
- _n_expr = node
- node.parent = self
- end
- redef fun n_kwas=(node)
- do
- _n_kwas = node
- node.parent = self
- end
- redef fun n_opar=(node)
- do
- _n_opar = node
- node.parent = self
- end
- redef fun n_type=(node)
- do
- _n_type = node
- node.parent = self
- end
- redef fun n_cpar=(node)
- do
- _n_cpar = node
- node.parent = self
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_expr)
- v.enter_visit(_n_kwas)
- v.enter_visit(_n_opar)
- v.enter_visit(_n_type)
- v.enter_visit(_n_cpar)
- end
-end
-redef class AAsNotnullExpr
- private init empty_init do end
-
- init init_aasnotnullexpr (
- n_expr: nullable AExpr,
- n_kwas: nullable TKwas,
- n_opar: nullable TOpar,
- n_kwnot: nullable TKwnot,
- n_kwnull: nullable TKwnull,
- n_cpar: nullable TCpar
- )
- do
- empty_init
- _n_expr = n_expr.as(not null)
- n_expr.parent = self
- _n_kwas = n_kwas.as(not null)
- n_kwas.parent = self
- _n_opar = n_opar.as(not null)
- n_opar.parent = self
- _n_kwnot = n_kwnot.as(not null)
- n_kwnot.parent = self
- _n_kwnull = n_kwnull.as(not null)
- n_kwnull.parent = self
- _n_cpar = n_cpar.as(not null)
- n_cpar.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_kwas == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwas
- _n_kwas = new_child
- else
- abort
- end
- return
- end
- 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
- abort
- end
- return
- end
- 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_kwnull == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwnull
- _n_kwnull = new_child
- else
- abort
- end
- return
- 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
- abort
- end
- return
- end
- end
-
- redef fun n_expr=(node)
- do
- _n_expr = node
- node.parent = self
- end
- redef fun n_kwas=(node)
- do
- _n_kwas = node
- node.parent = self
- end
- redef fun n_opar=(node)
- do
- _n_opar = node
- node.parent = self
- end
- redef fun n_kwnot=(node)
- do
- _n_kwnot = node
- node.parent = self
- end
- redef fun n_kwnull=(node)
- do
- _n_kwnull = node
- node.parent = self
- end
- redef fun n_cpar=(node)
- do
- _n_cpar = node
- node.parent = self
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_expr)
- v.enter_visit(_n_kwas)
- v.enter_visit(_n_opar)
- v.enter_visit(_n_kwnot)
- v.enter_visit(_n_kwnull)
- v.enter_visit(_n_cpar)
- end
-end
-redef class AIssetAttrExpr
- private init empty_init do end
-
- init init_aissetattrexpr (
- n_kwisset: nullable TKwisset,
- n_expr: nullable AExpr,
- n_id: nullable TAttrid
- )
- do
- empty_init
- _n_kwisset = n_kwisset.as(not null)
- n_kwisset.parent = self
- _n_expr = n_expr.as(not null)
- n_expr.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_kwisset == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwisset
- _n_kwisset = 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_id == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TAttrid
- _n_id = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun n_kwisset=(node)
- do
- _n_kwisset = node
- node.parent = self
- end
- redef fun n_expr=(node)
- do
- _n_expr = node
- node.parent = self
- end
- redef fun n_id=(node)
- do
- _n_id = node
- node.parent = self
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_kwisset)
- v.enter_visit(_n_expr)
- v.enter_visit(_n_id)
- end
-end
-redef class ADebugTypeExpr
- private init empty_init do end
-
- init init_adebugtypeexpr (
- n_kwdebug: nullable TKwdebug,
- n_kwtype: nullable TKwtype,
- n_expr: nullable AExpr,
- n_type: nullable AType
- )
- do
- empty_init
- _n_kwdebug = n_kwdebug.as(not null)
- n_kwdebug.parent = self
- _n_kwtype = n_kwtype.as(not null)
- n_kwtype.parent = self
- _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_kwdebug == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwdebug
- _n_kwdebug = new_child
- else
- abort
- end
- return
- end
- if _n_kwtype == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwtype
- _n_kwtype = 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_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 n_kwdebug=(node)
- do
- _n_kwdebug = node
- node.parent = self
- end
- redef fun n_kwtype=(node)
- do
- _n_kwtype = node
- node.parent = self
- end
- redef fun n_expr=(node)
- do
- _n_expr = node
- node.parent = self
- end
- redef fun n_type=(node)
- do
- _n_type = node
- node.parent = self
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_kwdebug)
- v.enter_visit(_n_kwtype)
- v.enter_visit(_n_expr)
- v.enter_visit(_n_type)
- end
-end
-redef class AListExprs
- private init empty_init do end
-
- init init_alistexprs (
- n_exprs: Collection[Object] # Should be Collection[AExpr]
- )
- do
- empty_init
- for n in n_exprs do
- assert n isa AExpr
- _n_exprs.add(n)
- n.parent = self
- end
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- for i in [0.._n_exprs.length[ do
- if _n_exprs[i] == old_child then
- if new_child != null then
- assert new_child isa AExpr
- _n_exprs[i] = new_child
- new_child.parent = self
- else
- _n_exprs.remove_at(i)
- end
- return
- end
- end
- end
-
-
-
- redef fun visit_all(v: Visitor)
- do
- for n in _n_exprs do
- v.enter_visit(n)
- end
- end
-end
-redef class AParExprs
- private init empty_init do end
-
- init init_aparexprs (
- n_opar: nullable TOpar,
- n_exprs: Collection[Object], # Should be Collection[AExpr]
- n_cpar: nullable TCpar
- )
- do
- empty_init
- _n_opar = n_opar.as(not null)
- n_opar.parent = self
- for n in n_exprs do
- assert n isa AExpr
- _n_exprs.add(n)
- n.parent = self
- end
- _n_cpar = n_cpar.as(not null)
- n_cpar.parent = self
- 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
- abort
- end
- return
- end
- for i in [0.._n_exprs.length[ do
- if _n_exprs[i] == old_child then
- if new_child != null then
- assert new_child isa AExpr
- _n_exprs[i] = new_child
- new_child.parent = self
- else
- _n_exprs.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
- abort
- end
- return
- end
- end
-
- redef fun n_opar=(node)
- do
- _n_opar = node
- node.parent = self
- end
- redef fun n_cpar=(node)
- do
- _n_cpar = node
- node.parent = self
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_opar)
- for n in _n_exprs do
- v.enter_visit(n)
- end
- v.enter_visit(_n_cpar)
- end
-end
-redef class ABraExprs
- private init empty_init do end
-
- init init_abraexprs (
- n_obra: nullable TObra,
- n_exprs: Collection[Object], # Should be Collection[AExpr]
- n_cbra: nullable TCbra
- )
- do
- empty_init
- _n_obra = n_obra.as(not null)
- n_obra.parent = self
- for n in n_exprs do
- assert n isa AExpr
- _n_exprs.add(n)
- n.parent = self
- end
- _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
- for i in [0.._n_exprs.length[ do
- if _n_exprs[i] == old_child then
- if new_child != null then
- assert new_child isa AExpr
- _n_exprs[i] = new_child
- new_child.parent = self
- else
- _n_exprs.remove_at(i)
- end
- return
- end
- 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 n_obra=(node)
- do
- _n_obra = node
- node.parent = self
- end
- redef fun n_cbra=(node)
- do
- _n_cbra = node
- node.parent = self
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_obra)
- for n in _n_exprs do
- v.enter_visit(n)
- end
- v.enter_visit(_n_cbra)
- end
-end
-redef class APlusAssignOp
- private init empty_init do end
-
- init init_aplusassignop (
- n_pluseq: nullable TPluseq
- )
- do
- empty_init
- _n_pluseq = n_pluseq.as(not null)
- n_pluseq.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_pluseq == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TPluseq
- _n_pluseq = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun n_pluseq=(node)
- do
- _n_pluseq = node
- node.parent = self
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_pluseq)
- end
-end
-redef class AMinusAssignOp
- private init empty_init do end
-
- init init_aminusassignop (
- n_minuseq: nullable TMinuseq
- )
- do
- empty_init
- _n_minuseq = n_minuseq.as(not null)
- n_minuseq.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_minuseq == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TMinuseq
- _n_minuseq = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun n_minuseq=(node)
- do
- _n_minuseq = node
- node.parent = self
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_minuseq)
- end
-end
-redef class AClosureDef
- private init empty_init do end
-
- init init_aclosuredef (
- n_bang: nullable TBang,
- n_id: nullable AClosureId,
- n_ids: Collection[Object], # Should be Collection[TId]
- n_kwdo: nullable TKwdo,
- n_expr: nullable AExpr,
- n_label: nullable ALabel
- )
- do
- empty_init
- _n_bang = n_bang.as(not null)
- n_bang.parent = self
- _n_id = n_id.as(not null)
- n_id.parent = self
- for n in n_ids do
- assert n isa TId
- _n_ids.add(n)
- n.parent = self
- end
- _n_kwdo = n_kwdo
- if n_kwdo != null then
- n_kwdo.parent = self
- end
- _n_expr = n_expr
- if n_expr != null then
- n_expr.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_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 AClosureId
- _n_id = 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_kwdo == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwdo
- _n_kwdo = new_child
- else
- _n_kwdo = 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_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 n_bang=(node)
- do
- _n_bang = node
- node.parent = self
- end
- redef fun n_id=(node)
- do
- _n_id = node
- node.parent = self
- end
- redef fun n_kwdo=(node)
- do
- _n_kwdo = node
- if node != null then
- node.parent = self
- end
- end
- redef fun n_expr=(node)
- do
- _n_expr = node
- if node != null then
- node.parent = self
- end
- end
- redef fun n_label=(node)
- do
- _n_label = node
- if node != null then
- node.parent = self
- end
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_bang)
- v.enter_visit(_n_id)
- for n in _n_ids do
- v.enter_visit(n)
- end
- if _n_kwdo != null then
- v.enter_visit(_n_kwdo.as(not null))
- end
- if _n_expr != null then
- v.enter_visit(_n_expr.as(not null))
- end
- if _n_label != null then
- v.enter_visit(_n_label.as(not null))
- end
- end
-end
-redef class ASimpleClosureId
- private init empty_init do end
-
- init init_asimpleclosureid (
- n_id: nullable TId
- )
- do
- empty_init
- _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_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 n_id=(node)
- do
- _n_id = node
- node.parent = self
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_id)
- end
-end
-redef class ABreakClosureId
- private init empty_init do end
-
- init init_abreakclosureid (
- n_kwbreak: nullable TKwbreak
- )
- do
- empty_init
- _n_kwbreak = n_kwbreak.as(not null)
- n_kwbreak.parent = self
- 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
- end
-
- redef fun n_kwbreak=(node)
- do
- _n_kwbreak = node
- node.parent = self
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_kwbreak)
- end
-end
-redef class AModuleName
- private init empty_init do end
-
- init init_amodulename (
- n_quad: nullable TQuad,
- n_path: Collection[Object], # Should be Collection[TId]
- n_id: nullable TId
- )
- do
- empty_init
- _n_quad = n_quad
- if n_quad != null then
- n_quad.parent = self
- end
- for n in n_path do
- assert n isa TId
- _n_path.add(n)
- n.parent = self
- end
- _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_quad == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TQuad
- _n_quad = new_child
- else
- _n_quad = null
- end
- return
- end
- for i in [0.._n_path.length[ do
- if _n_path[i] == old_child then
- if new_child != null then
- assert new_child isa TId
- _n_path[i] = new_child
- new_child.parent = self
- else
- _n_path.remove_at(i)
- end
- return
- end
- 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 n_quad=(node)
- do
- _n_quad = node
- if node != null then
- node.parent = self
- end
- end
- redef fun n_id=(node)
- do
- _n_id = node
- node.parent = self
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- if _n_quad != null then
- v.enter_visit(_n_quad.as(not null))
- end
- for n in _n_path do
- v.enter_visit(n)
- end
- v.enter_visit(_n_id)
- end
-end
-redef class AExternCalls
- private init empty_init do end
-
- init init_aexterncalls (
- n_kwimport: nullable TKwimport,
- n_extern_calls: Collection[Object] # Should be Collection[AExternCall]
- )
- do
- empty_init
- _n_kwimport = n_kwimport.as(not null)
- n_kwimport.parent = self
- for n in n_extern_calls do
- assert n isa AExternCall
- _n_extern_calls.add(n)
- n.parent = self
- end
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_kwimport == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwimport
- _n_kwimport = new_child
- else
- abort
- end
- return
- end
- for i in [0.._n_extern_calls.length[ do
- if _n_extern_calls[i] == old_child then
- if new_child != null then
- assert new_child isa AExternCall
- _n_extern_calls[i] = new_child
- new_child.parent = self
- else
- _n_extern_calls.remove_at(i)
- end
- return
- end
- end
- end
-
- redef fun n_kwimport=(node)
- do
- _n_kwimport = node
- node.parent = self
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_kwimport)
- for n in _n_extern_calls do
- v.enter_visit(n)
- end
- end
-end
-redef class AExternCall
- private init empty_init do end
-
- init init_aexterncall
- do
- empty_init
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- end
-
-
-
- redef fun visit_all(v: Visitor)
- do
- end
-end
-redef class ASuperExternCall
- private init empty_init do end
-
- init init_asuperexterncall (
- n_kwsuper: nullable TKwsuper
- )
- do
- empty_init
- _n_kwsuper = n_kwsuper.as(not null)
- n_kwsuper.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_kwsuper == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwsuper
- _n_kwsuper = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun n_kwsuper=(node)
- do
- _n_kwsuper = node
- node.parent = self
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_kwsuper)
- end
-end
-redef class ALocalPropExternCall
- private init empty_init do end
-
- init init_alocalpropexterncall (
- n_methid: nullable AMethid
- )
- do
- empty_init
- _n_methid = n_methid.as(not null)
- n_methid.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_methid == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AMethid
- _n_methid = new_child
- else
- abort
- end
- return
- end
- end
-
- redef fun n_methid=(node)
- do
- _n_methid = node
- node.parent = self
- end
-
-
- redef fun visit_all(v: Visitor)
- do
- v.enter_visit(_n_methid)
- end
-end
-redef class AFullPropExternCall
- private init empty_init do end
-
- init init_afullpropexterncall (
- n_classid: nullable TClassid,
- n_quad: nullable TQuad,
- n_methid: nullable AMethid
- )
- do
- empty_init
- _n_classid = n_classid.as(not null)
- n_classid.parent = self
- _n_quad = n_quad
- if n_quad != null then
- n_quad.parent = self
- end
- _n_methid = n_methid.as(not null)
- n_methid.parent = self
- end
-
- redef fun replace_child(old_child: ANode, new_child: nullable ANode)
- do
- if _n_classid == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TClassid
- _n_classid = new_child
- else
- abort
- end
- return
- end
- if _n_quad == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TQuad
- _n_quad = new_child
- else
- _n_quad = null
- end
- return
- end
- if _n_methid == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa AMethid
- _n_methid = new_child
- else
- abort
- end
- return