+ # Accept generated entities?
+ #
+ # Default is `true`.
+ var accept_generated = true is optional, writable
+
+ # Accept only non-generated entities
+ #
+ # See `MEntity::is_generated`.
+ fun accept_mentity_generated(mentity: MEntity): Bool do
+ if accept_generated then return true
+ if mentity isa MClass then mentity = mentity.intro
+ if mentity isa MProperty then mentity = mentity.intro
+ if mentity isa MModule then
+ return not mentity.has_annotation("generated")
+ else if mentity isa MClassDef then
+ return not mentity.has_annotation("generated")
+ else if mentity isa MPropDef then
+ return not mentity.has_annotation("generated")
+ end
+ return true
+ end
+