The documentation associated to the entity or their main nested entity.

One may use MDoc::original_mentity to retrieve the original source of the documentation.

Property definitions

nitc :: mdoc $ MEntity :: mdoc_or_fallback
	# The documentation associated to the entity or their main nested entity.
	#
	# * `MPackage`s fall back to their root `MGroup`.
	# * `MGroup`s fall back to their `default_mmodule`.
	# * `MClass`es, `MClassDef`s, `MProperty`s and `MPropDef`s fall-back to
	#   their introducing definition.
	# * `MClassType`s fall back to their wrapped `MClass`.
	# * `MVirtualType`s fall back to their wrapped `MProperty`.
	# * `CallSite` fall back on the wrapped `MProperty`.
	# * Other entities do not fall back.
	#
	# One may use `MDoc::original_mentity` to retrieve the original
	# source of the documentation.
	fun mdoc_or_fallback: nullable MDoc do return mdoc
src/model/mdoc.nit:53,2--66,51

nitc $ CallSite :: mdoc_or_fallback
	redef fun mdoc_or_fallback do return mproperty.intro.mdoc
src/semantize/typing.nit:824,2--58

nitc $ MClass :: mdoc_or_fallback
	redef fun mdoc_or_fallback
	do
		# Don’t use `intro.mdoc_or_fallback` because it would create an infinite
		# recursion.
		return intro.mdoc
	end
src/model/model.nit:619,2--624,4

nitc $ MClassDef :: mdoc_or_fallback
	redef fun mdoc_or_fallback do return mdoc or else mclass.mdoc_or_fallback
src/model/model.nit:819,2--74

nitc $ MPackage :: mdoc_or_fallback
	redef fun mdoc_or_fallback
	do
		var mdoc = self.mdoc
		if mdoc != null then return mdoc
		var root = self.root
		if root != null then return root.mdoc_or_fallback
		return null
	end
src/model/mpackage.nit:59,2--66,4

nitc :: mmodule $ MGroup :: mdoc_or_fallback
	redef fun mdoc_or_fallback
	do
		if mdoc != null then return mdoc
		var default_mmodule = self.default_mmodule
		if default_mmodule == null then return null
		return default_mmodule.mdoc_or_fallback
	end
src/model/mmodule.nit:64,2--70,4

nitc $ MProperty :: mdoc_or_fallback
	redef fun mdoc_or_fallback
	do
		# Don’t use `intro.mdoc_or_fallback` because it would create an infinite
		# recursion.
		return intro.mdoc
	end
src/model/model.nit:2159,2--2164,4

nitc $ MPropDef :: mdoc_or_fallback
	redef fun mdoc_or_fallback do return mdoc or else mproperty.mdoc_or_fallback
src/model/model.nit:2635,2--77

nitc $ MClassType :: mdoc_or_fallback
	redef fun mdoc_or_fallback do return mclass.mdoc_or_fallback
src/model/model.nit:1393,2--61

nitc $ MVirtualType :: mdoc_or_fallback
	redef fun mdoc_or_fallback do return mproperty.mdoc_or_fallback
src/model/model.nit:1622,2--64

nitc $ MNullableType :: mdoc_or_fallback
	redef fun mdoc_or_fallback do return mtype.mdoc_or_fallback
src/model/model.nit:1860,2--60