-Generates HTML of highlited code from Nit source files.
+nitlight - generates HTML of highlighted code from Nit source files.
-# SYNOPSYS
+# SYNOPSIS
-nitlight [*options*]...
+nitlight [*options*] FILE...
-# OPTIONS
+# DESCRIPTION
-`-W`, `--warn`
-: Show more warnings
+Unlike generic lexical or syntactic highlighter, nitlight use semantic information on programs to improve the rendered result.
+
+# OPTIONS
-`-w`, `--warning`
-: Show/hide a specific warning
+Common options of the Nit tools are understood.
+Here, only the specific one are indicated.
-`-q`, `--quiet`
-: Do not show warnings
+### `--txt`
+Generate text with ANSI coloring escape sequences.
-`--stop-on-first-error`
-: Stop on first error
+Instead of HTML, this generate text files with ANSI escape sequence for colors.
+The options `-f`, `--line-id-prefix` and `--ast` are ignored in this mode.
-`--no-color`
-: Do not use color to display errors and warnings
+### `-f`, `--fragment`
+Omit document header and footer.
-`--log`
-: Generate various log files
+By default, a complete autonomous HTML document is generated.
+If `-f` is given, only the inside of the body part is generated such that it could be integrated
+into a HTML document.
-`--log-dir`
-: Directory where to generate log files
+### `--line-id-prefix`
+Prefix of the id of each line `<span>` element.
-`-h`, `-?`, `--help`
-: Show Help (This screen)
+By default, each line is enclosed in its own `<span>` element with an `id` attribute made of the line number prefixed by `L` (e.g. `L1` for the first line).
-`--version`
-: Show version and exit
+This option changes the prefix used.
+If an empty string is used, then the `<span>` are generated without `id` attributes.
-`--set-dummy-tool`
-: Set toolname and version to DUMMY. Useful for testing
+This option is especially useful with `--fragment` when more than one highlighted code is
+included in the same HTML document.
+Each fragment can thus be generated with its own distinct prefix, or the id can be disabled altogether.
-`-v`, `--verbose`
-: Verbose
+### `--first-line`
+Start the source file at this line (default: 1).
-`--bash-completion`
-: Generate bash_completion file for this program
+The generated HTML will only contains lines bellow the specified one.
-`--stub-man`
-: Generate a stub manpage in pandoc markdown format
+### `--last-line`
+End the source file at this line (default: to the end).
-`--disable-phase`
-: DEBUG: Disable a specific phase; use `list` to get the list.
+The generated HTML will only contains lines above the specified one.
-`-I`, `--path`
-: Set include path for loaders (may be used more than once)
+### `-d`, `--dir`
+Output html files in a specific directory (required if more than one module).
-`--only-parse`
-: Only proceed to parse step of loaders
+By default the generated HTML is outputted on the screen.
+If this option is used, then HTML files are generated in the specified directory.
-`--only-metamodel`
-: Stop after meta-model processing
+A basic `index.heml` and a `style.css` file are also generated in the directory.
-`--ignore-visibility`
-: Do not check, and produce errors, on visibility issues.
+### `--full`
+Process also imported modules.
-`-f`, `--fragment`
-: Omit document header and footer
+By default, only the modules indicated on the command line are highlighted.
-`--first-line`
-: Start the source file at this line (default: 1)
+With the `--full` option, all imported modules (even those in standard) are also precessed.
-`--last-line`
-: End the source file at this line (default: to the end)
+### `--no-infobox`
+Disable the generation of infoboxes.
-`-d`, `--dir`
-: Output html files in a specific directory (required if more than one module)
+### `--ast`
+Generate specific HTML elements for each Node of the AST.
-`--full`
-: Process also imported modules
+Additional `<span>` elements are generated for each node of the AST.