Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
# A list of filters that can be applied on a MEntity
#
# A list of filters that can be applied on a MEntity
#
if not accept_mentity_test(mentity) then return false
if not accept_mentity_redef(mentity) then return false
if not accept_mentity_extern(mentity) then return false
if not accept_mentity_test(mentity) then return false
if not accept_mentity_redef(mentity) then return false
if not accept_mentity_extern(mentity) then return false
+ if not accept_mentity_example(mentity) then return false
if not accept_mentity_attribute(mentity) then return false
if not accept_mentity_empty_doc(mentity) then return false
if not accept_mentity_inherited(mentity) then return false
if not accept_mentity_attribute(mentity) then return false
if not accept_mentity_empty_doc(mentity) then return false
if not accept_mentity_inherited(mentity) then return false
return mentity.mdoc_or_fallback != null
end
return mentity.mdoc_or_fallback != null
end
+ # Accept examples?
+ #
+ # Default is `true`.
+ var accept_example = true is optional
+
+ # Accept only entities that are not example related
+ fun accept_mentity_example(mentity: MEntity): Bool do
+ if accept_example then return true
+ return not mentity.is_example
+ end
+
# If set, accept only entities local to `accept_inherited`
var accept_inherited: nullable MEntity = null is optional
# If set, accept only entities local to `accept_inherited`
var accept_inherited: nullable MEntity = null is optional
min_visibility = protected_visibility,
accept_fictive = false,
accept_test = false,
min_visibility = protected_visibility,
accept_fictive = false,
accept_test = false,
+ accept_example = false,
accept_redef = true,
accept_extern = true,
accept_attribute = true,
accept_redef = true,
accept_extern = true,
accept_attribute = true,