n_visibility: nullable AVisibility,
n_classkind: nullable AClasskind,
n_id: nullable TClassid,
+ n_obra: nullable TObra,
n_formaldefs: Collection[Object], # Should be Collection[AFormaldef]
+ n_cbra: nullable TCbra,
n_extern_code_block: nullable AExternCodeBlock,
n_propdefs: Collection[Object], # Should be Collection[APropdef]
n_kwend: nullable TKwend
n_classkind.parent = self
_n_id = n_id
if n_id != null then n_id.parent = self
+ _n_obra = n_obra
+ if n_obra != null then n_obra.parent = self
self.n_formaldefs.unsafe_add_all(n_formaldefs)
+ _n_cbra = n_cbra
+ if n_cbra != null then n_cbra.parent = self
_n_extern_code_block = n_extern_code_block
if n_extern_code_block != null then n_extern_code_block.parent = self
self.n_propdefs.unsafe_add_all(n_propdefs)
n_id = new_child.as(nullable TClassid)
return
end
+ if _n_obra == old_child then
+ n_obra = new_child.as(nullable TObra)
+ return
+ end
if n_formaldefs.replace_child(old_child, new_child) then return
+ if _n_cbra == old_child then
+ n_cbra = new_child.as(nullable TCbra)
+ return
+ end
if _n_extern_code_block == old_child then
n_extern_code_block = new_child.as(nullable AExternCodeBlock)
return
_n_id = node
if node != null then node.parent = self
end
+ redef fun n_obra=(node)
+ do
+ _n_obra = node
+ if node != null then node.parent = self
+ end
+ redef fun n_cbra=(node)
+ do
+ _n_cbra = node
+ if node != null then node.parent = self
+ end
redef fun n_extern_code_block=(node)
do
_n_extern_code_block = node
v.enter_visit(_n_visibility)
v.enter_visit(_n_classkind)
v.enter_visit(_n_id)
+ v.enter_visit(_n_obra)
n_formaldefs.visit_all(v)
+ v.enter_visit(_n_cbra)
v.enter_visit(_n_extern_code_block)
n_propdefs.visit_all(v)
v.enter_visit(_n_kwend)
n_kwvar: nullable TKwvar,
n_id2: nullable TId,
n_type: nullable AType,
+ n_assign: nullable TAssign,
n_expr: nullable AExpr,
n_annotations: nullable AAnnotations,
- n_block: nullable AExpr
+ n_kwdo: nullable TKwdo,
+ n_block: nullable AExpr,
+ n_kwend: nullable TKwend
)
do
_n_doc = n_doc
n_id2.parent = self
_n_type = n_type
if n_type != null then n_type.parent = self
+ _n_assign = n_assign
+ if n_assign != null then n_assign.parent = self
_n_expr = n_expr
if n_expr != null then n_expr.parent = self
_n_annotations = n_annotations
if n_annotations != null then n_annotations.parent = self
+ _n_kwdo = n_kwdo
+ if n_kwdo != null then n_kwdo.parent = self
_n_block = n_block
if n_block != null then n_block.parent = self
+ _n_kwend = n_kwend
+ if n_kwend != null then n_kwend.parent = self
end
redef fun replace_child(old_child: ANode, new_child: nullable ANode)
n_type = new_child.as(nullable AType)
return
end
+ if _n_assign == old_child then
+ n_assign = new_child.as(nullable TAssign)
+ return
+ end
if _n_expr == old_child then
n_expr = new_child.as(nullable AExpr)
return
n_annotations = new_child.as(nullable AAnnotations)
return
end
+ if _n_kwdo == old_child then
+ n_kwdo = new_child.as(nullable TKwdo)
+ return
+ end
if _n_block == old_child then
n_block = new_child.as(nullable AExpr)
return
end
+ if _n_kwend == old_child then
+ n_kwend = new_child.as(nullable TKwend)
+ return
+ end
end
redef fun n_doc=(node)
_n_type = node
if node != null then node.parent = self
end
+ redef fun n_assign=(node)
+ do
+ _n_assign = node
+ if node != null then node.parent = self
+ end
redef fun n_expr=(node)
do
_n_expr = node
_n_annotations = node
if node != null then node.parent = self
end
+ redef fun n_kwdo=(node)
+ do
+ _n_kwdo = node
+ if node != null then node.parent = self
+ end
redef fun n_block=(node)
do
_n_block = node
if node != null then node.parent = self
end
+ redef fun n_kwend=(node)
+ do
+ _n_kwend = node
+ if node != null then node.parent = self
+ end
redef fun visit_all(v: Visitor)
v.enter_visit(_n_kwvar)
v.enter_visit(_n_id2)
v.enter_visit(_n_type)
+ v.enter_visit(_n_assign)
v.enter_visit(_n_expr)
v.enter_visit(_n_annotations)
+ v.enter_visit(_n_kwdo)
v.enter_visit(_n_block)
+ v.enter_visit(_n_kwend)
end
end
redef class AMainMethPropdef
n_annotations: nullable AAnnotations,
n_extern_calls: nullable AExternCalls,
n_extern_code_block: nullable AExternCodeBlock,
- n_block: nullable AExpr
+ n_kwdo: nullable TKwdo,
+ n_block: nullable AExpr,
+ n_kwend: nullable TKwend
)
do
_n_doc = n_doc
if n_extern_calls != null then n_extern_calls.parent = self
_n_extern_code_block = n_extern_code_block
if n_extern_code_block != null then n_extern_code_block.parent = self
+ _n_kwdo = n_kwdo
+ if n_kwdo != null then n_kwdo.parent = self
_n_block = n_block
if n_block != null then n_block.parent = self
+ _n_kwend = n_kwend
+ if n_kwend != null then n_kwend.parent = self
end
redef fun replace_child(old_child: ANode, new_child: nullable ANode)
n_extern_code_block = new_child.as(nullable AExternCodeBlock)
return
end
+ if _n_kwdo == old_child then
+ n_kwdo = new_child.as(nullable TKwdo)
+ return
+ end
if _n_block == old_child then
n_block = new_child.as(nullable AExpr)
return
end
+ if _n_kwend == old_child then
+ n_kwend = new_child.as(nullable TKwend)
+ return
+ end
end
redef fun n_doc=(node)
_n_extern_code_block = node
if node != null then node.parent = self
end
+ redef fun n_kwdo=(node)
+ do
+ _n_kwdo = node
+ if node != null then node.parent = self
+ end
redef fun n_block=(node)
do
_n_block = node
if node != null then node.parent = self
end
+ redef fun n_kwend=(node)
+ do
+ _n_kwend = node
+ if node != null then node.parent = self
+ end
redef fun visit_all(v: Visitor)
v.enter_visit(_n_annotations)
v.enter_visit(_n_extern_calls)
v.enter_visit(_n_extern_code_block)
+ v.enter_visit(_n_kwdo)
v.enter_visit(_n_block)
+ v.enter_visit(_n_kwend)
end
end
redef class ASuperPropdef
init init_atype (
n_kwnullable: nullable TKwnullable,
n_id: nullable TClassid,
+ n_obra: nullable TObra,
n_types: Collection[Object], # Should be Collection[AType]
+ n_cbra: nullable TCbra,
n_annotations: nullable AAnnotations
)
do
if n_kwnullable != null then n_kwnullable.parent = self
_n_id = n_id.as(not null)
n_id.parent = self
+ _n_obra = n_obra
+ if n_obra != null then n_obra.parent = self
self.n_types.unsafe_add_all(n_types)
+ _n_cbra = n_cbra
+ if n_cbra != null then n_cbra.parent = self
_n_annotations = n_annotations
if n_annotations != null then n_annotations.parent = self
end
n_id = new_child.as(TClassid)
return
end
+ if _n_obra == old_child then
+ n_obra = new_child.as(nullable TObra)
+ return
+ end
if n_types.replace_child(old_child, new_child) then return
+ if _n_cbra == old_child then
+ n_cbra = new_child.as(nullable TCbra)
+ return
+ end
if _n_annotations == old_child then
n_annotations = new_child.as(nullable AAnnotations)
return
_n_id = node
node.parent = self
end
+ redef fun n_obra=(node)
+ do
+ _n_obra = node
+ if node != null then node.parent = self
+ end
+ redef fun n_cbra=(node)
+ do
+ _n_cbra = node
+ if node != null then node.parent = self
+ end
redef fun n_annotations=(node)
do
_n_annotations = node
do
v.enter_visit(_n_kwnullable)
v.enter_visit(_n_id)
+ v.enter_visit(_n_obra)
n_types.visit_all(v)
+ v.enter_visit(_n_cbra)
v.enter_visit(_n_annotations)
end
end
init init_aifexpr (
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
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
if n_then != null then n_then.parent = self
+ _n_kwelse = n_kwelse
+ if n_kwelse != null then n_kwelse.parent = self
_n_else = n_else
if n_else != null then n_else.parent = self
end
n_expr = new_child.as(AExpr)
return
end
+ if _n_kwthen == old_child then
+ n_kwthen = new_child.as(TKwthen)
+ return
+ end
if _n_then == old_child then
n_then = new_child.as(nullable AExpr)
return
end
+ if _n_kwelse == old_child then
+ n_kwelse = new_child.as(nullable TKwelse)
+ return
+ end
if _n_else == old_child then
n_else = new_child.as(nullable AExpr)
return
_n_expr = node
node.parent = self
end
+ redef fun n_kwthen=(node)
+ do
+ _n_kwthen = node
+ node.parent = self
+ end
redef fun n_then=(node)
do
_n_then = node
if node != null then node.parent = self
end
+ redef fun n_kwelse=(node)
+ do
+ _n_kwelse = node
+ if node != null then node.parent = self
+ end
redef fun n_else=(node)
do
_n_else = node
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
init init_aforexpr (
n_kwfor: nullable TKwfor,
n_ids: Collection[Object], # Should be Collection[TId]
+ n_kwin: nullable TKwin,
n_expr: nullable AExpr,
n_kwdo: nullable TKwdo,
n_block: nullable AExpr,
_n_kwfor = n_kwfor.as(not null)
n_kwfor.parent = self
self.n_ids.unsafe_add_all(n_ids)
+ _n_kwin = n_kwin.as(not null)
+ n_kwin.parent = self
_n_expr = n_expr.as(not null)
n_expr.parent = self
_n_kwdo = n_kwdo.as(not null)
return
end
if n_ids.replace_child(old_child, new_child) then return
+ if _n_kwin == old_child then
+ n_kwin = new_child.as(TKwin)
+ return
+ end
if _n_expr == old_child then
n_expr = new_child.as(AExpr)
return
_n_kwfor = node
node.parent = self
end
+ redef fun n_kwin=(node)
+ do
+ _n_kwin = node
+ node.parent = self
+ end
redef fun n_expr=(node)
do
_n_expr = node
do
v.enter_visit(_n_kwfor)
n_ids.visit_all(v)
+ v.enter_visit(_n_kwin)
v.enter_visit(_n_expr)
v.enter_visit(_n_kwdo)
v.enter_visit(_n_block)
n_kwassert: nullable TKwassert,
n_id: nullable TId,
n_expr: nullable AExpr,
+ n_kwelse: nullable TKwelse,
n_else: nullable AExpr
)
do
if n_id != null then n_id.parent = self
_n_expr = n_expr.as(not null)
n_expr.parent = self
+ _n_kwelse = n_kwelse
+ if n_kwelse != null then n_kwelse.parent = self
_n_else = n_else
if n_else != null then n_else.parent = self
end
n_expr = new_child.as(AExpr)
return
end
+ if _n_kwelse == old_child then
+ n_kwelse = new_child.as(nullable TKwelse)
+ return
+ end
if _n_else == old_child then
n_else = new_child.as(nullable AExpr)
return
_n_expr = node
node.parent = self
end
+ redef fun n_kwelse=(node)
+ do
+ _n_kwelse = node
+ if node != null then node.parent = self
+ end
redef fun n_else=(node)
do
_n_else = node
v.enter_visit(_n_kwassert)
v.enter_visit(_n_id)
v.enter_visit(_n_expr)
+ v.enter_visit(_n_kwelse)
v.enter_visit(_n_else)
end
end
init init_acrangeexpr (
n_obra: nullable TObra,
n_expr: nullable AExpr,
+ n_dotdot: nullable TDotdot,
n_expr2: nullable AExpr,
n_cbra: nullable TCbra,
n_annotations: nullable AAnnotations
n_obra.parent = self
_n_expr = n_expr.as(not null)
n_expr.parent = self
+ _n_dotdot = n_dotdot.as(not null)
+ n_dotdot.parent = self
_n_expr2 = n_expr2.as(not null)
n_expr2.parent = self
_n_cbra = n_cbra.as(not null)
n_expr = new_child.as(AExpr)
return
end
+ if _n_dotdot == old_child then
+ n_dotdot = new_child.as(TDotdot)
+ return
+ end
if _n_expr2 == old_child then
n_expr2 = new_child.as(AExpr)
return
_n_expr = node
node.parent = self
end
+ redef fun n_dotdot=(node)
+ do
+ _n_dotdot = node
+ node.parent = self
+ end
redef fun n_expr2=(node)
do
_n_expr2 = node
do
v.enter_visit(_n_obra)
v.enter_visit(_n_expr)
+ v.enter_visit(_n_dotdot)
v.enter_visit(_n_expr2)
v.enter_visit(_n_cbra)
v.enter_visit(_n_annotations)
init init_aorangeexpr (
n_obra: nullable TObra,
n_expr: nullable AExpr,
+ n_dotdot: nullable TDotdot,
n_expr2: nullable AExpr,
n_cbra: nullable TObra,
n_annotations: nullable AAnnotations
n_obra.parent = self
_n_expr = n_expr.as(not null)
n_expr.parent = self
+ _n_dotdot = n_dotdot.as(not null)
+ n_dotdot.parent = self
_n_expr2 = n_expr2.as(not null)
n_expr2.parent = self
_n_cbra = n_cbra.as(not null)
n_expr = new_child.as(AExpr)
return
end
+ if _n_dotdot == old_child then
+ n_dotdot = new_child.as(TDotdot)
+ return
+ end
if _n_expr2 == old_child then
n_expr2 = new_child.as(AExpr)
return
_n_expr = node
node.parent = self
end
+ redef fun n_dotdot=(node)
+ do
+ _n_dotdot = node
+ node.parent = self
+ end
redef fun n_expr2=(node)
do
_n_expr2 = node
do
v.enter_visit(_n_obra)
v.enter_visit(_n_expr)
+ v.enter_visit(_n_dotdot)
v.enter_visit(_n_expr2)
v.enter_visit(_n_cbra)
v.enter_visit(_n_annotations)
v.enter_visit(_n_annotations)
end
end
+redef class ABinIntExpr
+ init init_abinintexpr (
+ n_bin_number: nullable TBinNumber,
+ n_annotations: nullable AAnnotations
+ )
+ do
+ _n_bin_number = n_bin_number.as(not null)
+ n_bin_number.parent = self
+ _n_annotations = n_annotations
+ if n_annotations != null then n_annotations.parent = self
+ end
+
+ redef fun replace_child(old_child: ANode, new_child: nullable ANode)
+ do
+ if _n_bin_number == old_child then
+ n_bin_number = new_child.as(TBinNumber)
+ return
+ end
+ if _n_annotations == old_child then
+ n_annotations = new_child.as(nullable AAnnotations)
+ return
+ end
+ end
+
+ redef fun n_bin_number=(node)
+ do
+ _n_bin_number = node
+ node.parent = self
+ end
+ redef fun n_annotations=(node)
+ do
+ _n_annotations = node
+ if node != null then node.parent = self
+ end
+
+
+ redef fun visit_all(v: Visitor)
+ do
+ v.enter_visit(_n_bin_number)
+ v.enter_visit(_n_annotations)
+ end
+end
+redef class AOctIntExpr
+ init init_aoctintexpr (
+ n_oct_number: nullable TOctNumber,
+ n_annotations: nullable AAnnotations
+ )
+ do
+ _n_oct_number = n_oct_number.as(not null)
+ n_oct_number.parent = self
+ _n_annotations = n_annotations
+ if n_annotations != null then n_annotations.parent = self
+ end
+
+ redef fun replace_child(old_child: ANode, new_child: nullable ANode)
+ do
+ if _n_oct_number == old_child then
+ n_oct_number = new_child.as(TOctNumber)
+ return
+ end
+ if _n_annotations == old_child then
+ n_annotations = new_child.as(nullable AAnnotations)
+ return
+ end
+ end
+
+ redef fun n_oct_number=(node)
+ do
+ _n_oct_number = node
+ node.parent = self
+ end
+ redef fun n_annotations=(node)
+ do
+ _n_annotations = node
+ if node != null then node.parent = self
+ end
+
+
+ redef fun visit_all(v: Visitor)
+ do
+ v.enter_visit(_n_oct_number)
+ v.enter_visit(_n_annotations)
+ end
+end
+redef class ADecByteExpr
+ init init_adecbyteexpr (
+ n_bytenum: nullable TBytenum,
+ n_annotations: nullable AAnnotations
+ )
+ do
+ _n_bytenum = n_bytenum.as(not null)
+ n_bytenum.parent = self
+ _n_annotations = n_annotations
+ if n_annotations != null then n_annotations.parent = self
+ end
+
+ redef fun replace_child(old_child: ANode, new_child: nullable ANode)
+ do
+ if _n_bytenum == old_child then
+ n_bytenum = new_child.as(TBytenum)
+ return
+ end
+ if _n_annotations == old_child then
+ n_annotations = new_child.as(nullable AAnnotations)
+ return
+ end
+ end
+
+ redef fun n_bytenum=(node)
+ do
+ _n_bytenum = node
+ node.parent = self
+ end
+ redef fun n_annotations=(node)
+ do
+ _n_annotations = node
+ if node != null then node.parent = self
+ end
+
+
+ redef fun visit_all(v: Visitor)
+ do
+ v.enter_visit(_n_bytenum)
+ v.enter_visit(_n_annotations)
+ end
+end
+redef class AHexByteExpr
+ init init_ahexbyteexpr (
+ n_hex_bytenum: nullable THexBytenum,
+ n_annotations: nullable AAnnotations
+ )
+ do
+ _n_hex_bytenum = n_hex_bytenum.as(not null)
+ n_hex_bytenum.parent = self
+ _n_annotations = n_annotations
+ if n_annotations != null then n_annotations.parent = self
+ end
+
+ redef fun replace_child(old_child: ANode, new_child: nullable ANode)
+ do
+ if _n_hex_bytenum == old_child then
+ n_hex_bytenum = new_child.as(THexBytenum)
+ return
+ end
+ if _n_annotations == old_child then
+ n_annotations = new_child.as(nullable AAnnotations)
+ return
+ end
+ end
+
+ redef fun n_hex_bytenum=(node)
+ do
+ _n_hex_bytenum = node
+ node.parent = self
+ end
+ redef fun n_annotations=(node)
+ do
+ _n_annotations = node
+ if node != null then node.parent = self
+ end
+
+
+ redef fun visit_all(v: Visitor)
+ do
+ v.enter_visit(_n_hex_bytenum)
+ v.enter_visit(_n_annotations)
+ end
+end
+redef class ABinByteExpr
+ init init_abinbyteexpr (
+ n_bin_bytenum: nullable TBinBytenum,
+ n_annotations: nullable AAnnotations
+ )
+ do
+ _n_bin_bytenum = n_bin_bytenum.as(not null)
+ n_bin_bytenum.parent = self
+ _n_annotations = n_annotations
+ if n_annotations != null then n_annotations.parent = self
+ end
+
+ redef fun replace_child(old_child: ANode, new_child: nullable ANode)
+ do
+ if _n_bin_bytenum == old_child then
+ n_bin_bytenum = new_child.as(TBinBytenum)
+ return
+ end
+ if _n_annotations == old_child then
+ n_annotations = new_child.as(nullable AAnnotations)
+ return
+ end
+ end
+
+ redef fun n_bin_bytenum=(node)
+ do
+ _n_bin_bytenum = node
+ node.parent = self
+ end
+ redef fun n_annotations=(node)
+ do
+ _n_annotations = node
+ if node != null then node.parent = self
+ end
+
+
+ redef fun visit_all(v: Visitor)
+ do
+ v.enter_visit(_n_bin_bytenum)
+ v.enter_visit(_n_annotations)
+ end
+end
+redef class AOctByteExpr
+ init init_aoctbyteexpr (
+ n_oct_bytenum: nullable TOctBytenum,
+ n_annotations: nullable AAnnotations
+ )
+ do
+ _n_oct_bytenum = n_oct_bytenum.as(not null)
+ n_oct_bytenum.parent = self
+ _n_annotations = n_annotations
+ if n_annotations != null then n_annotations.parent = self
+ end
+
+ redef fun replace_child(old_child: ANode, new_child: nullable ANode)
+ do
+ if _n_oct_bytenum == old_child then
+ n_oct_bytenum = new_child.as(TOctBytenum)
+ return
+ end
+ if _n_annotations == old_child then
+ n_annotations = new_child.as(nullable AAnnotations)
+ return
+ end
+ end
+
+ redef fun n_oct_bytenum=(node)
+ do
+ _n_oct_bytenum = node
+ node.parent = self
+ end
+ redef fun n_annotations=(node)
+ do
+ _n_annotations = node
+ if node != null then node.parent = self
+ end
+
+
+ redef fun visit_all(v: Visitor)
+ do
+ v.enter_visit(_n_oct_bytenum)
+ v.enter_visit(_n_annotations)
+ end
+end
redef class AFloatExpr
init init_afloatexpr (
n_float: nullable TFloat,
end
redef class AAnnotations
init init_aannotations (
+ n_kwis: nullable TKwis,
n_at: nullable TAt,
n_opar: nullable TOpar,
n_items: Collection[Object], # Should be Collection[AAnnotation]
- n_cpar: nullable TCpar
+ n_cpar: nullable TCpar,
+ n_kwend: nullable TKwend
)
do
+ _n_kwis = n_kwis
+ if n_kwis != null then n_kwis.parent = self
_n_at = n_at
if n_at != null then n_at.parent = self
_n_opar = n_opar
self.n_items.unsafe_add_all(n_items)
_n_cpar = n_cpar
if n_cpar != null then n_cpar.parent = self
+ _n_kwend = n_kwend
+ if n_kwend != null then n_kwend.parent = self
end
redef fun replace_child(old_child: ANode, new_child: nullable ANode)
do
+ if _n_kwis == old_child then
+ n_kwis = new_child.as(nullable TKwis)
+ return
+ end
if _n_at == old_child then
n_at = new_child.as(nullable TAt)
return
n_cpar = new_child.as(nullable TCpar)
return
end
+ if _n_kwend == old_child then
+ n_kwend = new_child.as(nullable TKwend)
+ return
+ end
end
+ redef fun n_kwis=(node)
+ do
+ _n_kwis = node
+ if node != null then node.parent = self
+ end
redef fun n_at=(node)
do
_n_at = node
_n_cpar = node
if node != null then node.parent = self
end
+ redef fun n_kwend=(node)
+ do
+ _n_kwend = node
+ if node != null then node.parent = self
+ end
redef fun visit_all(v: Visitor)
do
+ v.enter_visit(_n_kwis)
v.enter_visit(_n_at)
v.enter_visit(_n_opar)
n_items.visit_all(v)
v.enter_visit(_n_cpar)
+ v.enter_visit(_n_kwend)
end
end
redef class AAnnotation