nitpretty: fixes documentation warnings.
authorAlexandre Terrasa <alexandre@moz-code.org>
Tue, 9 Dec 2014 22:51:31 +0000 (17:51 -0500)
committerAlexandre Terrasa <alexandre@moz-code.org>
Tue, 9 Dec 2014 22:51:31 +0000 (17:51 -0500)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

src/nitpretty.nit
src/pretty.nit

index c583b53..05283bf 100644 (file)
@@ -203,16 +203,25 @@ module nitpretty
 import pretty
 
 redef class ToolContext
+       # The working directory used to store temp files.
        var opt_dir = new OptionString("Working directory (default is '.nitpretty')", "--dir")
 
+       # Output pretty printed code with this filename.
        var opt_output = new OptionString("Output name (default is pretty.nit)", "-o",
           "--output")
 
+       # Show diff between source and pretty printed code.
        var opt_diff = new OptionBool("Show diff between source and output", "--diff")
 
+       # Show diff between source and pretty printed code using meld.
        var opt_meld = new OptionBool("Show diff between source and output using meld",
           "--meld")
 
+       # Check formatting instead of pretty printing.
+       #
+       # This option create a tempory pretty printed file then check if
+       # the output of the diff command on the source file and the pretty
+       # printed one is empty.
        var opt_check = new OptionBool("Check format of Nit source files", "--check")
 end
 
index 3b3cb90..a99f3a6 100644 (file)
@@ -12,6 +12,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+# Library used to pretty print Nit code.
+#
+# See `nitpretty` tool for more documentation.
 module pretty
 
 import template
@@ -221,6 +224,7 @@ class PrettyPrinterVisitor
        # Add a space.
        fun adds do add " "
 
+       # Visit explicit receiver, implicit self will be ignored.
        fun visit_recv(n_expr: AExpr) do
                if not n_expr isa AImplicitSelfExpr then
                        visit n_expr