X-Git-Url: http://nitlanguage.org diff --git a/contrib/neo_doxygen/src/neo_doxygen.nit b/contrib/neo_doxygen/src/neo_doxygen.nit index 3b160ad..0713567 100644 --- a/contrib/neo_doxygen/src/neo_doxygen.nit +++ b/contrib/neo_doxygen/src/neo_doxygen.nit @@ -60,7 +60,7 @@ class NeoDoxygenJob printn "Reading {dir}... " end loop - for f in dir.files do + for f in list_files(dir) do var path = dir/f if path.file_stat.is_dir then directories.push(path) @@ -72,6 +72,7 @@ class NeoDoxygenJob if directories.length <= 0 then break dir = directories.pop end + model.add_global_modules print "Done." if file_count < 2 then print "{file_count} file read." @@ -80,6 +81,14 @@ class NeoDoxygenJob end end + # List files in a directory. + # + # This method may be redefined to force the order in which the files + # are read by `load_project`. + protected fun list_files(dir: String): Collection[String] do + return dir.files + end + # Check the project’s name. private fun check_name(name: String) do assert name_valid: not name.chars.first.is_upper else @@ -140,6 +149,7 @@ class NeoDoxygenCommand init do sources["any"] = new DefaultSource sources["java"] = new JavaSource + sources["python"] = new PythonSource var prefix = new OptionText(""" {{{"NAME".bold}}} @@ -176,7 +186,7 @@ class NeoDoxygenCommand var keys = new Array[String].from(sources.keys) opt_src_lang = new OptionEnum(keys, - "The programming language to assume when processing chunk in the declarations left as-is by Doxygen. Use `any` (the default) to disable any language-specific processing.", + "The programming language to assume when processing chunks in the declarations left as-is by Doxygen. Use `any` (the default) to disable any language-specific processing.", keys.index_of("any"), "--src-lang") option_context.add_option(opt_src_lang) end @@ -189,7 +199,7 @@ class NeoDoxygenCommand end option_context.parse(args) - var errors = option_context.get_errors + var errors = option_context.errors var rest = option_context.rest if errors.is_empty and not opt_help.value and rest.length != 2 then @@ -240,8 +250,8 @@ end # Add handling of multi-line descriptions. # -# Note: The algorithm is naive and do not handle internationalisation and -# escape sequences. +# Note: The algorithm is naive and do not handle internationalisation, +# multi-byte characters and control characters. redef class Option redef fun pretty(off) do