X-Git-Url: http://nitlanguage.org diff --git a/src/parser/parser_prod.nit b/src/parser/parser_prod.nit index 588d266..84b2210 100644 --- a/src/parser/parser_prod.nit +++ b/src/parser/parser_prod.nit @@ -1,6 +1,6 @@ # Production AST nodes full definition. # This file was generated by SableCC (http://www.sablecc.org/). -module parser_prod +module parser_prod is no_warning("missing-doc") import lexer intrude import parser_nodes @@ -16,9 +16,9 @@ redef class AModule 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) @@ -27,9 +27,9 @@ redef class AModule 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) @@ -42,14 +42,16 @@ redef class AModule 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 @@ -57,6 +59,10 @@ redef class AModuledecl 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) @@ -71,6 +77,14 @@ redef class AModuledecl 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 @@ -90,6 +104,16 @@ redef class AModuledecl _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 @@ -110,6 +134,8 @@ redef class AModuledecl 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) @@ -239,18 +265,32 @@ redef class ANoImport 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 @@ -348,9 +388,7 @@ redef class AStdClassdef n_classkind: nullable AClasskind, n_id: nullable TClassid, n_formaldefs: Collection[Object], # Should be Collection[AFormaldef] - n_annotations: nullable AAnnotations, n_extern_code_block: nullable AExternCodeBlock, - n_superclasses: Collection[Object], # Should be Collection[ASuperclass] n_propdefs: Collection[Object], # Should be Collection[APropdef] n_kwend: nullable TKwend ) @@ -365,13 +403,10 @@ redef class AStdClassdef n_classkind.parent = self _n_id = n_id if n_id != null then n_id.parent = self - _n_formaldefs.unsafe_add_all(n_formaldefs) - _n_annotations = n_annotations - if n_annotations != null then n_annotations.parent = self + self.n_formaldefs.unsafe_add_all(n_formaldefs) _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_propdefs.unsafe_add_all(n_propdefs) _n_kwend = n_kwend.as(not null) n_kwend.parent = self end @@ -398,17 +433,12 @@ redef class AStdClassdef n_id = new_child.as(nullable TClassid) return end - 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 - end + if n_formaldefs.replace_child(old_child, new_child) then return if _n_extern_code_block == old_child then 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_propdefs.replace_child(old_child, new_child) then return if _n_kwend == old_child then n_kwend = new_child.as(TKwend) return @@ -440,11 +470,6 @@ redef class AStdClassdef _n_id = node if node != null then 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_code_block=(node) do _n_extern_code_block = node @@ -464,11 +489,9 @@ redef class AStdClassdef v.enter_visit(_n_visibility) v.enter_visit(_n_classkind) v.enter_visit(_n_id) - _n_formaldefs.visit_all(v) - v.enter_visit(_n_annotations) + n_formaldefs.visit_all(v) v.enter_visit(_n_extern_code_block) - _n_superclasses.visit_all(v) - _n_propdefs.visit_all(v) + n_propdefs.visit_all(v) v.enter_visit(_n_kwend) end end @@ -477,19 +500,19 @@ redef class ATopClassdef 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 @@ -497,19 +520,19 @@ 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 @@ -738,98 +761,37 @@ redef class AFormaldef v.enter_visit(_n_annotations) end end -redef class ASuperclass - init init_asuperclass ( - n_kwsuper: nullable TKwsuper, - n_type: nullable AType, - n_annotations: nullable AAnnotations - ) - do - _n_kwsuper = n_kwsuper.as(not null) - n_kwsuper.parent = self - _n_type = n_type.as(not null) - n_type.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_kwsuper == old_child then - n_kwsuper = new_child.as(TKwsuper) - return - end - if _n_type == old_child then - n_type = new_child.as(AType) - return - end - if _n_annotations == old_child then - n_annotations = new_child.as(nullable AAnnotations) - return - end - end - - redef fun n_kwsuper=(node) - do - _n_kwsuper = node - node.parent = self - end - redef fun n_type=(node) - do - _n_type = 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_kwsuper) - v.enter_visit(_n_type) - v.enter_visit(_n_annotations) - end -end redef class AAttrPropdef init init_aattrpropdef ( n_doc: nullable ADoc, - n_readable: nullable AAble, - n_writable: nullable AAble, n_kwredef: nullable TKwredef, n_visibility: nullable AVisibility, n_kwvar: nullable TKwvar, - n_id: nullable TAttrid, n_id2: nullable TId, n_type: nullable AType, + n_expr: nullable AExpr, n_annotations: nullable AAnnotations, - n_expr: nullable AExpr + n_block: nullable AExpr ) do _n_doc = n_doc if n_doc != null then n_doc.parent = self - _n_readable = n_readable - if n_readable != null then n_readable.parent = self - _n_writable = n_writable - if n_writable != null then n_writable.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_kwvar = n_kwvar.as(not null) n_kwvar.parent = self - _n_id = n_id - if n_id != null then n_id.parent = self - _n_id2 = n_id2 - if n_id2 != null then n_id2.parent = self + _n_id2 = n_id2.as(not null) + n_id2.parent = self _n_type = n_type if n_type != null then n_type.parent = self - _n_annotations = n_annotations - if n_annotations != null then n_annotations.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_block = n_block + if n_block != null then n_block.parent = self end redef fun replace_child(old_child: ANode, new_child: nullable ANode) @@ -838,14 +800,6 @@ redef class AAttrPropdef n_doc = new_child.as(nullable ADoc) return end - if _n_readable == old_child then - n_readable = new_child.as(nullable AAble) - return - end - if _n_writable == old_child then - n_writable = new_child.as(nullable AAble) - return - end if _n_kwredef == old_child then n_kwredef = new_child.as(nullable TKwredef) return @@ -858,24 +812,24 @@ redef class AAttrPropdef n_kwvar = new_child.as(TKwvar) return end - if _n_id == old_child then - n_id = new_child.as(nullable TAttrid) - return - end if _n_id2 == old_child then - n_id2 = new_child.as(nullable TId) + n_id2 = new_child.as(TId) return end if _n_type == old_child then n_type = new_child.as(nullable AType) return end + if _n_expr == old_child then + n_expr = new_child.as(nullable AExpr) + return + end if _n_annotations == old_child then n_annotations = new_child.as(nullable AAnnotations) return end - if _n_expr == old_child then - n_expr = new_child.as(nullable AExpr) + if _n_block == old_child then + n_block = new_child.as(nullable AExpr) return end end @@ -885,16 +839,6 @@ redef class AAttrPropdef _n_doc = node if node != null then node.parent = self end - redef fun n_readable=(node) - do - _n_readable = node - if node != null then node.parent = self - end - redef fun n_writable=(node) - do - _n_writable = node - if node != null then node.parent = self - end redef fun n_kwredef=(node) do _n_kwredef = node @@ -910,29 +854,29 @@ redef class AAttrPropdef _n_kwvar = node node.parent = self end - redef fun n_id=(node) - do - _n_id = node - if node != null then node.parent = self - end redef fun n_id2=(node) do _n_id2 = node - if node != null then node.parent = self + node.parent = self end redef fun n_type=(node) do _n_type = 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 n_annotations=(node) do _n_annotations = node if node != null then node.parent = self end - redef fun n_expr=(node) + redef fun n_block=(node) do - _n_expr = node + _n_block = node if node != null then node.parent = self end @@ -940,107 +884,66 @@ redef class AAttrPropdef redef fun visit_all(v: Visitor) do v.enter_visit(_n_doc) - v.enter_visit(_n_readable) - v.enter_visit(_n_writable) v.enter_visit(_n_kwredef) v.enter_visit(_n_visibility) v.enter_visit(_n_kwvar) - v.enter_visit(_n_id) v.enter_visit(_n_id2) v.enter_visit(_n_type) - v.enter_visit(_n_annotations) v.enter_visit(_n_expr) + v.enter_visit(_n_annotations) + v.enter_visit(_n_block) end end -redef class AMethPropdef - init init_amethpropdef ( - n_doc: nullable ADoc, +redef class AMainMethPropdef + init init_amainmethpropdef ( n_kwredef: nullable TKwredef, - n_visibility: nullable AVisibility, - n_methid: nullable AMethid, - n_signature: nullable ASignature + n_block: nullable AExpr ) 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_methid = n_methid.as(not null) - n_methid.parent = self - _n_signature = n_signature.as(not null) - n_signature.parent = self + _n_block = n_block + if n_block != null then n_block.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_methid == old_child then - n_methid = new_child.as(AMethid) - return - end - if _n_signature == old_child then - n_signature = new_child.as(ASignature) + if _n_block == old_child then + n_block = new_child.as(nullable AExpr) 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_methid=(node) - do - _n_methid = node - node.parent = self - end - redef fun n_signature=(node) + redef fun n_block=(node) do - _n_signature = node - node.parent = self + _n_block = node + if node != null then 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_methid) - v.enter_visit(_n_signature) + v.enter_visit(_n_block) end end -redef class ADeferredMethPropdef - init init_adeferredmethpropdef ( +redef class ATypePropdef + init init_atypepropdef ( n_doc: nullable ADoc, n_kwredef: nullable TKwredef, n_visibility: nullable AVisibility, - n_kwmeth: nullable TKwmeth, - n_methid: nullable AMethid, - n_signature: nullable ASignature, + n_kwtype: nullable TKwtype, + n_id: nullable TClassid, + n_type: nullable AType, n_annotations: nullable AAnnotations ) do @@ -1050,12 +953,12 @@ redef class ADeferredMethPropdef if n_kwredef != null then n_kwredef.parent = self _n_visibility = n_visibility.as(not null) n_visibility.parent = self - _n_kwmeth = n_kwmeth.as(not null) - n_kwmeth.parent = self - _n_methid = n_methid.as(not null) - n_methid.parent = self - _n_signature = n_signature.as(not null) - n_signature.parent = self + _n_kwtype = n_kwtype.as(not null) + n_kwtype.parent = self + _n_id = n_id.as(not null) + n_id.parent = self + _n_type = n_type.as(not null) + n_type.parent = self _n_annotations = n_annotations if n_annotations != null then n_annotations.parent = self end @@ -1074,16 +977,16 @@ redef class ADeferredMethPropdef n_visibility = new_child.as(AVisibility) return end - if _n_kwmeth == old_child then - n_kwmeth = new_child.as(TKwmeth) + if _n_kwtype == old_child then + n_kwtype = new_child.as(TKwtype) return end - if _n_methid == old_child then - n_methid = new_child.as(AMethid) + if _n_id == old_child then + n_id = new_child.as(TClassid) return end - if _n_signature == old_child then - n_signature = new_child.as(ASignature) + if _n_type == old_child then + n_type = new_child.as(AType) return end if _n_annotations == old_child then @@ -1107,19 +1010,19 @@ redef class ADeferredMethPropdef _n_visibility = node node.parent = self end - redef fun n_kwmeth=(node) + redef fun n_kwtype=(node) do - _n_kwmeth = node + _n_kwtype = node node.parent = self end - redef fun n_methid=(node) + redef fun n_id=(node) do - _n_methid = node + _n_id = node node.parent = self end - redef fun n_signature=(node) + redef fun n_type=(node) do - _n_signature = node + _n_type = node node.parent = self end redef fun n_annotations=(node) @@ -1134,490 +1037,26 @@ redef class ADeferredMethPropdef v.enter_visit(_n_doc) v.enter_visit(_n_kwredef) v.enter_visit(_n_visibility) - v.enter_visit(_n_kwmeth) - v.enter_visit(_n_methid) - v.enter_visit(_n_signature) - v.enter_visit(_n_annotations) - end -end -redef class AInternMethPropdef - init init_ainternmethpropdef ( - n_doc: nullable ADoc, - n_kwredef: nullable TKwredef, - n_visibility: nullable AVisibility, - n_kwmeth: nullable TKwmeth, - 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_kwmeth = n_kwmeth.as(not null) - n_kwmeth.parent = self - _n_methid = n_methid.as(not null) - 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_kwmeth == old_child then - n_kwmeth = new_child.as(TKwmeth) - return - end - if _n_methid == old_child then - n_methid = new_child.as(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_kwmeth=(node) - do - _n_kwmeth = node - node.parent = self - end - redef fun n_methid=(node) - do - _n_methid = node - 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_kwmeth) - v.enter_visit(_n_methid) - v.enter_visit(_n_signature) - end -end -redef class AExternMethPropdef - init init_aexternmethpropdef ( - n_doc: nullable ADoc, - n_kwredef: nullable TKwredef, - n_visibility: nullable AVisibility, - n_kwmeth: nullable TKwmeth, - n_methid: nullable AMethid, - n_signature: nullable ASignature, - n_extern: nullable TString, - n_extern_calls: nullable AExternCalls, - n_extern_code_block: nullable AExternCodeBlock - ) - 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_kwmeth = n_kwmeth.as(not null) - n_kwmeth.parent = self - _n_methid = n_methid.as(not null) - n_methid.parent = self - _n_signature = n_signature.as(not null) - n_signature.parent = self - _n_extern = n_extern - if n_extern != null then n_extern.parent = self - _n_extern_calls = n_extern_calls - 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 - 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_kwmeth == old_child then - n_kwmeth = new_child.as(TKwmeth) - return - end - if _n_methid == old_child then - n_methid = new_child.as(AMethid) - return - end - if _n_signature == old_child then - n_signature = new_child.as(ASignature) - return - end - if _n_extern == old_child then - n_extern = new_child.as(nullable TString) - return - end - if _n_extern_calls == old_child then - n_extern_calls = new_child.as(nullable AExternCalls) - return - end - if _n_extern_code_block == old_child then - n_extern_code_block = new_child.as(nullable AExternCodeBlock) - 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_kwmeth=(node) - do - _n_kwmeth = node - node.parent = self - end - redef fun n_methid=(node) - do - _n_methid = node - node.parent = self - end - redef fun n_signature=(node) - do - _n_signature = node - node.parent = self - end - redef fun n_extern=(node) - do - _n_extern = node - if node != null then node.parent = self - end - redef fun n_extern_calls=(node) - do - _n_extern_calls = node - if node != null then node.parent = self - end - redef fun n_extern_code_block=(node) - do - _n_extern_code_block = node - if node != null then 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_kwmeth) - v.enter_visit(_n_methid) - v.enter_visit(_n_signature) - v.enter_visit(_n_extern) - v.enter_visit(_n_extern_calls) - v.enter_visit(_n_extern_code_block) - end -end -redef class AConcreteMethPropdef - init init_aconcretemethpropdef ( - n_doc: nullable ADoc, - n_kwredef: nullable TKwredef, - n_visibility: nullable AVisibility, - n_kwmeth: nullable TKwmeth, - n_methid: nullable AMethid, - n_signature: nullable ASignature, - n_annotations: nullable AAnnotations, - n_block: nullable AExpr - ) - 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_kwmeth = n_kwmeth.as(not null) - n_kwmeth.parent = self - _n_methid = n_methid.as(not null) - 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_block = n_block - if n_block != null then n_block.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_kwmeth == old_child then - n_kwmeth = new_child.as(TKwmeth) - return - end - if _n_methid == old_child then - n_methid = new_child.as(AMethid) - return - end - if _n_signature == old_child then - 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_block == old_child then - n_block = new_child.as(nullable AExpr) - 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_kwmeth=(node) - do - _n_kwmeth = node - node.parent = self - end - redef fun n_methid=(node) - do - _n_methid = node - node.parent = self - end - redef fun n_signature=(node) - do - _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_block=(node) - do - _n_block = node - if node != null then 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_kwmeth) - v.enter_visit(_n_methid) - v.enter_visit(_n_signature) - v.enter_visit(_n_annotations) - v.enter_visit(_n_block) - end -end -redef class AConcreteInitPropdef - init init_aconcreteinitpropdef ( - n_doc: nullable ADoc, - n_kwredef: nullable TKwredef, - n_visibility: nullable AVisibility, - n_kwinit: nullable TKwinit, - n_methid: nullable AMethid, - n_signature: nullable ASignature, - n_annotations: nullable AAnnotations, - n_block: nullable AExpr - ) - 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_kwinit = n_kwinit.as(not null) - n_kwinit.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 - _n_annotations = n_annotations - if n_annotations != null then n_annotations.parent = self - _n_block = n_block - if n_block != null then n_block.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_kwinit == old_child then - n_kwinit = new_child.as(TKwinit) - 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 - if _n_annotations == old_child then - n_annotations = new_child.as(nullable AAnnotations) - return - end - if _n_block == old_child then - n_block = new_child.as(nullable AExpr) - 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_kwinit=(node) - do - _n_kwinit = 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 n_annotations=(node) - do - _n_annotations = 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 visit_all(v: Visitor) - do - v.enter_visit(_n_doc) - v.enter_visit(_n_kwredef) - v.enter_visit(_n_visibility) - v.enter_visit(_n_kwinit) - v.enter_visit(_n_methid) - v.enter_visit(_n_signature) + v.enter_visit(_n_kwtype) + v.enter_visit(_n_id) + v.enter_visit(_n_type) v.enter_visit(_n_annotations) - v.enter_visit(_n_block) end end -redef class AExternInitPropdef - init init_aexterninitpropdef ( +redef class AMethPropdef + init init_amethpropdef ( n_doc: nullable ADoc, n_kwredef: nullable TKwredef, n_visibility: nullable AVisibility, + n_kwmeth: nullable TKwmeth, + n_kwinit: nullable TKwinit, n_kwnew: nullable TKwnew, n_methid: nullable AMethid, n_signature: nullable ASignature, - n_extern: nullable TString, + n_annotations: nullable AAnnotations, n_extern_calls: nullable AExternCalls, - n_extern_code_block: nullable AExternCodeBlock + n_extern_code_block: nullable AExternCodeBlock, + n_block: nullable AExpr ) do _n_doc = n_doc @@ -1626,18 +1065,24 @@ redef class AExternInitPropdef 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_kwmeth = n_kwmeth + if n_kwmeth != null then n_kwmeth.parent = self + _n_kwinit = n_kwinit + if n_kwinit != null then n_kwinit.parent = self + _n_kwnew = n_kwnew + if n_kwnew != null then 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 - _n_extern = n_extern - if n_extern != null then n_extern.parent = self + _n_annotations = n_annotations + if n_annotations != null then n_annotations.parent = self _n_extern_calls = n_extern_calls 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_block = n_block + if n_block != null then n_block.parent = self end redef fun replace_child(old_child: ANode, new_child: nullable ANode) @@ -1654,8 +1099,16 @@ redef class AExternInitPropdef n_visibility = new_child.as(AVisibility) return end + if _n_kwmeth == old_child then + n_kwmeth = new_child.as(nullable TKwmeth) + return + end + if _n_kwinit == old_child then + n_kwinit = new_child.as(nullable TKwinit) + return + end if _n_kwnew == old_child then - n_kwnew = new_child.as(TKwnew) + n_kwnew = new_child.as(nullable TKwnew) return end if _n_methid == old_child then @@ -1666,8 +1119,8 @@ redef class AExternInitPropdef n_signature = new_child.as(ASignature) return end - if _n_extern == old_child then - n_extern = new_child.as(nullable TString) + if _n_annotations == old_child then + n_annotations = new_child.as(nullable AAnnotations) return end if _n_extern_calls == old_child then @@ -1678,6 +1131,10 @@ redef class AExternInitPropdef n_extern_code_block = new_child.as(nullable AExternCodeBlock) return end + if _n_block == old_child then + n_block = new_child.as(nullable AExpr) + return + end end redef fun n_doc=(node) @@ -1695,10 +1152,20 @@ redef class AExternInitPropdef _n_visibility = node node.parent = self end + redef fun n_kwmeth=(node) + do + _n_kwmeth = node + if node != null then node.parent = self + end + redef fun n_kwinit=(node) + do + _n_kwinit = node + if node != null then node.parent = self + end redef fun n_kwnew=(node) do _n_kwnew = node - node.parent = self + if node != null then node.parent = self end redef fun n_methid=(node) do @@ -1710,9 +1177,9 @@ redef class AExternInitPropdef _n_signature = node node.parent = self end - redef fun n_extern=(node) + redef fun n_annotations=(node) do - _n_extern = node + _n_annotations = node if node != null then node.parent = self end redef fun n_extern_calls=(node) @@ -1725,6 +1192,11 @@ redef class AExternInitPropdef _n_extern_code_block = 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 visit_all(v: Visitor) @@ -1732,63 +1204,23 @@ redef class AExternInitPropdef v.enter_visit(_n_doc) v.enter_visit(_n_kwredef) v.enter_visit(_n_visibility) + v.enter_visit(_n_kwmeth) + v.enter_visit(_n_kwinit) v.enter_visit(_n_kwnew) v.enter_visit(_n_methid) v.enter_visit(_n_signature) - v.enter_visit(_n_extern) + v.enter_visit(_n_annotations) v.enter_visit(_n_extern_calls) v.enter_visit(_n_extern_code_block) - end -end -redef class AMainMethPropdef - init init_amainmethpropdef ( - n_kwredef: nullable TKwredef, - n_block: nullable AExpr - ) - do - _n_kwredef = n_kwredef - if n_kwredef != null then n_kwredef.parent = self - _n_block = n_block - if n_block != null then n_block.parent = self - end - - redef fun replace_child(old_child: ANode, new_child: nullable ANode) - do - if _n_kwredef == old_child then - n_kwredef = new_child.as(nullable TKwredef) - return - end - if _n_block == old_child then - n_block = new_child.as(nullable AExpr) - return - end - end - - redef fun n_kwredef=(node) - do - _n_kwredef = 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 visit_all(v: Visitor) - do - v.enter_visit(_n_kwredef) v.enter_visit(_n_block) end end -redef class ATypePropdef - init init_atypepropdef ( +redef class ASuperPropdef + init init_asuperpropdef ( n_doc: nullable ADoc, n_kwredef: nullable TKwredef, n_visibility: nullable AVisibility, - n_kwtype: nullable TKwtype, - n_id: nullable TClassid, + n_kwsuper: nullable TKwsuper, n_type: nullable AType, n_annotations: nullable AAnnotations ) @@ -1799,10 +1231,8 @@ redef class ATypePropdef if n_kwredef != null then n_kwredef.parent = self _n_visibility = n_visibility.as(not null) n_visibility.parent = self - _n_kwtype = n_kwtype.as(not null) - n_kwtype.parent = self - _n_id = n_id.as(not null) - n_id.parent = self + _n_kwsuper = n_kwsuper.as(not null) + n_kwsuper.parent = self _n_type = n_type.as(not null) n_type.parent = self _n_annotations = n_annotations @@ -1823,12 +1253,8 @@ redef class ATypePropdef n_visibility = new_child.as(AVisibility) return end - if _n_kwtype == old_child then - n_kwtype = new_child.as(TKwtype) - return - end - if _n_id == old_child then - n_id = new_child.as(TClassid) + if _n_kwsuper == old_child then + n_kwsuper = new_child.as(TKwsuper) return end if _n_type == old_child then @@ -1843,111 +1269,81 @@ redef class ATypePropdef 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_kwtype=(node) - do - _n_kwtype = node - node.parent = self - end - redef fun n_id=(node) - do - _n_id = node - node.parent = self - end - redef fun n_type=(node) - do - _n_type = 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_doc) - v.enter_visit(_n_kwredef) - v.enter_visit(_n_visibility) - v.enter_visit(_n_kwtype) - v.enter_visit(_n_id) - v.enter_visit(_n_type) - v.enter_visit(_n_annotations) - end -end -redef class AReadAble - init init_areadable ( - n_kwredef: nullable TKwredef, - n_kwreadable: nullable TKwreadable - ) - do - _n_kwredef = n_kwredef - if n_kwredef != null then n_kwredef.parent = self - _n_kwreadable = n_kwreadable.as(not null) - n_kwreadable.parent = self - end - - redef fun replace_child(old_child: ANode, new_child: nullable ANode) - do - if _n_kwredef == old_child then - n_kwredef = new_child.as(nullable TKwredef) - return - end - if _n_kwreadable == old_child then - n_kwreadable = new_child.as(TKwreadable) - return - end + _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_kwreadable=(node) + redef fun n_visibility=(node) + do + _n_visibility = node + node.parent = self + end + redef fun n_kwsuper=(node) + do + _n_kwsuper = node + node.parent = self + end + redef fun n_type=(node) do - _n_kwreadable = node + _n_type = 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_doc) v.enter_visit(_n_kwredef) - v.enter_visit(_n_kwreadable) + v.enter_visit(_n_visibility) + v.enter_visit(_n_kwsuper) + v.enter_visit(_n_type) + v.enter_visit(_n_annotations) end end -redef class AWriteAble - init init_awriteable ( +redef class AAnnotPropdef + init init_aannotpropdef ( + n_doc: nullable ADoc, n_kwredef: nullable TKwredef, n_visibility: nullable AVisibility, - n_kwwritable: nullable TKwwritable + 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_kwwritable = n_kwwritable.as(not null) - n_kwwritable.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 @@ -1956,12 +1352,30 @@ redef class AWriteAble n_visibility = new_child.as(nullable AVisibility) return end - if _n_kwwritable == old_child then - n_kwwritable = new_child.as(TKwwritable) + 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 + 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 @@ -1972,18 +1386,38 @@ redef class AWriteAble _n_visibility = node if node != null then node.parent = self end - redef fun n_kwwritable=(node) + redef fun n_atid=(node) do - _n_kwwritable = node + _n_atid = node node.parent = self end + redef fun n_opar=(node) + do + _n_opar = node + if node != null then node.parent = self + end + redef fun n_cpar=(node) + do + _n_cpar = node + if node != null then 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_doc) v.enter_visit(_n_kwredef) v.enter_visit(_n_visibility) - v.enter_visit(_n_kwwritable) + v.enter_visit(_n_atid) + v.enter_visit(_n_opar) + n_args.visit_all(v) + v.enter_visit(_n_cpar) + v.enter_visit(_n_annotations) end end redef class AIdMethid @@ -2102,6 +1536,35 @@ redef class AStarMethid v.enter_visit(_n_star) end end +redef class AStarstarMethid + init init_astarstarmethid ( + n_starstar: nullable TStarstar + ) + do + _n_starstar = n_starstar.as(not null) + n_starstar.parent = self + end + + redef fun replace_child(old_child: ANode, new_child: nullable ANode) + do + if _n_starstar == old_child then + n_starstar = new_child.as(TStarstar) + return + end + end + + redef fun n_starstar=(node) + do + _n_starstar = node + node.parent = self + end + + + redef fun visit_all(v: Visitor) + do + v.enter_visit(_n_starstar) + end +end redef class ASlashMethid init init_aslashmethid ( n_slash: nullable TSlash @@ -2570,7 +2033,7 @@ redef class ASignature 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 @@ -2583,7 +2046,7 @@ redef class ASignature 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 @@ -2614,7 +2077,7 @@ redef class ASignature 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 @@ -2699,7 +2162,7 @@ redef class AType 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 @@ -2714,7 +2177,7 @@ redef class AType 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 @@ -2742,7 +2205,7 @@ redef class AType 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 @@ -2754,8 +2217,8 @@ redef class ALabel 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) @@ -2765,7 +2228,7 @@ redef class ALabel return end if _n_id == old_child then - n_id = new_child.as(TId) + n_id = new_child.as(nullable TId) return end end @@ -2778,7 +2241,7 @@ redef class ALabel redef fun n_id=(node) do _n_id = node - node.parent = self + if node != null then node.parent = self end @@ -2794,14 +2257,14 @@ redef class ABlockExpr 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 @@ -2817,7 +2280,7 @@ redef class ABlockExpr redef fun visit_all(v: Visitor) do - _n_expr.visit_all(v) + n_expr.visit_all(v) v.enter_visit(_n_kwend) end end @@ -2831,8 +2294,8 @@ redef class AVardeclExpr n_annotations: nullable AAnnotations ) do - _n_kwvar = n_kwvar.as(not null) - n_kwvar.parent = self + _n_kwvar = n_kwvar + if n_kwvar != null then n_kwvar.parent = self _n_id = n_id.as(not null) n_id.parent = self _n_type = n_type @@ -2848,7 +2311,7 @@ redef class AVardeclExpr redef fun replace_child(old_child: ANode, new_child: nullable ANode) do if _n_kwvar == old_child then - n_kwvar = new_child.as(TKwvar) + n_kwvar = new_child.as(nullable TKwvar) return end if _n_id == old_child then @@ -2876,7 +2339,7 @@ redef class AVardeclExpr redef fun n_kwvar=(node) do _n_kwvar = node - node.parent = self + if node != null then node.parent = self end redef fun n_id=(node) do @@ -2960,16 +2423,13 @@ 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) @@ -2982,10 +2442,6 @@ redef class ABreakExpr 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) @@ -2998,18 +2454,12 @@ redef class ABreakExpr _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 @@ -3044,16 +2494,13 @@ end 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) @@ -3066,10 +2513,6 @@ redef class AContinueExpr 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) @@ -3082,18 +2525,12 @@ redef class AContinueExpr _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 @@ -3461,7 +2898,7 @@ redef class AForExpr 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) @@ -3478,7 +2915,7 @@ redef class AForExpr 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 @@ -3527,7 +2964,88 @@ redef class AForExpr 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) + v.enter_visit(_n_label) + end +end +redef class AWithExpr + init init_awithexpr ( + n_kwwith: nullable TKwwith, + n_expr: nullable AExpr, + n_kwdo: nullable TKwdo, + n_block: nullable AExpr, + n_label: nullable ALabel + ) + do + _n_kwwith = n_kwwith.as(not null) + n_kwwith.parent = self + _n_expr = n_expr.as(not null) + n_expr.parent = self + _n_kwdo = n_kwdo.as(not null) + n_kwdo.parent = self + _n_block = n_block + if n_block != null then n_block.parent = self + _n_label = n_label + if n_label != null then n_label.parent = self + end + + redef fun replace_child(old_child: ANode, new_child: nullable ANode) + do + if _n_kwwith == old_child then + n_kwwith = new_child.as(TKwwith) + return + end + if _n_expr == old_child then + n_expr = new_child.as(AExpr) + return + end + if _n_kwdo == old_child then + n_kwdo = new_child.as(TKwdo) + return + end + if _n_block == old_child then + n_block = new_child.as(nullable AExpr) + return + end + if _n_label == old_child then + n_label = new_child.as(nullable ALabel) + return + end + end + + redef fun n_kwwith=(node) + do + _n_kwwith = node + node.parent = self + end + redef fun n_expr=(node) + do + _n_expr = node + node.parent = self + end + redef fun n_kwdo=(node) + do + _n_kwdo = node + node.parent = self + end + redef fun n_block=(node) + do + _n_block = node + if node != null then node.parent = self + end + redef fun n_label=(node) + do + _n_label = node + if node != null then node.parent = self + end + + + redef fun visit_all(v: Visitor) + do + v.enter_visit(_n_kwwith) v.enter_visit(_n_expr) v.enter_visit(_n_kwdo) v.enter_visit(_n_block) @@ -4264,13 +3782,55 @@ end redef class AIsaExpr init init_aisaexpr ( n_expr: nullable AExpr, - n_type: nullable AType + n_type: nullable AType + ) + do + _n_expr = n_expr.as(not null) + n_expr.parent = self + _n_type = n_type.as(not null) + n_type.parent = self + end + + redef fun replace_child(old_child: ANode, new_child: nullable ANode) + do + if _n_expr == old_child then + n_expr = new_child.as(AExpr) + return + end + if _n_type == old_child then + n_type = new_child.as(AType) + return + end + 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_expr) + v.enter_visit(_n_type) + end +end +redef class APlusExpr + init init_aplusexpr ( + n_expr: nullable AExpr, + n_expr2: nullable AExpr ) do _n_expr = n_expr.as(not null) n_expr.parent = self - _n_type = n_type.as(not null) - n_type.parent = self + _n_expr2 = n_expr2.as(not null) + n_expr2.parent = self end redef fun replace_child(old_child: ANode, new_child: nullable ANode) @@ -4279,8 +3839,8 @@ redef class AIsaExpr n_expr = new_child.as(AExpr) return end - if _n_type == old_child then - n_type = new_child.as(AType) + if _n_expr2 == old_child then + n_expr2 = new_child.as(AExpr) return end end @@ -4290,9 +3850,9 @@ redef class AIsaExpr _n_expr = node node.parent = self end - redef fun n_type=(node) + redef fun n_expr2=(node) do - _n_type = node + _n_expr2 = node node.parent = self end @@ -4300,11 +3860,11 @@ redef class AIsaExpr redef fun visit_all(v: Visitor) do v.enter_visit(_n_expr) - v.enter_visit(_n_type) + v.enter_visit(_n_expr2) end end -redef class APlusExpr - init init_aplusexpr ( +redef class AMinusExpr + init init_aminusexpr ( n_expr: nullable AExpr, n_expr2: nullable AExpr ) @@ -4345,8 +3905,8 @@ redef class APlusExpr v.enter_visit(_n_expr2) end end -redef class AMinusExpr - init init_aminusexpr ( +redef class AStarshipExpr + init init_astarshipexpr ( n_expr: nullable AExpr, n_expr2: nullable AExpr ) @@ -4387,8 +3947,8 @@ redef class AMinusExpr v.enter_visit(_n_expr2) end end -redef class AStarshipExpr - init init_astarshipexpr ( +redef class AStarExpr + init init_astarexpr ( n_expr: nullable AExpr, n_expr2: nullable AExpr ) @@ -4429,8 +3989,8 @@ redef class AStarshipExpr v.enter_visit(_n_expr2) end end -redef class AStarExpr - init init_astarexpr ( +redef class AStarstarExpr + init init_astarstarexpr ( n_expr: nullable AExpr, n_expr2: nullable AExpr ) @@ -5706,20 +5266,37 @@ redef class AOrangeExpr end redef class AArrayExpr init init_aarrayexpr ( - n_exprs: nullable AExprs, + n_obra: nullable TObra, + n_exprs: Collection[Object], # Should be Collection[AExpr] + n_type: nullable AType, + n_cbra: nullable TCbra, n_annotations: nullable AAnnotations ) do - _n_exprs = n_exprs.as(not null) - n_exprs.parent = self + _n_obra = n_obra.as(not null) + n_obra.parent = self + self.n_exprs.unsafe_add_all(n_exprs) + _n_type = n_type + if n_type != null then n_type.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 redef fun replace_child(old_child: ANode, new_child: nullable ANode) do - if _n_exprs == old_child then - n_exprs = new_child.as(AExprs) + if _n_obra == old_child then + n_obra = new_child.as(TObra) + return + end + if n_exprs.replace_child(old_child, new_child) then return + if _n_type == old_child then + n_type = new_child.as(nullable AType) + return + end + if _n_cbra == old_child then + n_cbra = new_child.as(TCbra) return end if _n_annotations == old_child then @@ -5728,9 +5305,19 @@ redef class AArrayExpr end end - redef fun n_exprs=(node) + redef fun n_obra=(node) + do + _n_obra = node + node.parent = self + end + redef fun n_type=(node) + do + _n_type = node + if node != null then node.parent = self + end + redef fun n_cbra=(node) do - _n_exprs = node + _n_cbra = node node.parent = self end redef fun n_annotations=(node) @@ -5742,7 +5329,10 @@ redef class AArrayExpr redef fun visit_all(v: Visitor) do - v.enter_visit(_n_exprs) + v.enter_visit(_n_obra) + n_exprs.visit_all(v) + v.enter_visit(_n_type) + v.enter_visit(_n_cbra) v.enter_visit(_n_annotations) end end @@ -6232,14 +5822,14 @@ redef class ASuperstringExpr 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 @@ -6255,7 +5845,7 @@ redef class ASuperstringExpr redef fun visit_all(v: Visitor) do - _n_exprs.visit_all(v) + n_exprs.visit_all(v) v.enter_visit(_n_annotations) end end @@ -6494,23 +6084,214 @@ redef class AAsNotnullExpr 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) + 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 + init init_aissetattrexpr ( + n_kwisset: nullable TKwisset, + n_expr: nullable AExpr, + n_id: nullable TAttrid + ) + do + _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 + n_kwisset = new_child.as(TKwisset) + return + end + if _n_expr == old_child then + n_expr = new_child.as(AExpr) + return + end + if _n_id == old_child then + n_id = new_child.as(TAttrid) + 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 + init init_adebugtypeexpr ( + n_kwdebug: nullable TKwdebug, + n_kwtype: nullable TKwtype, + n_expr: nullable AExpr, + n_type: nullable AType + ) + do + _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 + n_kwdebug = new_child.as(TKwdebug) + return + end + if _n_kwtype == old_child then + n_kwtype = new_child.as(TKwtype) + return + end + if _n_expr == old_child then + n_expr = new_child.as(AExpr) + return + end + if _n_type == old_child then + n_type = new_child.as(AType) + 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 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 ATypeExpr + init init_atypeexpr ( + n_type: nullable AType + ) + do + _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_type == old_child then + n_type = new_child.as(AType) + return + end + 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_type) end end -redef class AIssetAttrExpr - init init_aissetattrexpr ( - n_kwisset: nullable TKwisset, +redef class AMethidExpr + init init_amethidexpr ( n_expr: nullable AExpr, - n_id: nullable TAttrid + n_id: nullable AMethid ) do - _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) @@ -6519,25 +6300,16 @@ redef class AIssetAttrExpr redef fun replace_child(old_child: ANode, new_child: nullable ANode) do - if _n_kwisset == old_child then - n_kwisset = new_child.as(TKwisset) - return - end if _n_expr == old_child then n_expr = new_child.as(AExpr) return end if _n_id == old_child then - n_id = new_child.as(TAttrid) + n_id = new_child.as(AMethid) 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 @@ -6552,77 +6324,57 @@ redef class AIssetAttrExpr 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 - init init_adebugtypeexpr ( - n_kwdebug: nullable TKwdebug, - n_kwtype: nullable TKwtype, - n_expr: nullable AExpr, - n_type: nullable AType +redef class AAtExpr + init init_aatexpr ( + n_annotations: nullable AAnnotations ) do - _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 + _n_annotations = n_annotations.as(not null) + n_annotations.parent = self end redef fun replace_child(old_child: ANode, new_child: nullable ANode) do - if _n_kwdebug == old_child then - n_kwdebug = new_child.as(TKwdebug) - return - end - if _n_kwtype == old_child then - n_kwtype = new_child.as(TKwtype) - return - end - if _n_expr == old_child then - n_expr = new_child.as(AExpr) - return - end - if _n_type == old_child then - n_type = new_child.as(AType) + if _n_annotations == old_child then + n_annotations = new_child.as(AAnnotations) return end end - redef fun n_kwdebug=(node) + redef fun n_annotations=(node) do - _n_kwdebug = node + _n_annotations = node node.parent = self end - redef fun n_kwtype=(node) + + + redef fun visit_all(v: Visitor) do - _n_kwtype = node - node.parent = self + v.enter_visit(_n_annotations) end - redef fun n_expr=(node) +end +redef class AManyExpr + init init_amanyexpr ( + n_exprs: Collection[Object] # Should be Collection[AExpr] + ) do - _n_expr = node - node.parent = self + self.n_exprs.unsafe_add_all(n_exprs) end - redef fun n_type=(node) + + redef fun replace_child(old_child: ANode, new_child: nullable ANode) do - _n_type = node - node.parent = self + if n_exprs.replace_child(old_child, new_child) then return 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) + n_exprs.visit_all(v) end end redef class AListExprs @@ -6630,19 +6382,19 @@ redef class 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 @@ -6654,7 +6406,7 @@ 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 @@ -6665,7 +6417,7 @@ redef class AParExprs 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 @@ -6687,7 +6439,7 @@ redef class AParExprs 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 @@ -6700,7 +6452,7 @@ redef class ABraExprs 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 @@ -6711,7 +6463,7 @@ redef class ABraExprs 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 @@ -6733,7 +6485,7 @@ redef class ABraExprs 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 @@ -6804,7 +6556,7 @@ redef class AModuleName 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 @@ -6815,7 +6567,7 @@ redef class AModuleName 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 @@ -6837,7 +6589,7 @@ redef class AModuleName 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 @@ -6849,7 +6601,7 @@ redef class AExternCalls 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) @@ -6858,7 +6610,7 @@ redef class AExternCalls 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) @@ -6871,7 +6623,7 @@ redef class AExternCalls 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 @@ -7312,14 +7064,14 @@ redef class AQualified 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 @@ -7335,7 +7087,7 @@ redef class AQualified redef fun visit_all(v: Visitor) do - _n_id.visit_all(v) + n_id.visit_all(v) v.enter_visit(_n_classid) end end @@ -7344,19 +7096,19 @@ redef class ADoc 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 @@ -7371,7 +7123,7 @@ 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 @@ -7386,7 +7138,7 @@ redef class AAnnotations 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 @@ -7414,24 +7166,33 @@ redef class AAnnotations 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_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 - _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 @@ -7440,6 +7201,18 @@ redef class AAnnotation 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 @@ -7448,7 +7221,7 @@ redef class AAnnotation 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 @@ -7459,6 +7232,21 @@ redef class AAnnotation 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 @@ -7483,100 +7271,16 @@ redef class AAnnotation 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 end -redef class ATypeAtArg - init init_atypeatarg ( - n_type: nullable AType - ) - do - _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_type == old_child then - n_type = new_child.as(AType) - return - end - 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_type) - end -end -redef class AExprAtArg - init init_aexpratarg ( - n_expr: nullable AExpr - ) - do - _n_expr = n_expr.as(not null) - n_expr.parent = self - end - - redef fun replace_child(old_child: ANode, new_child: nullable ANode) - do - if _n_expr == old_child then - n_expr = new_child.as(AExpr) - return - end - end - - redef fun n_expr=(node) - do - _n_expr = node - node.parent = self - end - - - redef fun visit_all(v: Visitor) - do - v.enter_visit(_n_expr) - end -end -redef class AAtAtArg - init init_aatatarg ( - n_annotations: nullable AAnnotations - ) - do - _n_annotations = n_annotations.as(not null) - n_annotations.parent = self - end - - redef fun replace_child(old_child: ANode, new_child: nullable ANode) - do - if _n_annotations == old_child then - n_annotations = new_child.as(AAnnotations) - return - end - end - - redef fun n_annotations=(node) - do - _n_annotations = node - node.parent = self - end - - - redef fun visit_all(v: Visitor) - do - v.enter_visit(_n_annotations) - end -end redef class AIdAtid init init_aidatid ( n_id: nullable TId @@ -7635,67 +7339,9 @@ redef class AKwexternAtid v.enter_visit(_n_id) end end -redef class AKwinternAtid - init init_akwinternatid ( - n_id: nullable TKwintern - ) - do - _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 - n_id = new_child.as(TKwintern) - 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 AKwreadableAtid - init init_akwreadableatid ( - n_id: nullable TKwreadable - ) - do - _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 - n_id = new_child.as(TKwreadable) - 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 AKwwritableAtid - init init_akwwritableatid ( - n_id: nullable TKwwritable +redef class AKwabstractAtid + init init_akwabstractatid ( + n_id: nullable TKwabstract ) do _n_id = n_id.as(not null) @@ -7705,7 +7351,7 @@ redef class AKwwritableAtid redef fun replace_child(old_child: ANode, new_child: nullable ANode) do if _n_id == old_child then - n_id = new_child.as(TKwwritable) + n_id = new_child.as(TKwabstract) return end end