aboutsummaryrefslogtreecommitdiff
path: root/lib/tools
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-03-27 15:22:46 -0700
committerBruce Hill <bruce@bruce-hill.com>2019-03-27 15:22:46 -0700
commita1849da175765350e013bdeecfa4e0ad3c066937 (patch)
tree616a115790271757148044e2b3228fb715c00726 /lib/tools
parentbb07e6724118c431c3beed4060776678128905a1 (diff)
Autoformat (mostly just to do with the new
blank-line-after-end-of-multi-indent-block rule
Diffstat (limited to 'lib/tools')
-rwxr-xr-xlib/tools/format.nom1
-rwxr-xr-xlib/tools/install.nom2
-rw-r--r--lib/tools/list.nom1
-rwxr-xr-xlib/tools/parse.nom1
-rwxr-xr-xlib/tools/repl.nom2
-rwxr-xr-xlib/tools/replace.nom5
-rwxr-xr-xlib/tools/test.nom1
-rwxr-xr-xlib/tools/tutorial.nom2
-rwxr-xr-xlib/tools/uninstall.nom1
-rwxr-xr-xlib/tools/upgrade.nom5
10 files changed, 9 insertions, 12 deletions
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