super OrderedTree[MConcern]
end
+redef class MGroup
+ redef var is_test is lazy do
+ var parent = self.parent
+ if parent != null and parent.is_test then return true
+ return name == "tests"
+ end
+end
+
redef class MModule
# All the classes introduced in the module
var intro_mclasses = new Array[MClass]
# Is `self` and abstract class?
var is_abstract: Bool is lazy do return kind == abstract_kind
+ redef var is_test is lazy do return intro.is_test
+
redef fun mdoc_or_fallback
do
# Don’t use `intro.mdoc_or_fallback` because it would create an infinite
if t == mtype then return self
return t.as_nullable
end
+
+ redef fun mdoc_or_fallback do return mtype.mdoc_or_fallback
end
# A non-null version of a formal type.
end
private var lookup_all_definitions_cache = new HashMap2[MModule, MType, Array[MPROPDEF]]
+
+ redef var is_test is lazy do return intro.is_test
+
+ # Does self have the `before` annotation?
+ var is_before: Bool is lazy do return intro.is_before
+
+ # Does self have the `before_all` annotation?
+ var is_before_all: Bool is lazy do return intro.is_before_all
+
+ # Does self have the `after` annotation?
+ var is_after: Bool is lazy do return intro.is_after
+
+ # Does self have the `after_all` annotation?
+ var is_after_all: Bool is lazy do return intro.is_after_all
end
# A global method
end
redef fun mdoc_or_fallback do return mdoc or else mproperty.mdoc_or_fallback
+
+ # Does self have the `before` annotation?
+ var is_before = false is writable
+
+ # Does self have the `before_all` annotation?
+ var is_before_all = false is writable
+
+ # Does self have the `after` annotation?
+ var is_after = false is writable
+
+ # Does self have the `after_all` annotation?
+ var is_after_all = false is writable
end
# A local definition of a method