- redef meth visit_all_reverse(v: Visitor)
- do
- if _n_doc != null then
- v.visit(_n_doc)
- end
- if _n_kwredef != null then
- v.visit(_n_kwredef)
- end
- if _n_visibility != null then
- v.visit(_n_visibility)
- end
- if _n_kwmeth != null then
- v.visit(_n_kwmeth)
- end
- if _n_methid != null then
- v.visit(_n_methid)
- end
- if _n_signature != null then
- v.visit(_n_signature)
- end
- end
-end
-redef class AExternMethPropdef
- redef meth n_doc=(n: PDoc)
- do
- _n_doc = n
- if n != null then
- n.parent = self
- end
- end
- redef meth n_kwredef=(n: TKwredef)
- do
- _n_kwredef = n
- if n != null then
- n.parent = self
- end
- end
- redef meth n_visibility=(n: PVisibility)
- do
- _n_visibility = n
- if n != null then
- n.parent = self
- end
- end
- redef meth n_kwmeth=(n: TKwmeth)
- do
- _n_kwmeth = n
- if n != null then
- n.parent = self
- end
- end
- redef meth n_methid=(n: PMethid)
- do
- _n_methid = n
- if n != null then
- n.parent = self
- end
- end
- redef meth n_signature=(n: PSignature)
- do
- _n_signature = n
- if n != null then
- n.parent = self
- end
- end
- redef meth n_extern=(n: TString)
- do
- _n_extern = n
- if n != null then
- n.parent = self
- end
- 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_kwsuper)
+ v.enter_visit(_n_type)
+ v.enter_visit(_n_annotations)
+ end
+end
+redef class AAnnotPropdef
+ init init_aannotpropdef (
+ 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[AExpr]
+ n_cpar: nullable TCpar,
+ 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
+ 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
+ if n_annotations != null then n_annotations.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(nullable AVisibility)
+ return
+ end
+ if _n_atid == old_child then
+ n_atid = new_child.as(AAtid)
+ return
+ end
+ if _n_opar == old_child then
+ n_opar = new_child.as(nullable TOpar)
+ return
+ end
+ 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
+ if _n_annotations == old_child then
+ n_annotations = new_child.as(nullable AAnnotations)
+ return
+ end
+ end