+redef class ACallAssignExpr
+ private init make(recv: AExpr, callsite: CallSite, args: nullable Collection[AExpr], n_value: AExpr)
+ do
+ _callsite = callsite
+ _mtype = callsite.recv
+ _is_typed = true
+ var n_args = new AListExprs
+ if args != null then
+ n_args.n_exprs.add_all(args)
+ end
+ var n_qid = new AQid
+ n_qid.n_id = new TId
+ n_qid.n_id.text = callsite.mproperty.name
+ init_acallassignexpr(recv, n_qid, n_args, new TAssign, n_value)
+ end
+end
+
+redef class AStdClassdef
+ private init make(mclassdef: nullable MClassDef,
+ n_visibility: nullable AVisibility,
+ n_formaldefs : Collection[Object],
+ n_extern_code_block : nullable AExternCodeBlock,
+ n_propdefs : Collection[Object],
+ n_classkind: nullable AClasskind)
+ do
+ if n_visibility == null then n_visibility = new APublicVisibility
+ if n_classkind == null then n_classkind = new AConcreteClasskind.init_aconcreteclasskind(new TKwclass)
+ var n_qid = new AQclassid.init_aqclassid(null, new TClassid)
+ init_astdclassdef(null, null, n_visibility, n_classkind, n_qid, null, n_formaldefs, null, n_extern_code_block, n_propdefs, new TKwend)
+ _mclassdef = mclassdef
+ _mclass = mclassdef.mclass
+ end
+end
+
+redef class AAttrPropdef
+
+ # Create a new `AAttrPropdef`
+ # Note: By default if the `AVisibility` is not given the visibility is set to public
+ private init make(name: String,
+ n_type: nullable AType,
+ n_visibility: nullable AVisibility,
+ initial_value: nullable AExpr,
+ n_block: nullable AExpr,
+ m_attributedef: nullable MAttributeDef,
+ m_setterdef: nullable MMethodDef,
+ m_getterdef: nullable MMethodDef)
+ do
+ # Set the model type
+ if n_type != null then mtype = n_type.mtype
+ # Define the visibility default is public
+ if n_visibility == null then n_visibility = new APublicVisibility
+ init_aattrpropdef(null, null, n_visibility, new TKwvar, new TId, n_type, null, initial_value, null, null , n_block, null)
+ # Set the name of the attribute
+ _n_id2.text = name
+ _mpropdef = m_attributedef
+ _mreadpropdef = m_getterdef
+ _mwritepropdef = m_setterdef
+ if initial_value != null or n_block != null then has_value = true
+ if m_attributedef != null then self.location = m_attributedef.location
+ end
+end
+
+redef class ANotExpr
+ private init make(expr: AExpr)
+ do
+ self.init_anotexpr(new TKwnot, expr)
+ end
+end
+
+redef class AReturnExpr
+ private init make(expr: nullable AExpr)
+ do
+ self.init_areturnexpr(null, expr)
+ end
+end
+
+redef class ASuperExpr
+ private init make(args: nullable Array[AExpr], n_qualified: nullable AQualified, mpropdef: nullable MMethodDef)
+ do
+ var n_args = new AListExprs
+ if args != null then
+ n_args.n_exprs.add_all(args)
+ end
+ _mpropdef = mpropdef
+ self.init_asuperexpr(n_qualified, new TKwsuper, n_args)
+ end
+end
+
+redef class AOrExpr
+ private init make(right_expr: AExpr, left_expr: AExpr)
+ do
+ self.init_aorexpr(right_expr,new TKwor,left_expr)
+ end
+end
+
+redef class AAndExpr
+ private init make(right_expr: AExpr, left_expr: AExpr)
+ do
+ self.init_aandexpr(right_expr,new TKwand ,left_expr)
+ end
+end
+
+redef class AMethPropdef
+ private init make(n_visibility: nullable AVisibility,
+ tk_redef: nullable TKwredef,
+ mmethoddef: nullable MMethodDef,
+ n_signature: nullable ASignature,
+ n_annotations: nullable AAnnotations,
+ n_extern_calls: nullable AExternCalls,
+ n_extern_code_block: nullable AExternCodeBlock,
+ n_block: nullable AExpr)
+ do
+ var n_tid = new TId
+ var n_methid = new AIdMethid.init_aidmethid(n_tid)
+ if n_signature == null then n_signature = new ASignature
+ if n_visibility == null then n_visibility = new APublicVisibility
+ self.init_amethpropdef(null,tk_redef,n_visibility,new TKwmeth,null,null,null,n_methid,n_signature,n_annotations,n_extern_calls,n_extern_code_block,new TKwdo,n_block,new TKwend)
+ self.mpropdef = mmethoddef
+ if mpropdef != null then self.location = mmethoddef.location
+ end
+
+ # Execute all method verification scope flow and typing.
+ # It also execute an ast validation to define all parents and all locations
+ fun do_all(toolcontext: ToolContext)
+ do
+ self.validate
+ # FIXME: The `do_` usage it is maybe to much (verification...). Solution: Cut the `do_` methods into simpler parts
+ self.do_scope(toolcontext)
+ self.do_flow(toolcontext)
+ self.do_typing(toolcontext.modelbuilder)
+ end
+end
+
+redef class AAssertExpr
+ private init make(n_id : nullable TId , n_expr : nullable AExpr , n_else : nullable AExpr)
+ do
+ n_kwassert = new TKwassert
+ n_kwelse = null
+ if n_else != null then n_kwelse = new TKwelse
+ self.init_aassertexpr(n_kwassert, n_id , n_expr , n_kwelse , n_else)
+ end
+end
+
+redef class ALoopExpr