From b295df3c04e5f06e225c1634825bcf8c19d548e8 Mon Sep 17 00:00:00 2001 From: Alexandre Terrasa Date: Tue, 9 Dec 2014 17:51:31 -0500 Subject: [PATCH] nitpretty: fixes documentation warnings. Signed-off-by: Alexandre Terrasa --- src/nitpretty.nit | 9 +++++++++ src/pretty.nit | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/src/nitpretty.nit b/src/nitpretty.nit index c583b53..05283bf 100644 --- a/src/nitpretty.nit +++ b/src/nitpretty.nit @@ -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 diff --git a/src/pretty.nit b/src/pretty.nit index 3b3cb90..a99f3a6 100644 --- a/src/pretty.nit +++ b/src/pretty.nit @@ -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 -- 1.7.9.5