# Production AST nodes full definition.
-# This file was generated by SableCC (http://www.sablecc.org/).
+# This file was generated by SableCC (http://www.sablecc.org/).
package parser_prod
import lexer
# Visit all nodes in reverse order.
# Thus, call "v.visit(e)" for each node e starting from the last child
fun visit_all_reverse(v: Visitor) is abstract
-
- # Debug method: output a message prefixed with the location.
- fun printl(str: String)
- do
- if location == null then
- print("???: {str}\n")
- else
- print("{location}: {str}\n")
- end
- end
end
redef class Token
end
redef class Prod
- # The first token of the production node
- readable writable var _first_token: nullable Token
-
- # The last token of the production node
- readable writable var _last_token: nullable Token
-
redef fun replace_with(n: ANode)
do
super
assert n isa Prod
- n.first_token = first_token
- n.last_token = last_token
n.location = location
end
end
private init empty_init do end
init init_amodule (
- n_packagedecl: nullable APackagedecl ,
- n_imports: Collection[Object] , # Should be Collection[AImport]
- n_classdefs: Collection[Object] # Should be Collection[AClassdef]
+ n_packagedecl: nullable APackagedecl,
+ n_imports: Collection[Object], # Should be Collection[AImport]
+ n_classdefs: Collection[Object] # Should be Collection[AClassdef]
)
do
empty_init
private init empty_init do end
init init_apackagedecl (
- n_doc: nullable ADoc ,
- n_kwpackage: nullable TKwpackage ,
- n_id: nullable TId
+ n_doc: nullable ADoc,
+ n_kwpackage: nullable TKwpackage,
+ n_id: nullable TId
)
do
empty_init
private init empty_init do end
init init_astdimport (
- n_visibility: nullable AVisibility ,
- n_kwimport: nullable TKwimport ,
- n_id: nullable TId
+ n_visibility: nullable AVisibility,
+ n_kwimport: nullable TKwimport,
+ n_id: nullable TId
)
do
empty_init
private init empty_init do end
init init_anoimport (
- n_visibility: nullable AVisibility ,
- n_kwimport: nullable TKwimport ,
- n_kwend: nullable TKwend
+ n_visibility: nullable AVisibility,
+ n_kwimport: nullable TKwimport,
+ n_kwend: nullable TKwend
)
do
empty_init
private init empty_init do end
init init_aprivatevisibility (
- n_kwprivate: nullable TKwprivate
+ n_kwprivate: nullable TKwprivate
)
do
empty_init
private init empty_init do end
init init_aprotectedvisibility (
- n_kwprotected: nullable TKwprotected
+ n_kwprotected: nullable TKwprotected
)
do
empty_init
private init empty_init do end
init init_aintrudevisibility (
- n_kwintrude: nullable TKwintrude
+ n_kwintrude: nullable TKwintrude
)
do
empty_init
private init empty_init do end
init init_astdclassdef (
- n_doc: nullable ADoc ,
- n_kwredef: nullable TKwredef ,
- n_visibility: nullable AVisibility ,
- n_classkind: nullable AClasskind ,
- n_id: nullable TClassid ,
- n_formaldefs: Collection[Object] , # Should be Collection[AFormaldef]
- n_superclasses: Collection[Object] , # Should be Collection[ASuperclass]
- n_propdefs: Collection[Object] # Should be Collection[APropdef]
+ n_doc: nullable ADoc,
+ n_kwredef: nullable TKwredef,
+ n_visibility: nullable AVisibility,
+ n_classkind: nullable AClasskind,
+ n_id: nullable TClassid,
+ n_formaldefs: Collection[Object], # Should be Collection[AFormaldef]
+ n_superclasses: Collection[Object], # Should be Collection[ASuperclass]
+ n_propdefs: Collection[Object] # Should be Collection[APropdef]
)
do
empty_init
private init empty_init do end
init init_atopclassdef (
- n_propdefs: Collection[Object] # Should be Collection[APropdef]
+ n_propdefs: Collection[Object] # Should be Collection[APropdef]
)
do
empty_init
private init empty_init do end
init init_amainclassdef (
- n_propdefs: Collection[Object] # Should be Collection[APropdef]
+ n_propdefs: Collection[Object] # Should be Collection[APropdef]
)
do
empty_init
private init empty_init do end
init init_aconcreteclasskind (
- n_kwclass: nullable TKwclass
+ n_kwclass: nullable TKwclass
)
do
empty_init
private init empty_init do end
init init_aabstractclasskind (
- n_kwabstract: nullable TKwabstract ,
- n_kwclass: nullable TKwclass
+ n_kwabstract: nullable TKwabstract,
+ n_kwclass: nullable TKwclass
)
do
empty_init
private init empty_init do end
init init_ainterfaceclasskind (
- n_kwinterface: nullable TKwinterface
+ n_kwinterface: nullable TKwinterface
)
do
empty_init
private init empty_init do end
init init_auniversalclasskind (
- n_kwuniversal: nullable TKwuniversal
+ n_kwuniversal: nullable TKwuniversal
)
do
empty_init
private init empty_init do end
init init_aformaldef (
- n_id: nullable TClassid ,
- n_type: nullable AType
+ n_id: nullable TClassid,
+ n_type: nullable AType
)
do
empty_init
private init empty_init do end
init init_asuperclass (
- n_kwspecial: nullable TKwspecial ,
- n_type: nullable AType
+ n_kwspecial: nullable TKwspecial,
+ n_type: nullable AType
)
do
empty_init
_n_visibility = n
n.parent = self
end
- redef fun n_kwattr=(n)
- do
- _n_kwattr = n
- if n != null then
- n.parent = self
- end
- end
redef fun n_kwvar=(n)
do
_n_kwvar = n
- if n != null then
- n.parent = self
- end
+ n.parent = self
end
redef fun n_id=(n)
do
private init empty_init do end
init init_aattrpropdef (
- n_doc: nullable ADoc ,
- n_readable: nullable AAble ,
- n_writable: nullable AAble ,
- n_kwredef: nullable TKwredef ,
- n_visibility: nullable AVisibility ,
- n_kwattr: nullable TKwattr ,
- n_kwvar: nullable TKwvar ,
- n_id: nullable TAttrid ,
- n_type: nullable AType ,
- n_expr: nullable AExpr
+ 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_type: nullable AType,
+ n_expr: nullable AExpr
)
do
empty_init
end
_n_visibility = n_visibility.as(not null)
n_visibility.parent = self
- _n_kwattr = n_kwattr
- if n_kwattr != null then
- n_kwattr.parent = self
- end
- _n_kwvar = n_kwvar
- if n_kwvar != null then
- n_kwvar.parent = self
- end
+ _n_kwvar = n_kwvar.as(not null)
+ n_kwvar.parent = self
_n_id = n_id.as(not null)
n_id.parent = self
_n_type = n_type
end
return
end
- if _n_kwattr == old_child then
- if new_child != null then
- new_child.parent = self
- assert new_child isa TKwattr
- _n_kwattr = new_child
- else
- _n_kwattr = null
- end
- return
- end
if _n_kwvar == old_child then
if new_child != null then
new_child.parent = self
assert new_child isa TKwvar
_n_kwvar = new_child
else
- _n_kwvar = null
+ abort
end
return
end
v.enter_visit(_n_kwredef.as(not null))
end
v.enter_visit(_n_visibility)
- if _n_kwattr != null then
- v.enter_visit(_n_kwattr.as(not null))
- end
- if _n_kwvar != null then
- v.enter_visit(_n_kwvar.as(not null))
- end
+ v.enter_visit(_n_kwvar)
v.enter_visit(_n_id)
if _n_type != null then
v.enter_visit(_n_type.as(not null))
v.enter_visit(_n_kwredef.as(not null))
end
v.enter_visit(_n_visibility)
- if _n_kwattr != null then
- v.enter_visit(_n_kwattr.as(not null))
- end
- if _n_kwvar != null then
- v.enter_visit(_n_kwvar.as(not null))
- end
+ v.enter_visit(_n_kwvar)
v.enter_visit(_n_id)
if _n_type != null then
v.enter_visit(_n_type.as(not null))
private init empty_init do end
init init_amethpropdef (
- n_doc: nullable ADoc ,
- n_kwredef: nullable TKwredef ,
- n_visibility: nullable AVisibility ,
- n_methid: nullable AMethid ,
- n_signature: nullable ASignature
+ n_doc: nullable ADoc,
+ n_kwredef: nullable TKwredef,
+ n_visibility: nullable AVisibility,
+ n_methid: nullable AMethid,
+ n_signature: nullable ASignature
)
do
empty_init
private init empty_init do end
init init_adeferredmethpropdef (
- 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_doc: nullable ADoc,
+ n_kwredef: nullable TKwredef,
+ n_visibility: nullable AVisibility,
+ n_kwmeth: nullable TKwmeth,
+ n_methid: nullable AMethid,
+ n_signature: nullable ASignature
)
do
empty_init
private init empty_init do end
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
+ 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
empty_init
private init empty_init do end
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_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
)
do
empty_init
private init empty_init do end
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_block: nullable AExpr
+ 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_block: nullable AExpr
)
do
empty_init
private init empty_init do end
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_block: nullable AExpr
+ 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_block: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_amainmethpropdef (
- n_kwredef: nullable TKwredef ,
- n_block: nullable AExpr
+ n_kwredef: nullable TKwredef,
+ n_block: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_atypepropdef (
- n_doc: nullable ADoc ,
- n_kwredef: nullable TKwredef ,
- n_visibility: nullable AVisibility ,
- n_kwtype: nullable TKwtype ,
- n_id: nullable TClassid ,
- n_type: nullable AType
+ n_doc: nullable ADoc,
+ n_kwredef: nullable TKwredef,
+ n_visibility: nullable AVisibility,
+ n_kwtype: nullable TKwtype,
+ n_id: nullable TClassid,
+ n_type: nullable AType
)
do
empty_init
private init empty_init do end
init init_areadable (
- n_kwredef: nullable TKwredef ,
- n_kwreadable: nullable TKwreadable
+ n_kwredef: nullable TKwredef,
+ n_kwreadable: nullable TKwreadable
)
do
empty_init
private init empty_init do end
init init_awriteable (
- n_kwredef: nullable TKwredef ,
- n_kwwritable: nullable TKwwritable
+ n_kwredef: nullable TKwredef,
+ n_kwwritable: nullable TKwwritable
)
do
empty_init
private init empty_init do end
init init_aidmethid (
- n_id: nullable TId
+ n_id: nullable TId
)
do
empty_init
private init empty_init do end
init init_aplusmethid (
- n_plus: nullable TPlus
+ n_plus: nullable TPlus
)
do
empty_init
private init empty_init do end
init init_aminusmethid (
- n_minus: nullable TMinus
+ n_minus: nullable TMinus
)
do
empty_init
private init empty_init do end
init init_astarmethid (
- n_star: nullable TStar
+ n_star: nullable TStar
)
do
empty_init
private init empty_init do end
init init_aslashmethid (
- n_slash: nullable TSlash
+ n_slash: nullable TSlash
)
do
empty_init
private init empty_init do end
init init_apercentmethid (
- n_percent: nullable TPercent
+ n_percent: nullable TPercent
)
do
empty_init
private init empty_init do end
init init_aeqmethid (
- n_eq: nullable TEq
+ n_eq: nullable TEq
)
do
empty_init
private init empty_init do end
init init_anemethid (
- n_ne: nullable TNe
+ n_ne: nullable TNe
)
do
empty_init
private init empty_init do end
init init_alemethid (
- n_le: nullable TLe
+ n_le: nullable TLe
)
do
empty_init
private init empty_init do end
init init_agemethid (
- n_ge: nullable TGe
+ n_ge: nullable TGe
)
do
empty_init
private init empty_init do end
init init_altmethid (
- n_lt: nullable TLt
+ n_lt: nullable TLt
)
do
empty_init
private init empty_init do end
init init_agtmethid (
- n_gt: nullable TGt
+ n_gt: nullable TGt
)
do
empty_init
private init empty_init do end
init init_abramethid (
- n_obra: nullable TObra ,
- n_cbra: nullable TCbra
+ n_obra: nullable TObra,
+ n_cbra: nullable TCbra
)
do
empty_init
private init empty_init do end
init init_astarshipmethid (
- n_starship: nullable TStarship
+ n_starship: nullable TStarship
)
do
empty_init
private init empty_init do end
init init_aassignmethid (
- n_id: nullable TId ,
- n_assign: nullable TAssign
+ n_id: nullable TId,
+ n_assign: nullable TAssign
)
do
empty_init
private init empty_init do end
init init_abraassignmethid (
- n_obra: nullable TObra ,
- n_cbra: nullable TCbra ,
- n_assign: nullable TAssign
+ n_obra: nullable TObra,
+ n_cbra: nullable TCbra,
+ n_assign: nullable TAssign
)
do
empty_init
private init empty_init do end
init init_asignature (
- n_params: Collection[Object] , # Should be Collection[AParam]
- n_type: nullable AType ,
- n_closure_decls: Collection[Object] # Should be Collection[AClosureDecl]
+ n_params: Collection[Object], # Should be Collection[AParam]
+ n_type: nullable AType,
+ n_closure_decls: Collection[Object] # Should be Collection[AClosureDecl]
)
do
empty_init
private init empty_init do end
init init_aparam (
- n_id: nullable TId ,
- n_type: nullable AType ,
- n_dotdotdot: nullable TDotdotdot
+ n_id: nullable TId,
+ n_type: nullable AType,
+ n_dotdotdot: nullable TDotdotdot
)
do
empty_init
end
end
redef class AClosureDecl
- redef fun n_kwwith=(n)
- do
- _n_kwwith = n
- n.parent = self
- end
redef fun n_kwbreak=(n)
do
_n_kwbreak = n
n.parent = self
end
end
+ redef fun n_bang=(n)
+ do
+ _n_bang = n
+ n.parent = self
+ end
redef fun n_id=(n)
do
_n_id = n
private init empty_init do end
init init_aclosuredecl (
- n_kwwith: nullable TKwwith ,
- n_kwbreak: nullable TKwbreak ,
- n_id: nullable TId ,
- n_signature: nullable ASignature ,
- n_expr: nullable AExpr
+ n_kwbreak: nullable TKwbreak,
+ n_bang: nullable TBang,
+ n_id: nullable TId,
+ n_signature: nullable ASignature,
+ n_expr: nullable AExpr
)
do
empty_init
- _n_kwwith = n_kwwith.as(not null)
- n_kwwith.parent = self
_n_kwbreak = n_kwbreak
if n_kwbreak != null then
n_kwbreak.parent = self
end
+ _n_bang = n_bang.as(not null)
+ n_bang.parent = self
_n_id = n_id.as(not null)
n_id.parent = self
_n_signature = n_signature.as(not null)
redef fun replace_child(old_child: ANode, new_child: nullable ANode)
do
- if _n_kwwith == old_child then
+ if _n_kwbreak == old_child then
if new_child != null then
new_child.parent = self
- assert new_child isa TKwwith
- _n_kwwith = new_child
+ assert new_child isa TKwbreak
+ _n_kwbreak = new_child
else
- abort
+ _n_kwbreak = null
end
return
end
- if _n_kwbreak == old_child then
+ if _n_bang == old_child then
if new_child != null then
new_child.parent = self
- assert new_child isa TKwbreak
- _n_kwbreak = new_child
+ assert new_child isa TBang
+ _n_bang = new_child
else
- _n_kwbreak = null
+ abort
end
return
end
redef fun visit_all(v: Visitor)
do
- v.enter_visit(_n_kwwith)
if _n_kwbreak != null then
v.enter_visit(_n_kwbreak.as(not null))
end
+ v.enter_visit(_n_bang)
v.enter_visit(_n_id)
v.enter_visit(_n_signature)
if _n_expr != null then
redef fun visit_all_reverse(v: Visitor)
do
- v.enter_visit(_n_kwwith)
if _n_kwbreak != null then
v.enter_visit(_n_kwbreak.as(not null))
end
+ v.enter_visit(_n_bang)
v.enter_visit(_n_id)
v.enter_visit(_n_signature)
if _n_expr != null then
private init empty_init do end
init init_atype (
- n_kwnullable: nullable TKwnullable ,
- n_id: nullable TClassid ,
- n_types: Collection[Object] # Should be Collection[AType]
+ n_kwnullable: nullable TKwnullable,
+ n_id: nullable TClassid,
+ n_types: Collection[Object] # Should be Collection[AType]
)
do
empty_init
private init empty_init do end
init init_alabel (
- n_kwlabel: nullable TKwlabel ,
- n_id: nullable TId
+ n_kwlabel: nullable TKwlabel,
+ n_id: nullable TId
)
do
empty_init
private init empty_init do end
init init_ablockexpr (
- n_expr: Collection[Object] # Should be Collection[AExpr]
+ n_expr: Collection[Object] # Should be Collection[AExpr]
)
do
empty_init
private init empty_init do end
init init_avardeclexpr (
- n_kwvar: nullable TKwvar ,
- n_id: nullable TId ,
- n_type: nullable AType ,
- n_assign: nullable TAssign ,
- n_expr: nullable AExpr
+ n_kwvar: nullable TKwvar,
+ n_id: nullable TId,
+ n_type: nullable AType,
+ n_assign: nullable TAssign,
+ n_expr: nullable AExpr
)
do
empty_init
redef fun n_kwreturn=(n)
do
_n_kwreturn = n
- n.parent = self
+ if n != null then
+ n.parent = self
+ end
end
redef fun n_expr=(n)
do
private init empty_init do end
init init_areturnexpr (
- n_kwreturn: nullable TKwreturn ,
- n_expr: nullable AExpr
+ n_kwreturn: nullable TKwreturn,
+ n_expr: nullable AExpr
)
do
empty_init
- _n_kwreturn = n_kwreturn.as(not null)
- n_kwreturn.parent = self
+ _n_kwreturn = n_kwreturn
+ if n_kwreturn != null then
+ n_kwreturn.parent = self
+ end
_n_expr = n_expr
if n_expr != null then
n_expr.parent = self
assert new_child isa TKwreturn
_n_kwreturn = new_child
else
- abort
+ _n_kwreturn = null
end
return
end
redef fun visit_all(v: Visitor)
do
- v.enter_visit(_n_kwreturn)
+ if _n_kwreturn != null then
+ v.enter_visit(_n_kwreturn.as(not null))
+ end
if _n_expr != null then
v.enter_visit(_n_expr.as(not null))
end
redef fun visit_all_reverse(v: Visitor)
do
- v.enter_visit(_n_kwreturn)
+ if _n_kwreturn != null then
+ v.enter_visit(_n_kwreturn.as(not null))
+ end
if _n_expr != null then
v.enter_visit(_n_expr.as(not null))
end
private init empty_init do end
init init_abreakexpr (
- n_kwbreak: nullable TKwbreak ,
- n_label: nullable ALabel ,
- n_expr: nullable AExpr
+ n_kwbreak: nullable TKwbreak,
+ n_label: nullable ALabel,
+ n_expr: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_aabortexpr (
- n_kwabort: nullable TKwabort
+ n_kwabort: nullable TKwabort
)
do
empty_init
redef fun n_kwcontinue=(n)
do
_n_kwcontinue = n
- n.parent = self
+ if n != null then
+ n.parent = self
+ end
end
redef fun n_label=(n)
do
private init empty_init do end
init init_acontinueexpr (
- n_kwcontinue: nullable TKwcontinue ,
- n_label: nullable ALabel ,
- n_expr: nullable AExpr
+ n_kwcontinue: nullable TKwcontinue,
+ n_label: nullable ALabel,
+ n_expr: nullable AExpr
)
do
empty_init
- _n_kwcontinue = n_kwcontinue.as(not null)
- n_kwcontinue.parent = self
+ _n_kwcontinue = n_kwcontinue
+ if n_kwcontinue != null then
+ n_kwcontinue.parent = self
+ end
_n_label = n_label
if n_label != null then
n_label.parent = self
assert new_child isa TKwcontinue
_n_kwcontinue = new_child
else
- abort
+ _n_kwcontinue = null
end
return
end
redef fun visit_all(v: Visitor)
do
- v.enter_visit(_n_kwcontinue)
+ if _n_kwcontinue != null then
+ v.enter_visit(_n_kwcontinue.as(not null))
+ end
if _n_label != null then
v.enter_visit(_n_label.as(not null))
end
redef fun visit_all_reverse(v: Visitor)
do
- v.enter_visit(_n_kwcontinue)
+ if _n_kwcontinue != null then
+ v.enter_visit(_n_kwcontinue.as(not null))
+ end
if _n_label != null then
v.enter_visit(_n_label.as(not null))
end
private init empty_init do end
init init_adoexpr (
- n_kwdo: nullable TKwdo ,
- n_block: nullable AExpr ,
- n_label: nullable ALabel
+ n_kwdo: nullable TKwdo,
+ n_block: nullable AExpr,
+ n_label: nullable ALabel
)
do
empty_init
private init empty_init do end
init init_aifexpr (
- n_kwif: nullable TKwif ,
- n_expr: nullable AExpr ,
- n_then: nullable AExpr ,
- n_else: nullable AExpr
+ n_kwif: nullable TKwif,
+ n_expr: nullable AExpr,
+ n_then: nullable AExpr,
+ n_else: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_aifexprexpr (
- n_kwif: nullable TKwif ,
- n_expr: nullable AExpr ,
- n_kwthen: nullable TKwthen ,
- n_then: nullable AExpr ,
- n_kwelse: nullable TKwelse ,
- n_else: nullable AExpr
+ n_kwif: nullable TKwif,
+ n_expr: nullable AExpr,
+ n_kwthen: nullable TKwthen,
+ n_then: nullable AExpr,
+ n_kwelse: nullable TKwelse,
+ n_else: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_awhileexpr (
- n_kwwhile: nullable TKwwhile ,
- n_expr: nullable AExpr ,
- n_kwdo: nullable TKwdo ,
- n_block: nullable AExpr ,
- n_label: nullable ALabel
+ n_kwwhile: nullable TKwwhile,
+ n_expr: nullable AExpr,
+ n_kwdo: nullable TKwdo,
+ n_block: nullable AExpr,
+ n_label: nullable ALabel
)
do
empty_init
private init empty_init do end
init init_aforexpr (
- n_kwfor: nullable TKwfor ,
- n_id: nullable TId ,
- n_expr: nullable AExpr ,
- n_kwdo: nullable TKwdo ,
- n_block: nullable AExpr ,
- n_label: nullable ALabel
+ n_kwfor: nullable TKwfor,
+ n_id: nullable TId,
+ n_expr: nullable AExpr,
+ n_kwdo: nullable TKwdo,
+ n_block: nullable AExpr,
+ n_label: nullable ALabel
)
do
empty_init
private init empty_init do end
init init_aassertexpr (
- n_kwassert: nullable TKwassert ,
- n_id: nullable TId ,
- n_expr: nullable AExpr
+ n_kwassert: nullable TKwassert,
+ n_id: nullable TId,
+ n_expr: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_aonceexpr (
- n_kwonce: nullable TKwonce ,
- n_expr: nullable AExpr
+ n_kwonce: nullable TKwonce,
+ n_expr: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_asendexpr (
- n_expr: nullable AExpr
+ n_expr: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_abinopexpr (
- n_expr: nullable AExpr ,
- n_expr2: nullable AExpr
+ n_expr: nullable AExpr,
+ n_expr2: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_aorexpr (
- n_expr: nullable AExpr ,
- n_expr2: nullable AExpr
+ n_expr: nullable AExpr,
+ n_expr2: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_aandexpr (
- n_expr: nullable AExpr ,
- n_expr2: nullable AExpr
+ n_expr: nullable AExpr,
+ n_expr2: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_anotexpr (
- n_kwnot: nullable TKwnot ,
- n_expr: nullable AExpr
+ n_kwnot: nullable TKwnot,
+ n_expr: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_aeqexpr (
- n_expr: nullable AExpr ,
- n_expr2: nullable AExpr
+ n_expr: nullable AExpr,
+ n_expr2: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_aeeexpr (
- n_expr: nullable AExpr ,
- n_expr2: nullable AExpr
+ n_expr: nullable AExpr,
+ n_expr2: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_aneexpr (
- n_expr: nullable AExpr ,
- n_expr2: nullable AExpr
+ n_expr: nullable AExpr,
+ n_expr2: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_altexpr (
- n_expr: nullable AExpr ,
- n_expr2: nullable AExpr
+ n_expr: nullable AExpr,
+ n_expr2: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_aleexpr (
- n_expr: nullable AExpr ,
- n_expr2: nullable AExpr
+ n_expr: nullable AExpr,
+ n_expr2: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_agtexpr (
- n_expr: nullable AExpr ,
- n_expr2: nullable AExpr
+ n_expr: nullable AExpr,
+ n_expr2: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_ageexpr (
- n_expr: nullable AExpr ,
- n_expr2: nullable AExpr
+ n_expr: nullable AExpr,
+ n_expr2: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_aisaexpr (
- n_expr: nullable AExpr ,
- n_type: nullable AType
+ n_expr: nullable AExpr,
+ n_type: nullable AType
)
do
empty_init
private init empty_init do end
init init_aplusexpr (
- n_expr: nullable AExpr ,
- n_expr2: nullable AExpr
+ n_expr: nullable AExpr,
+ n_expr2: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_aminusexpr (
- n_expr: nullable AExpr ,
- n_expr2: nullable AExpr
+ n_expr: nullable AExpr,
+ n_expr2: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_astarshipexpr (
- n_expr: nullable AExpr ,
- n_expr2: nullable AExpr
+ n_expr: nullable AExpr,
+ n_expr2: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_astarexpr (
- n_expr: nullable AExpr ,
- n_expr2: nullable AExpr
+ n_expr: nullable AExpr,
+ n_expr2: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_aslashexpr (
- n_expr: nullable AExpr ,
- n_expr2: nullable AExpr
+ n_expr: nullable AExpr,
+ n_expr2: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_apercentexpr (
- n_expr: nullable AExpr ,
- n_expr2: nullable AExpr
+ n_expr: nullable AExpr,
+ n_expr2: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_auminusexpr (
- n_minus: nullable TMinus ,
- n_expr: nullable AExpr
+ n_minus: nullable TMinus,
+ n_expr: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_anewexpr (
- n_kwnew: nullable TKwnew ,
- n_type: nullable AType ,
- n_id: nullable TId ,
- n_args: Collection[Object] # Should be Collection[AExpr]
+ n_kwnew: nullable TKwnew,
+ n_type: nullable AType,
+ n_id: nullable TId,
+ n_args: Collection[Object] # Should be Collection[AExpr]
)
do
empty_init
private init empty_init do end
init init_aattrexpr (
- n_expr: nullable AExpr ,
- n_id: nullable TAttrid
+ n_expr: nullable AExpr,
+ n_id: nullable TAttrid
)
do
empty_init
private init empty_init do end
init init_aattrassignexpr (
- n_expr: nullable AExpr ,
- n_id: nullable TAttrid ,
- n_assign: nullable TAssign ,
- n_value: nullable AExpr
+ n_expr: nullable AExpr,
+ n_id: nullable TAttrid,
+ n_assign: nullable TAssign,
+ n_value: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_aattrreassignexpr (
- n_expr: nullable AExpr ,
- n_id: nullable TAttrid ,
- n_assign_op: nullable AAssignOp ,
- n_value: nullable AExpr
+ n_expr: nullable AExpr,
+ n_id: nullable TAttrid,
+ n_assign_op: nullable AAssignOp,
+ n_value: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_acallexpr (
- n_expr: nullable AExpr ,
- n_id: nullable TId ,
- n_args: Collection[Object] , # Should be Collection[AExpr]
- n_closure_defs: Collection[Object] # Should be Collection[AClosureDef]
+ n_expr: nullable AExpr,
+ n_id: nullable TId,
+ n_args: Collection[Object], # Should be Collection[AExpr]
+ n_closure_defs: Collection[Object] # Should be Collection[AClosureDef]
)
do
empty_init
private init empty_init do end
init init_acallassignexpr (
- n_expr: nullable AExpr ,
- n_id: nullable TId ,
- n_args: Collection[Object] , # Should be Collection[AExpr]
- n_assign: nullable TAssign ,
- n_value: nullable AExpr
+ n_expr: nullable AExpr,
+ n_id: nullable TId,
+ n_args: Collection[Object], # Should be Collection[AExpr]
+ n_assign: nullable TAssign,
+ n_value: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_acallreassignexpr (
- n_expr: nullable AExpr ,
- n_id: nullable TId ,
- n_args: Collection[Object] , # Should be Collection[AExpr]
- n_assign_op: nullable AAssignOp ,
- n_value: nullable AExpr
+ n_expr: nullable AExpr,
+ n_id: nullable TId,
+ n_args: Collection[Object], # Should be Collection[AExpr]
+ n_assign_op: nullable AAssignOp,
+ n_value: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_asuperexpr (
- n_qualified: nullable AQualified ,
- n_kwsuper: nullable TKwsuper ,
- n_args: Collection[Object] # Should be Collection[AExpr]
+ n_qualified: nullable AQualified,
+ n_kwsuper: nullable TKwsuper,
+ n_args: Collection[Object] # Should be Collection[AExpr]
)
do
empty_init
private init empty_init do end
init init_ainitexpr (
- n_expr: nullable AExpr ,
- n_kwinit: nullable TKwinit ,
- n_args: Collection[Object] # Should be Collection[AExpr]
+ n_expr: nullable AExpr,
+ n_kwinit: nullable TKwinit,
+ n_args: Collection[Object] # Should be Collection[AExpr]
)
do
empty_init
private init empty_init do end
init init_abraexpr (
- n_expr: nullable AExpr ,
- n_args: Collection[Object] , # Should be Collection[AExpr]
- n_closure_defs: Collection[Object] # Should be Collection[AClosureDef]
+ n_expr: nullable AExpr,
+ n_args: Collection[Object], # Should be Collection[AExpr]
+ n_closure_defs: Collection[Object] # Should be Collection[AClosureDef]
)
do
empty_init
private init empty_init do end
init init_abraassignexpr (
- n_expr: nullable AExpr ,
- n_args: Collection[Object] , # Should be Collection[AExpr]
- n_assign: nullable TAssign ,
- n_value: nullable AExpr
+ n_expr: nullable AExpr,
+ n_args: Collection[Object], # Should be Collection[AExpr]
+ n_assign: nullable TAssign,
+ n_value: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_abrareassignexpr (
- n_expr: nullable AExpr ,
- n_args: Collection[Object] , # Should be Collection[AExpr]
- n_assign_op: nullable AAssignOp ,
- n_value: nullable AExpr
+ n_expr: nullable AExpr,
+ n_args: Collection[Object], # Should be Collection[AExpr]
+ n_assign_op: nullable AAssignOp,
+ n_value: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_aclosurecallexpr (
- n_id: nullable TId ,
- n_args: Collection[Object] , # Should be Collection[AExpr]
- n_closure_defs: Collection[Object] # Should be Collection[AClosureDef]
+ n_id: nullable TId,
+ n_args: Collection[Object], # Should be Collection[AExpr]
+ n_closure_defs: Collection[Object] # Should be Collection[AClosureDef]
)
do
empty_init
private init empty_init do end
init init_avarexpr (
- n_id: nullable TId
+ n_id: nullable TId
)
do
empty_init
private init empty_init do end
init init_avarassignexpr (
- n_id: nullable TId ,
- n_assign: nullable TAssign ,
- n_value: nullable AExpr
+ n_id: nullable TId,
+ n_assign: nullable TAssign,
+ n_value: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_avarreassignexpr (
- n_id: nullable TId ,
- n_assign_op: nullable AAssignOp ,
- n_value: nullable AExpr
+ n_id: nullable TId,
+ n_assign_op: nullable AAssignOp,
+ n_value: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_arangeexpr (
- n_expr: nullable AExpr ,
- n_expr2: nullable AExpr
+ n_expr: nullable AExpr,
+ n_expr2: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_acrangeexpr (
- n_expr: nullable AExpr ,
- n_expr2: nullable AExpr
+ n_expr: nullable AExpr,
+ n_expr2: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_aorangeexpr (
- n_expr: nullable AExpr ,
- n_expr2: nullable AExpr
+ n_expr: nullable AExpr,
+ n_expr2: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_aarrayexpr (
- n_exprs: Collection[Object] # Should be Collection[AExpr]
+ n_exprs: Collection[Object] # Should be Collection[AExpr]
)
do
empty_init
private init empty_init do end
init init_aselfexpr (
- n_kwself: nullable TKwself
+ n_kwself: nullable TKwself
)
do
empty_init
private init empty_init do end
init init_atrueexpr (
- n_kwtrue: nullable TKwtrue
+ n_kwtrue: nullable TKwtrue
)
do
empty_init
private init empty_init do end
init init_afalseexpr (
- n_kwfalse: nullable TKwfalse
+ n_kwfalse: nullable TKwfalse
)
do
empty_init
private init empty_init do end
init init_anullexpr (
- n_kwnull: nullable TKwnull
+ n_kwnull: nullable TKwnull
)
do
empty_init
private init empty_init do end
init init_aintexpr (
- n_number: nullable TNumber
+ n_number: nullable TNumber
)
do
empty_init
private init empty_init do end
init init_afloatexpr (
- n_float: nullable TFloat
+ n_float: nullable TFloat
)
do
empty_init
private init empty_init do end
init init_acharexpr (
- n_char: nullable TChar
+ n_char: nullable TChar
)
do
empty_init
private init empty_init do end
init init_astringexpr (
- n_string: nullable TString
+ n_string: nullable TString
)
do
empty_init
private init empty_init do end
init init_astartstringexpr (
- n_string: nullable TStartString
+ n_string: nullable TStartString
)
do
empty_init
private init empty_init do end
init init_amidstringexpr (
- n_string: nullable TMidString
+ n_string: nullable TMidString
)
do
empty_init
private init empty_init do end
init init_aendstringexpr (
- n_string: nullable TEndString
+ n_string: nullable TEndString
)
do
empty_init
private init empty_init do end
init init_asuperstringexpr (
- n_exprs: Collection[Object] # Should be Collection[AExpr]
+ n_exprs: Collection[Object] # Should be Collection[AExpr]
)
do
empty_init
private init empty_init do end
init init_aparexpr (
- n_expr: nullable AExpr
+ n_expr: nullable AExpr
)
do
empty_init
private init empty_init do end
init init_aascastexpr (
- n_expr: nullable AExpr ,
- n_kwas: nullable TKwas ,
- n_type: nullable AType
+ n_expr: nullable AExpr,
+ n_kwas: nullable TKwas,
+ n_type: nullable AType
)
do
empty_init
private init empty_init do end
init init_aasnotnullexpr (
- n_expr: nullable AExpr ,
- n_kwas: nullable TKwas ,
- n_kwnot: nullable TKwnot ,
- n_kwnull: nullable TKwnull
+ n_expr: nullable AExpr,
+ n_kwas: nullable TKwas,
+ n_kwnot: nullable TKwnot,
+ n_kwnull: nullable TKwnull
)
do
empty_init
private init empty_init do end
init init_aissetattrexpr (
- n_kwisset: nullable TKwisset ,
- n_expr: nullable AExpr ,
- n_id: nullable TAttrid
+ n_kwisset: nullable TKwisset,
+ n_expr: nullable AExpr,
+ n_id: nullable TAttrid
)
do
empty_init
private init empty_init do end
init init_aplusassignop (
- n_pluseq: nullable TPluseq
+ n_pluseq: nullable TPluseq
)
do
empty_init
private init empty_init do end
init init_aminusassignop (
- n_minuseq: nullable TMinuseq
+ n_minuseq: nullable TMinuseq
)
do
empty_init
end
end
redef class AClosureDef
- redef fun n_kwwith=(n)
+ redef fun n_bang=(n)
do
- _n_kwwith = n
+ _n_bang = n
+ n.parent = self
+ end
+ redef fun n_id=(n)
+ do
+ _n_id = n
n.parent = self
end
redef fun n_kwdo=(n)
do
_n_kwdo = n
- n.parent = self
+ if n != null then
+ n.parent = self
+ end
end
redef fun n_expr=(n)
do
private init empty_init do end
init init_aclosuredef (
- n_kwwith: nullable TKwwith ,
- n_id: Collection[Object] , # Should be Collection[TId]
- n_kwdo: nullable TKwdo ,
- n_expr: nullable AExpr ,
- n_label: nullable ALabel
+ n_bang: nullable TBang,
+ n_id: nullable AClosureId,
+ n_ids: Collection[Object], # Should be Collection[TId]
+ n_kwdo: nullable TKwdo,
+ n_expr: nullable AExpr,
+ n_label: nullable ALabel
)
do
empty_init
- _n_kwwith = n_kwwith.as(not null)
- n_kwwith.parent = self
- for n in n_id do
+ _n_bang = n_bang.as(not null)
+ n_bang.parent = self
+ _n_id = n_id.as(not null)
+ n_id.parent = self
+ for n in n_ids do
assert n isa TId
- _n_id.add(n)
+ _n_ids.add(n)
n.parent = self
end
- _n_kwdo = n_kwdo.as(not null)
- n_kwdo.parent = self
+ _n_kwdo = n_kwdo
+ if n_kwdo != null then
+ n_kwdo.parent = self
+ end
_n_expr = n_expr
if n_expr != null then
n_expr.parent = self
redef fun replace_child(old_child: ANode, new_child: nullable ANode)
do
- if _n_kwwith == old_child then
+ if _n_bang == old_child then
if new_child != null then
new_child.parent = self
- assert new_child isa TKwwith
- _n_kwwith = new_child
+ assert new_child isa TBang
+ _n_bang = new_child
else
abort
end
return
end
- for i in [0.._n_id.length[ do
- if _n_id[i] == old_child then
+ if _n_id == old_child then
+ if new_child != null then
+ new_child.parent = self
+ assert new_child isa AClosureId
+ _n_id = new_child
+ else
+ abort
+ end
+ return
+ end
+ for i in [0.._n_ids.length[ do
+ if _n_ids[i] == old_child then
if new_child != null then
assert new_child isa TId
- _n_id[i] = new_child
+ _n_ids[i] = new_child
new_child.parent = self
else
- _n_id.remove_at(i)
+ _n_ids.remove_at(i)
end
return
end
assert new_child isa TKwdo
_n_kwdo = new_child
else
- abort
+ _n_kwdo = null
end
return
end
redef fun visit_all(v: Visitor)
do
- v.enter_visit(_n_kwwith)
- for n in _n_id do
+ v.enter_visit(_n_bang)
+ v.enter_visit(_n_id)
+ for n in _n_ids do
v.enter_visit(n)
end
- v.enter_visit(_n_kwdo)
+ if _n_kwdo != null then
+ v.enter_visit(_n_kwdo.as(not null))
+ end
if _n_expr != null then
v.enter_visit(_n_expr.as(not null))
end
redef fun visit_all_reverse(v: Visitor)
do
- v.enter_visit(_n_kwwith)
+ v.enter_visit(_n_bang)
+ v.enter_visit(_n_id)
do
- var i = _n_id.length
+ var i = _n_ids.length
while i >= 0 do
- v.enter_visit(_n_id[i])
+ v.enter_visit(_n_ids[i])
i = i - 1
end
end
- v.enter_visit(_n_kwdo)
+ if _n_kwdo != null then
+ v.enter_visit(_n_kwdo.as(not null))
+ end
if _n_expr != null then
v.enter_visit(_n_expr.as(not null))
end
end
end
end
+redef class ASimpleClosureId
+ redef fun n_id=(n)
+ do
+ _n_id = n
+ n.parent = self
+ end
+
+ private init empty_init do end
+
+ init init_asimpleclosureid (
+ n_id: nullable TId
+ )
+ do
+ empty_init
+ _n_id = n_id.as(not null)
+ n_id.parent = self
+ end
+
+ redef fun replace_child(old_child: ANode, new_child: nullable ANode)
+ do
+ if _n_id == old_child then
+ if new_child != null then
+ new_child.parent = self
+ assert new_child isa TId
+ _n_id = new_child
+ else
+ abort
+ end
+ return
+ end
+ end
+
+ redef fun visit_all(v: Visitor)
+ do
+ v.enter_visit(_n_id)
+ end
+
+ redef fun visit_all_reverse(v: Visitor)
+ do
+ v.enter_visit(_n_id)
+ end
+end
+redef class ABreakClosureId
+ redef fun n_kwbreak=(n)
+ do
+ _n_kwbreak = n
+ n.parent = self
+ end
+
+ private init empty_init do end
+
+ init init_abreakclosureid (
+ n_kwbreak: nullable TKwbreak
+ )
+ do
+ empty_init
+ _n_kwbreak = n_kwbreak.as(not null)
+ n_kwbreak.parent = self
+ end
+
+ redef fun replace_child(old_child: ANode, new_child: nullable ANode)
+ do
+ if _n_kwbreak == old_child then
+ if new_child != null then
+ new_child.parent = self
+ assert new_child isa TKwbreak
+ _n_kwbreak = new_child
+ else
+ abort
+ end
+ return
+ end
+ end
+
+ redef fun visit_all(v: Visitor)
+ do
+ v.enter_visit(_n_kwbreak)
+ end
+
+ redef fun visit_all_reverse(v: Visitor)
+ do
+ v.enter_visit(_n_kwbreak)
+ end
+end
redef class AQualified
redef fun n_classid=(n)
do
private init empty_init do end
init init_aqualified (
- n_id: Collection[Object] , # Should be Collection[TId]
- n_classid: nullable TClassid
+ n_id: Collection[Object], # Should be Collection[TId]
+ n_classid: nullable TClassid
)
do
empty_init
private init empty_init do end
init init_adoc (
- n_comment: Collection[Object] # Should be Collection[TComment]
+ n_comment: Collection[Object] # Should be Collection[TComment]
)
do
empty_init
if _n_base != null then
v.enter_visit(_n_base.as(not null))
end
+ v.enter_visit(_n_eof)
end
redef fun visit_all_reverse(v: Visitor)
do
+ v.enter_visit(_n_eof)
if _n_base != null then
v.enter_visit(_n_base.as(not null))
end