var content = text_array.last.as(String).r_trim
var link = text.links.first
- var found = false
if link == null and content.has_suffix(suffix) then
content = content.substring(0, content.length - suffix.length).r_trim
end
end
+# The default importation logics.
+#
+# Do nothing special.
+class DefaultSource
+ super SourceLanguage
+end
+
# Importation logics for Java.
class JavaSource
super SourceLanguage
# For abstract members, Doxygen put `abstract` at the beginning of the type.
# We assume that Doxygen do not put annotations in the type (it seems to
# be the case).
- member.is_abstract = extract_keyword(type_text, "abstract")
+ if extract_keyword(type_text, "abstract") then
+ member.is_abstract = true
+ end
# TODO final
# TODO void
# TODO Avoid using `RawType` when possible. Only use `RawType` as a fallback.
super
end
end
+
+# Importation logics for Python.
+class PythonSource
+ super SourceLanguage
+
+ redef fun apply_member_type(member, type_text) do
+ # Doxygen may forgot to remove the `def` keyword on methods.
+ extract_keyword(type_text, "def")
+ super
+ end
+end