Creation of a new attribute (AST representation) with the given MAttributeDef.

Property definitions

nitc :: astbuilder $ ModelBuilder :: create_attribute_from_propdef
	# Creation of a new attribute (AST representation) with the given MAttributeDef.
	fun create_attribute_from_propdef(mattribut_def: MAttributeDef): AAttrPropdef
	is
		expect(mclassdef2node(mattribut_def.mclassdef) != null)
	do
		var n_attribute = mattribut_def.create_ast_representation

		var nclass = mclassdef2node(mattribut_def.mclassdef)

		n_attribute.location = mattribut_def.location
		n_attribute.validate

		nclass.n_propdefs.unsafe_add_all([n_attribute])
		nclass.validate

		n_attribute.build_read_property(self, mattribut_def.mclassdef)
		n_attribute.build_read_signature

		mpropdef2npropdef[mattribut_def] = n_attribute
		return n_attribute
	end
src/astbuilder.nit:1103,2--1123,4