From a1849da175765350e013bdeecfa4e0ad3c066937 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 27 Mar 2019 15:22:46 -0700 Subject: Autoformat (mostly just to do with the new blank-line-after-end-of-multi-indent-block rule --- lib/tools/format.nom | 1 - lib/tools/install.nom | 2 +- lib/tools/list.nom | 1 - lib/tools/parse.nom | 1 - lib/tools/repl.nom | 2 +- lib/tools/replace.nom | 5 +++-- lib/tools/test.nom | 1 - lib/tools/tutorial.nom | 2 +- lib/tools/uninstall.nom | 1 - lib/tools/upgrade.nom | 5 +++-- 10 files changed, 9 insertions(+), 12 deletions(-) (limited to 'lib/tools') diff --git a/lib/tools/format.nom b/lib/tools/format.nom index e20adbd..4d490de 100755 --- a/lib/tools/format.nom +++ b/lib/tools/format.nom @@ -1,5 +1,4 @@ #!/usr/bin/env nomsu -V7.0.0 - ### Auto-format Nomsu code. Usage: nomsu -t format [-i] file1 file2... diff --git a/lib/tools/install.nom b/lib/tools/install.nom index afd6069..f84416d 100755 --- a/lib/tools/install.nom +++ b/lib/tools/install.nom @@ -1,5 +1,4 @@ #!/usr/bin/env nomsu -V7.0.0 - ### A tool to install third party Nomsu packages @@ -57,4 +56,5 @@ command line program with $args: $cmd = ($filename, with $patt -> $action.cmd) run command $cmd do next $filename + fail "Not sure what to do with \$filename" \ No newline at end of file diff --git a/lib/tools/list.nom b/lib/tools/list.nom index 77bb8a7..fd283e4 100644 --- a/lib/tools/list.nom +++ b/lib/tools/list.nom @@ -1,5 +1,4 @@ #!/usr/bin/env nomsu -V7.0.0 - ### A tool to list installed third party Nomsu packages diff --git a/lib/tools/parse.nom b/lib/tools/parse.nom index 7224901..1201040 100755 --- a/lib/tools/parse.nom +++ b/lib/tools/parse.nom @@ -1,5 +1,4 @@ #!/usr/bin/env nomsu -V7.0.0 - ### Tool to print out a parse tree of files in an easy-to-read format. Usage: nomsu tools/parse.nom file1 file2 directory1 ... diff --git a/lib/tools/repl.nom b/lib/tools/repl.nom index 2e0c7da..fef2984 100755 --- a/lib/tools/repl.nom +++ b/lib/tools/repl.nom @@ -1,5 +1,4 @@ #!/usr/bin/env nomsu -V7.0.0 - ### This file defines a Read-Evaluate-Print-Loop (REPL) for Nomsu @@ -54,6 +53,7 @@ command line program with $args: ### clear the line if $(COLOR ENABLED): say "\027[1A\027[2K" inline + go to (run buffer) $buff, add ($line, with "\t" -> " ") say (dim (yellow ".. ")) inline diff --git a/lib/tools/replace.nom b/lib/tools/replace.nom index aea1b03..fe07140 100755 --- a/lib/tools/replace.nom +++ b/lib/tools/replace.nom @@ -1,5 +1,4 @@ #!/usr/bin/env nomsu -V7.0.0 - ### This is a tool to replace syntax trees with something new. @@ -63,6 +62,7 @@ command line program with $args: ..else: $substitution_values.($patt.1) = $tree return $substitution_values + ($tree.type != $patt.type): return (nil) ($tree.type == "Action"): if (($tree, get stub) != ($patt, get stub)): return (nil) @@ -135,6 +135,7 @@ command line program with $args: if ($user_answers.$t == "n"): return (nil) $replaced.$t = (yes) return $ret + $tree2 = ($tree with replacements) if $args.i: if (#$user_answers > 0): say "" @@ -145,4 +146,4 @@ command line program with $args: if (#$replaced > 0): write "\($tree2 as nomsu)" to file $filename ..else: - say ($tree2 as nomsu) + say ($tree2 as nomsu) \ No newline at end of file diff --git a/lib/tools/test.nom b/lib/tools/test.nom index 8244f70..fce2694 100755 --- a/lib/tools/test.nom +++ b/lib/tools/test.nom @@ -1,5 +1,4 @@ #!/usr/bin/env nomsu -V7.0.0 - ### Tool to run all tests in a file (i.e. the code block inside a call to 'test $'). Usage: nomsu tools/test.nom file1 file2 directory1 ... diff --git a/lib/tools/tutorial.nom b/lib/tools/tutorial.nom index ca5e109..921d8c3 100755 --- a/lib/tools/tutorial.nom +++ b/lib/tools/tutorial.nom @@ -558,4 +558,4 @@ command line program with $args: \\(^\("ᴗ" if $(COLOR ENABLED) else "_")^)/ - ") + ") \ No newline at end of file diff --git a/lib/tools/uninstall.nom b/lib/tools/uninstall.nom index f5dbaa3..bcc77cc 100755 --- a/lib/tools/uninstall.nom +++ b/lib/tools/uninstall.nom @@ -1,5 +1,4 @@ #!/usr/bin/env nomsu -V7.0.0 - ### A tool to uninstall third party Nomsu packages (the inverse of the install tool) diff --git a/lib/tools/upgrade.nom b/lib/tools/upgrade.nom index 65e9e68..f188276 100755 --- a/lib/tools/upgrade.nom +++ b/lib/tools/upgrade.nom @@ -1,5 +1,4 @@ #!/usr/bin/env nomsu -V7.0.0 - ### Tool to automatically update code from old versions of Nomsu. Usage: nomsu tools/upgrade.nom [-i] file1 file2 directory1 ... @@ -19,6 +18,7 @@ command line program with $args: if $start_version: try: use $start_version + $version = ($args."upgrade-to" or $(NOMSU VERSION)) $test = ($args.t or $args.test) for $filename in $args.extras: @@ -31,6 +31,7 @@ command line program with $args: $uptree = $tree upgraded from ($start_version or ($tree.version or $(NOMSU VERSION))) to $version + $text = "\$leading_indent\($uptree as nomsu, text, with "\n" -> "\n\$leading_indent")" when: $inplace: @@ -44,4 +45,4 @@ command line program with $args: say (bright "\$filename will be changed") else: - say $text inline + say $text inline \ No newline at end of file -- cgit v1.2.3