src/doc: introduce option --no-render in HTML phase.
[nit.git] / src / toolcontext.nit
index 8196aeb..98b746a 100644 (file)
@@ -84,7 +84,7 @@ class Message
        # A colored version of the message including the original source line
        fun to_color_string: String
        do
-               var esc = 27.ascii
+               var esc = 27.code_point
                #var red = "{esc}[0;31m"
                #var bred = "{esc}[1;31m"
                #var green = "{esc}[0;32m"
@@ -469,7 +469,7 @@ The Nit language documentation and the source code of its tools and libraries ma
                        exit 0
                end
 
-               var errors = option_context.get_errors
+               var errors = option_context.errors
                if not errors.is_empty then
                        for e in errors do print "Error: {e}"
                        print tooldescription
@@ -515,10 +515,10 @@ The Nit language documentation and the source code of its tools and libraries ma
                if opt_set_dummy_tool.value then
                        return "DUMMY_TOOL"
                end
-               return sys.program_name.basename("")
+               return sys.program_name.basename
        end
 
-       # The identified root directory of the Nit project
+       # The identified root directory of the Nit package
        var nit_dir: String is noinit
 
        private fun compute_nit_dir: String
@@ -574,16 +574,18 @@ end
 #
 # On some Linux systems `bash_completion` allow the program to control command line behaviour.
 #
-#      $ nitls [TAB][TAB]
-#      file1.nit              file2.nit              file3.nit
+# ~~~sh
+# $ nitls [TAB][TAB]
+# file1.nit              file2.nit              file3.nit
 #
-#      $ nitls --[TAB][TAB]
-#      --bash-toolname        --keep                 --path                 --tree
-#      --depends              --log                  --project              --verbose
-#      --disable-phase        --log-dir              --quiet                --version
-#      --gen-bash-completion  --no-color             --recursive            --warn
-#      --help                 --only-metamodel       --source
-#      --ignore-visibility    --only-parse           --stop-on-first-error
+# $ nitls --[TAB][TAB]
+# --bash-toolname        --keep                 --path                 --tree
+# --depends              --log                  --package              --verbose
+# --disable-phase        --log-dir              --quiet                --version
+# --gen-bash-completion  --no-color             --recursive            --warn
+# --help                 --only-metamodel       --source
+# --ignore-visibility    --only-parse           --stop-on-first-error
+# ~~~
 #
 # Generated file can be placed in system bash_completion directory `/etc/bash_completion.d/`
 # or source it in `~/.bash_completion`.