nitc :: AAttrPropdef :: make
AAttrPropdef
Note: By default if the AVisibility
is not given the visibility is set to public
# 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
src/astbuilder.nit:337,2--360,4