nitc :: ModelBuilder :: mpropdef2node
This method is used to associate model entity with syntactic entities.
If the property definition is not associated with a node, returns null
.
# Retrieve the associated AST node of a mpropertydef.
# This method is used to associate model entity with syntactic entities.
#
# If the property definition is not associated with a node, returns `null`.
fun mpropdef2node(mpropdef: MPropDef): nullable ANode
do
var res
res = mpropdef2npropdef.get_or_null(mpropdef)
if res != null then
# Run the phases on it
toolcontext.run_phases_on_npropdef(res)
return res
end
# Fall back to the class node if any.
res = mclassdef2nclassdef.get_or_null(mpropdef.mclassdef)
if res != null then return res
return null
end
src/modelize/modelize_property.nit:67,2--84,4