do
_n_moduledecl = n_moduledecl
if n_moduledecl != null then n_moduledecl.parent = self
- _n_imports.unsafe_add_all(n_imports)
- _n_extern_code_blocks.unsafe_add_all(n_extern_code_blocks)
- _n_classdefs.unsafe_add_all(n_classdefs)
+ self.n_imports.unsafe_add_all(n_imports)
+ self.n_extern_code_blocks.unsafe_add_all(n_extern_code_blocks)
+ self.n_classdefs.unsafe_add_all(n_classdefs)
end
redef fun replace_child(old_child: ANode, new_child: nullable ANode)
n_moduledecl = new_child.as(nullable AModuledecl)
return
end
- if _n_imports.replace_child(old_child, new_child) then return
- if _n_extern_code_blocks.replace_child(old_child, new_child) then return
- if _n_classdefs.replace_child(old_child, new_child) then return
+ if n_imports.replace_child(old_child, new_child) then return
+ if n_extern_code_blocks.replace_child(old_child, new_child) then return
+ if n_classdefs.replace_child(old_child, new_child) then return
end
redef fun n_moduledecl=(node)
redef fun visit_all(v: Visitor)
do
v.enter_visit(_n_moduledecl)
- _n_imports.visit_all(v)
- _n_extern_code_blocks.visit_all(v)
- _n_classdefs.visit_all(v)
+ n_imports.visit_all(v)
+ n_extern_code_blocks.visit_all(v)
+ n_classdefs.visit_all(v)
end
end
redef class AModuledecl
init init_amoduledecl (
n_doc: nullable ADoc,
+ n_kwredef: nullable TKwredef,
+ n_visibility: nullable AVisibility,
n_kwmodule: nullable TKwmodule,
n_name: nullable AModuleName,
n_annotations: nullable AAnnotations
do
_n_doc = n_doc
if n_doc != null then n_doc.parent = self
+ _n_kwredef = n_kwredef
+ if n_kwredef != null then n_kwredef.parent = self
+ _n_visibility = n_visibility.as(not null)
+ n_visibility.parent = self
_n_kwmodule = n_kwmodule.as(not null)
n_kwmodule.parent = self
_n_name = n_name.as(not null)
n_doc = new_child.as(nullable ADoc)
return
end
+ if _n_kwredef == old_child then
+ n_kwredef = new_child.as(nullable TKwredef)
+ return
+ end
+ if _n_visibility == old_child then
+ n_visibility = new_child.as(AVisibility)
+ return
+ end
if _n_kwmodule == old_child then
n_kwmodule = new_child.as(TKwmodule)
return
_n_doc = node
if node != null then node.parent = self
end
+ redef fun n_kwredef=(node)
+ do
+ _n_kwredef = node
+ if node != null then node.parent = self
+ end
+ redef fun n_visibility=(node)
+ do
+ _n_visibility = node
+ node.parent = self
+ end
redef fun n_kwmodule=(node)
do
_n_kwmodule = node
redef fun visit_all(v: Visitor)
do
v.enter_visit(_n_doc)
+ v.enter_visit(_n_kwredef)
+ v.enter_visit(_n_visibility)
v.enter_visit(_n_kwmodule)
v.enter_visit(_n_name)
v.enter_visit(_n_annotations)
end
end
redef class APublicVisibility
- init init_apublicvisibility
+ init init_apublicvisibility (
+ n_kwpublic: nullable TKwpublic
+ )
do
+ _n_kwpublic = n_kwpublic
+ if n_kwpublic != null then n_kwpublic.parent = self
end
redef fun replace_child(old_child: ANode, new_child: nullable ANode)
do
+ if _n_kwpublic == old_child then
+ n_kwpublic = new_child.as(nullable TKwpublic)
+ return
+ end
end
+ redef fun n_kwpublic=(node)
+ do
+ _n_kwpublic = node
+ if node != null then node.parent = self
+ end
redef fun visit_all(v: Visitor)
do
+ v.enter_visit(_n_kwpublic)
end
end
redef class APrivateVisibility
n_classkind.parent = self
_n_id = n_id
if n_id != null then n_id.parent = self
- _n_formaldefs.unsafe_add_all(n_formaldefs)
+ self.n_formaldefs.unsafe_add_all(n_formaldefs)
_n_annotations = n_annotations
if n_annotations != null then n_annotations.parent = self
_n_extern_code_block = n_extern_code_block
if n_extern_code_block != null then n_extern_code_block.parent = self
- _n_superclasses.unsafe_add_all(n_superclasses)
- _n_propdefs.unsafe_add_all(n_propdefs)
+ self.n_superclasses.unsafe_add_all(n_superclasses)
+ self.n_propdefs.unsafe_add_all(n_propdefs)
_n_kwend = n_kwend.as(not null)
n_kwend.parent = self
end
n_id = new_child.as(nullable TClassid)
return
end
- if _n_formaldefs.replace_child(old_child, new_child) then return
+ if n_formaldefs.replace_child(old_child, new_child) then return
if _n_annotations == old_child then
n_annotations = new_child.as(nullable AAnnotations)
return
n_extern_code_block = new_child.as(nullable AExternCodeBlock)
return
end
- if _n_superclasses.replace_child(old_child, new_child) then return
- if _n_propdefs.replace_child(old_child, new_child) then return
+ if n_superclasses.replace_child(old_child, new_child) then return
+ if n_propdefs.replace_child(old_child, new_child) then return
if _n_kwend == old_child then
n_kwend = new_child.as(TKwend)
return
v.enter_visit(_n_visibility)
v.enter_visit(_n_classkind)
v.enter_visit(_n_id)
- _n_formaldefs.visit_all(v)
+ n_formaldefs.visit_all(v)
v.enter_visit(_n_annotations)
v.enter_visit(_n_extern_code_block)
- _n_superclasses.visit_all(v)
- _n_propdefs.visit_all(v)
+ n_superclasses.visit_all(v)
+ n_propdefs.visit_all(v)
v.enter_visit(_n_kwend)
end
end
n_propdefs: Collection[Object] # Should be Collection[APropdef]
)
do
- _n_propdefs.unsafe_add_all(n_propdefs)
+ self.n_propdefs.unsafe_add_all(n_propdefs)
end
redef fun replace_child(old_child: ANode, new_child: nullable ANode)
do
- if _n_propdefs.replace_child(old_child, new_child) then return
+ if n_propdefs.replace_child(old_child, new_child) then return
end
redef fun visit_all(v: Visitor)
do
- _n_propdefs.visit_all(v)
+ n_propdefs.visit_all(v)
end
end
redef class AMainClassdef
n_propdefs: Collection[Object] # Should be Collection[APropdef]
)
do
- _n_propdefs.unsafe_add_all(n_propdefs)
+ self.n_propdefs.unsafe_add_all(n_propdefs)
end
redef fun replace_child(old_child: ANode, new_child: nullable ANode)
do
- if _n_propdefs.replace_child(old_child, new_child) then return
+ if n_propdefs.replace_child(old_child, new_child) then return
end
redef fun visit_all(v: Visitor)
do
- _n_propdefs.visit_all(v)
+ n_propdefs.visit_all(v)
end
end
redef class AConcreteClasskind
v.enter_visit(_n_signature)
end
end
+redef class AInternNewPropdef
+ init init_ainternnewpropdef (
+ n_doc: nullable ADoc,
+ n_kwredef: nullable TKwredef,
+ n_visibility: nullable AVisibility,
+ n_kwnew: nullable TKwnew,
+ n_methid: nullable AMethid,
+ n_signature: nullable ASignature
+ )
+ do
+ _n_doc = n_doc
+ if n_doc != null then n_doc.parent = self
+ _n_kwredef = n_kwredef
+ if n_kwredef != null then n_kwredef.parent = self
+ _n_visibility = n_visibility.as(not null)
+ n_visibility.parent = self
+ _n_kwnew = n_kwnew.as(not null)
+ n_kwnew.parent = self
+ _n_methid = n_methid
+ if n_methid != null then n_methid.parent = self
+ _n_signature = n_signature.as(not null)
+ n_signature.parent = self
+ end
+
+ redef fun replace_child(old_child: ANode, new_child: nullable ANode)
+ do
+ if _n_doc == old_child then
+ n_doc = new_child.as(nullable ADoc)
+ return
+ end
+ if _n_kwredef == old_child then
+ n_kwredef = new_child.as(nullable TKwredef)
+ return
+ end
+ if _n_visibility == old_child then
+ n_visibility = new_child.as(AVisibility)
+ return
+ end
+ if _n_kwnew == old_child then
+ n_kwnew = new_child.as(TKwnew)
+ return
+ end
+ if _n_methid == old_child then
+ n_methid = new_child.as(nullable AMethid)
+ return
+ end
+ if _n_signature == old_child then
+ n_signature = new_child.as(ASignature)
+ return
+ end
+ end
+
+ redef fun n_doc=(node)
+ do
+ _n_doc = node
+ if node != null then node.parent = self
+ end
+ redef fun n_kwredef=(node)
+ do
+ _n_kwredef = node
+ if node != null then node.parent = self
+ end
+ redef fun n_visibility=(node)
+ do
+ _n_visibility = node
+ node.parent = self
+ end
+ redef fun n_kwnew=(node)
+ do
+ _n_kwnew = node
+ node.parent = self
+ end
+ redef fun n_methid=(node)
+ do
+ _n_methid = node
+ if node != null then node.parent = self
+ end
+ redef fun n_signature=(node)
+ do
+ _n_signature = node
+ node.parent = self
+ end
+
+
+ redef fun visit_all(v: Visitor)
+ do
+ v.enter_visit(_n_doc)
+ v.enter_visit(_n_kwredef)
+ v.enter_visit(_n_visibility)
+ v.enter_visit(_n_kwnew)
+ v.enter_visit(_n_methid)
+ v.enter_visit(_n_signature)
+ end
+end
redef class AExternMethPropdef
init init_aexternmethpropdef (
n_doc: nullable ADoc,
n_kwmeth: nullable TKwmeth,
n_methid: nullable AMethid,
n_signature: nullable ASignature,
+ n_annotations: nullable AAnnotations,
n_extern: nullable TString,
n_extern_calls: nullable AExternCalls,
n_extern_code_block: nullable AExternCodeBlock
n_methid.parent = self
_n_signature = n_signature.as(not null)
n_signature.parent = self
+ _n_annotations = n_annotations
+ if n_annotations != null then n_annotations.parent = self
_n_extern = n_extern
if n_extern != null then n_extern.parent = self
_n_extern_calls = n_extern_calls
n_signature = new_child.as(ASignature)
return
end
+ if _n_annotations == old_child then
+ n_annotations = new_child.as(nullable AAnnotations)
+ return
+ end
if _n_extern == old_child then
n_extern = new_child.as(nullable TString)
return
_n_signature = node
node.parent = self
end
+ redef fun n_annotations=(node)
+ do
+ _n_annotations = node
+ if node != null then node.parent = self
+ end
redef fun n_extern=(node)
do
_n_extern = node
v.enter_visit(_n_kwmeth)
v.enter_visit(_n_methid)
v.enter_visit(_n_signature)
+ v.enter_visit(_n_annotations)
v.enter_visit(_n_extern)
v.enter_visit(_n_extern_calls)
v.enter_visit(_n_extern_code_block)
n_kwnew: nullable TKwnew,
n_methid: nullable AMethid,
n_signature: nullable ASignature,
+ n_annotations: nullable AAnnotations,
n_extern: nullable TString,
n_extern_calls: nullable AExternCalls,
n_extern_code_block: nullable AExternCodeBlock
if n_methid != null then n_methid.parent = self
_n_signature = n_signature.as(not null)
n_signature.parent = self
+ _n_annotations = n_annotations
+ if n_annotations != null then n_annotations.parent = self
_n_extern = n_extern
if n_extern != null then n_extern.parent = self
_n_extern_calls = n_extern_calls
n_signature = new_child.as(ASignature)
return
end
+ if _n_annotations == old_child then
+ n_annotations = new_child.as(nullable AAnnotations)
+ return
+ end
if _n_extern == old_child then
n_extern = new_child.as(nullable TString)
return
_n_signature = node
node.parent = self
end
+ redef fun n_annotations=(node)
+ do
+ _n_annotations = node
+ if node != null then node.parent = self
+ end
redef fun n_extern=(node)
do
_n_extern = node
v.enter_visit(_n_kwnew)
v.enter_visit(_n_methid)
v.enter_visit(_n_signature)
+ v.enter_visit(_n_annotations)
v.enter_visit(_n_extern)
v.enter_visit(_n_extern_calls)
v.enter_visit(_n_extern_code_block)
do
_n_opar = n_opar
if n_opar != null then n_opar.parent = self
- _n_params.unsafe_add_all(n_params)
+ self.n_params.unsafe_add_all(n_params)
_n_cpar = n_cpar
if n_cpar != null then n_cpar.parent = self
_n_type = n_type
n_opar = new_child.as(nullable TOpar)
return
end
- if _n_params.replace_child(old_child, new_child) then return
+ if n_params.replace_child(old_child, new_child) then return
if _n_cpar == old_child then
n_cpar = new_child.as(nullable TCpar)
return
redef fun visit_all(v: Visitor)
do
v.enter_visit(_n_opar)
- _n_params.visit_all(v)
+ n_params.visit_all(v)
v.enter_visit(_n_cpar)
v.enter_visit(_n_type)
end
if n_kwnullable != null then n_kwnullable.parent = self
_n_id = n_id.as(not null)
n_id.parent = self
- _n_types.unsafe_add_all(n_types)
+ self.n_types.unsafe_add_all(n_types)
_n_annotations = n_annotations
if n_annotations != null then n_annotations.parent = self
end
n_id = new_child.as(TClassid)
return
end
- if _n_types.replace_child(old_child, new_child) then return
+ if n_types.replace_child(old_child, new_child) then return
if _n_annotations == old_child then
n_annotations = new_child.as(nullable AAnnotations)
return
do
v.enter_visit(_n_kwnullable)
v.enter_visit(_n_id)
- _n_types.visit_all(v)
+ n_types.visit_all(v)
v.enter_visit(_n_annotations)
end
end
do
_n_kwlabel = n_kwlabel.as(not null)
n_kwlabel.parent = self
- _n_id = n_id.as(not null)
- n_id.parent = self
+ _n_id = n_id
+ if n_id != null then n_id.parent = self
end
redef fun replace_child(old_child: ANode, new_child: nullable ANode)
return
end
if _n_id == old_child then
- n_id = new_child.as(TId)
+ n_id = new_child.as(nullable TId)
return
end
end
redef fun n_id=(node)
do
_n_id = node
- node.parent = self
+ if node != null then node.parent = self
end
n_kwend: nullable TKwend
)
do
- _n_expr.unsafe_add_all(n_expr)
+ self.n_expr.unsafe_add_all(n_expr)
_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_expr.replace_child(old_child, new_child) then return
+ if n_expr.replace_child(old_child, new_child) then return
if _n_kwend == old_child then
n_kwend = new_child.as(nullable TKwend)
return
redef fun visit_all(v: Visitor)
do
- _n_expr.visit_all(v)
+ n_expr.visit_all(v)
v.enter_visit(_n_kwend)
end
end
redef class ABreakExpr
init init_abreakexpr (
n_kwbreak: nullable TKwbreak,
- n_label: nullable ALabel,
- n_expr: nullable AExpr
+ n_label: nullable ALabel
)
do
_n_kwbreak = n_kwbreak.as(not null)
n_kwbreak.parent = self
_n_label = n_label
if n_label != null then n_label.parent = self
- _n_expr = n_expr
- if n_expr != null then n_expr.parent = self
end
redef fun replace_child(old_child: ANode, new_child: nullable ANode)
n_label = new_child.as(nullable ALabel)
return
end
- if _n_expr == old_child then
- n_expr = new_child.as(nullable AExpr)
- return
- end
end
redef fun n_kwbreak=(node)
_n_label = node
if node != null then node.parent = self
end
- redef fun n_expr=(node)
- do
- _n_expr = node
- if node != null then node.parent = self
- end
redef fun visit_all(v: Visitor)
do
v.enter_visit(_n_kwbreak)
v.enter_visit(_n_label)
- v.enter_visit(_n_expr)
end
end
redef class AAbortExpr
redef class AContinueExpr
init init_acontinueexpr (
n_kwcontinue: nullable TKwcontinue,
- n_label: nullable ALabel,
- n_expr: nullable AExpr
+ n_label: nullable ALabel
)
do
_n_kwcontinue = n_kwcontinue
if n_kwcontinue != null then n_kwcontinue.parent = self
_n_label = n_label
if n_label != null then n_label.parent = self
- _n_expr = n_expr
- if n_expr != null then n_expr.parent = self
end
redef fun replace_child(old_child: ANode, new_child: nullable ANode)
n_label = new_child.as(nullable ALabel)
return
end
- if _n_expr == old_child then
- n_expr = new_child.as(nullable AExpr)
- return
- end
end
redef fun n_kwcontinue=(node)
_n_label = node
if node != null then node.parent = self
end
- redef fun n_expr=(node)
- do
- _n_expr = node
- if node != null then node.parent = self
- end
redef fun visit_all(v: Visitor)
do
v.enter_visit(_n_kwcontinue)
v.enter_visit(_n_label)
- v.enter_visit(_n_expr)
end
end
redef class ADoExpr
do
_n_kwfor = n_kwfor.as(not null)
n_kwfor.parent = self
- _n_ids.unsafe_add_all(n_ids)
+ self.n_ids.unsafe_add_all(n_ids)
_n_expr = n_expr.as(not null)
n_expr.parent = self
_n_kwdo = n_kwdo.as(not null)
n_kwfor = new_child.as(TKwfor)
return
end
- if _n_ids.replace_child(old_child, new_child) then return
+ if n_ids.replace_child(old_child, new_child) then return
if _n_expr == old_child then
n_expr = new_child.as(AExpr)
return
redef fun visit_all(v: Visitor)
do
v.enter_visit(_n_kwfor)
- _n_ids.visit_all(v)
+ n_ids.visit_all(v)
v.enter_visit(_n_expr)
v.enter_visit(_n_kwdo)
v.enter_visit(_n_block)
n_annotations: nullable AAnnotations
)
do
- _n_exprs.unsafe_add_all(n_exprs)
+ self.n_exprs.unsafe_add_all(n_exprs)
_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_exprs.replace_child(old_child, new_child) then return
+ if n_exprs.replace_child(old_child, new_child) then return
if _n_annotations == old_child then
n_annotations = new_child.as(nullable AAnnotations)
return
redef fun visit_all(v: Visitor)
do
- _n_exprs.visit_all(v)
+ n_exprs.visit_all(v)
v.enter_visit(_n_annotations)
end
end
v.enter_visit(_n_type)
end
end
+redef class AVarargExpr
+ init init_avarargexpr (
+ n_expr: nullable AExpr,
+ n_dotdotdot: nullable TDotdotdot
+ )
+ do
+ _n_expr = n_expr.as(not null)
+ n_expr.parent = self
+ _n_dotdotdot = n_dotdotdot.as(not null)
+ n_dotdotdot.parent = self
+ end
+
+ redef fun replace_child(old_child: ANode, new_child: nullable ANode)
+ do
+ if _n_expr == old_child then
+ n_expr = new_child.as(AExpr)
+ return
+ end
+ if _n_dotdotdot == old_child then
+ n_dotdotdot = new_child.as(TDotdotdot)
+ return
+ end
+ end
+
+ redef fun n_expr=(node)
+ do
+ _n_expr = node
+ node.parent = self
+ end
+ redef fun n_dotdotdot=(node)
+ do
+ _n_dotdotdot = node
+ node.parent = self
+ end
+
+
+ redef fun visit_all(v: Visitor)
+ do
+ v.enter_visit(_n_expr)
+ v.enter_visit(_n_dotdotdot)
+ end
+end
redef class AListExprs
init init_alistexprs (
n_exprs: Collection[Object] # Should be Collection[AExpr]
)
do
- _n_exprs.unsafe_add_all(n_exprs)
+ self.n_exprs.unsafe_add_all(n_exprs)
end
redef fun replace_child(old_child: ANode, new_child: nullable ANode)
do
- if _n_exprs.replace_child(old_child, new_child) then return
+ if n_exprs.replace_child(old_child, new_child) then return
end
redef fun visit_all(v: Visitor)
do
- _n_exprs.visit_all(v)
+ n_exprs.visit_all(v)
end
end
redef class AParExprs
do
_n_opar = n_opar.as(not null)
n_opar.parent = self
- _n_exprs.unsafe_add_all(n_exprs)
+ self.n_exprs.unsafe_add_all(n_exprs)
_n_cpar = n_cpar.as(not null)
n_cpar.parent = self
end
n_opar = new_child.as(TOpar)
return
end
- if _n_exprs.replace_child(old_child, new_child) then return
+ if n_exprs.replace_child(old_child, new_child) then return
if _n_cpar == old_child then
n_cpar = new_child.as(TCpar)
return
redef fun visit_all(v: Visitor)
do
v.enter_visit(_n_opar)
- _n_exprs.visit_all(v)
+ n_exprs.visit_all(v)
v.enter_visit(_n_cpar)
end
end
do
_n_obra = n_obra.as(not null)
n_obra.parent = self
- _n_exprs.unsafe_add_all(n_exprs)
+ self.n_exprs.unsafe_add_all(n_exprs)
_n_cbra = n_cbra.as(not null)
n_cbra.parent = self
end
n_obra = new_child.as(TObra)
return
end
- if _n_exprs.replace_child(old_child, new_child) then return
+ if n_exprs.replace_child(old_child, new_child) then return
if _n_cbra == old_child then
n_cbra = new_child.as(TCbra)
return
redef fun visit_all(v: Visitor)
do
v.enter_visit(_n_obra)
- _n_exprs.visit_all(v)
+ n_exprs.visit_all(v)
v.enter_visit(_n_cbra)
end
end
do
_n_quad = n_quad
if n_quad != null then n_quad.parent = self
- _n_path.unsafe_add_all(n_path)
+ self.n_path.unsafe_add_all(n_path)
_n_id = n_id.as(not null)
n_id.parent = self
end
n_quad = new_child.as(nullable TQuad)
return
end
- if _n_path.replace_child(old_child, new_child) then return
+ if n_path.replace_child(old_child, new_child) then return
if _n_id == old_child then
n_id = new_child.as(TId)
return
redef fun visit_all(v: Visitor)
do
v.enter_visit(_n_quad)
- _n_path.visit_all(v)
+ n_path.visit_all(v)
v.enter_visit(_n_id)
end
end
do
_n_kwimport = n_kwimport.as(not null)
n_kwimport.parent = self
- _n_extern_calls.unsafe_add_all(n_extern_calls)
+ self.n_extern_calls.unsafe_add_all(n_extern_calls)
end
redef fun replace_child(old_child: ANode, new_child: nullable ANode)
n_kwimport = new_child.as(TKwimport)
return
end
- if _n_extern_calls.replace_child(old_child, new_child) then return
+ if n_extern_calls.replace_child(old_child, new_child) then return
end
redef fun n_kwimport=(node)
redef fun visit_all(v: Visitor)
do
v.enter_visit(_n_kwimport)
- _n_extern_calls.visit_all(v)
+ n_extern_calls.visit_all(v)
end
end
redef class AExternCall
n_classid: nullable TClassid
)
do
- _n_id.unsafe_add_all(n_id)
+ self.n_id.unsafe_add_all(n_id)
_n_classid = n_classid
if n_classid != null then n_classid.parent = self
end
redef fun replace_child(old_child: ANode, new_child: nullable ANode)
do
- if _n_id.replace_child(old_child, new_child) then return
+ if n_id.replace_child(old_child, new_child) then return
if _n_classid == old_child then
n_classid = new_child.as(nullable TClassid)
return
redef fun visit_all(v: Visitor)
do
- _n_id.visit_all(v)
+ n_id.visit_all(v)
v.enter_visit(_n_classid)
end
end
n_comment: Collection[Object] # Should be Collection[TComment]
)
do
- _n_comment.unsafe_add_all(n_comment)
+ self.n_comment.unsafe_add_all(n_comment)
end
redef fun replace_child(old_child: ANode, new_child: nullable ANode)
do
- if _n_comment.replace_child(old_child, new_child) then return
+ if n_comment.replace_child(old_child, new_child) then return
end
redef fun visit_all(v: Visitor)
do
- _n_comment.visit_all(v)
+ n_comment.visit_all(v)
end
end
redef class AAnnotations
if n_at != null then n_at.parent = self
_n_opar = n_opar
if n_opar != null then n_opar.parent = self
- _n_items.unsafe_add_all(n_items)
+ self.n_items.unsafe_add_all(n_items)
_n_cpar = n_cpar
if n_cpar != null then n_cpar.parent = self
end
n_opar = new_child.as(nullable TOpar)
return
end
- if _n_items.replace_child(old_child, new_child) then return
+ if n_items.replace_child(old_child, new_child) then return
if _n_cpar == old_child then
n_cpar = new_child.as(nullable TCpar)
return
do
v.enter_visit(_n_at)
v.enter_visit(_n_opar)
- _n_items.visit_all(v)
+ n_items.visit_all(v)
v.enter_visit(_n_cpar)
end
end
redef class AAnnotation
init init_aannotation (
+ n_doc: nullable ADoc,
+ n_kwredef: nullable TKwredef,
+ n_visibility: nullable AVisibility,
n_atid: nullable AAtid,
n_opar: nullable TOpar,
n_args: Collection[Object], # Should be Collection[AAtArg]
n_annotations: nullable AAnnotations
)
do
+ _n_doc = n_doc
+ if n_doc != null then n_doc.parent = self
+ _n_kwredef = n_kwredef
+ if n_kwredef != null then n_kwredef.parent = self
+ _n_visibility = n_visibility
+ if n_visibility != null then n_visibility.parent = self
_n_atid = n_atid.as(not null)
n_atid.parent = self
_n_opar = n_opar
if n_opar != null then n_opar.parent = self
- _n_args.unsafe_add_all(n_args)
+ self.n_args.unsafe_add_all(n_args)
_n_cpar = n_cpar
if n_cpar != null then n_cpar.parent = self
_n_annotations = n_annotations
redef fun replace_child(old_child: ANode, new_child: nullable ANode)
do
+ if _n_doc == old_child then
+ n_doc = new_child.as(nullable ADoc)
+ return
+ end
+ if _n_kwredef == old_child then
+ n_kwredef = new_child.as(nullable TKwredef)
+ return
+ end
+ if _n_visibility == old_child then
+ n_visibility = new_child.as(nullable AVisibility)
+ return
+ end
if _n_atid == old_child then
n_atid = new_child.as(AAtid)
return
n_opar = new_child.as(nullable TOpar)
return
end
- if _n_args.replace_child(old_child, new_child) then return
+ if n_args.replace_child(old_child, new_child) then return
if _n_cpar == old_child then
n_cpar = new_child.as(nullable TCpar)
return
end
end
+ redef fun n_doc=(node)
+ do
+ _n_doc = node
+ if node != null then node.parent = self
+ end
+ redef fun n_kwredef=(node)
+ do
+ _n_kwredef = node
+ if node != null then node.parent = self
+ end
+ redef fun n_visibility=(node)
+ do
+ _n_visibility = node
+ if node != null then node.parent = self
+ end
redef fun n_atid=(node)
do
_n_atid = node
redef fun visit_all(v: Visitor)
do
+ v.enter_visit(_n_doc)
+ v.enter_visit(_n_kwredef)
+ v.enter_visit(_n_visibility)
v.enter_visit(_n_atid)
v.enter_visit(_n_opar)
- _n_args.visit_all(v)
+ n_args.visit_all(v)
v.enter_visit(_n_cpar)
v.enter_visit(_n_annotations)
end