diff options
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/autoformat.nom | 4 | ||||
| -rwxr-xr-x | tools/find_action.nom | 4 | ||||
| -rwxr-xr-x | tools/parse.nom | 4 | ||||
| -rwxr-xr-x | tools/replace.nom | 4 | ||||
| -rwxr-xr-x | tools/test.nom | 8 | ||||
| -rwxr-xr-x | tools/upgrade.nom | 4 |
6 files changed, 14 insertions, 14 deletions
diff --git a/tools/autoformat.nom b/tools/autoformat.nom index dcccc21..42e7dca 100755 --- a/tools/autoformat.nom +++ b/tools/autoformat.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V3.7.5.6 +#!/usr/bin/env nomsu -V3.8.7.6 # Auto-format Nomsu code. Usage: nomsu tools/autoformat.nom [-i] file1 file2 directory1 ... @@ -15,7 +15,7 @@ if (%args.1 is "-i"): for %path in %args: for file %filename in %path: - unless (%filename matches "%.nom$"): do next %filename + unless (%filename::matches "%.nom$"): do next %filename %formatted = ".." #!/usr/bin/env nomsu -V\(Nomsu version) \((parse (read file %filename) from %filename) as nomsu) diff --git a/tools/find_action.nom b/tools/find_action.nom index 7067959..4918966 100755 --- a/tools/find_action.nom +++ b/tools/find_action.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V3.7.5.6 +#!/usr/bin/env nomsu -V3.8.7.6 # Find an action by its stub. Usage: nomsu tools/find_action.nom "foo %" file1 file2 directory1 ... @@ -12,7 +12,7 @@ say "Looking for stub: \%stub..." %files = ((command line args).% for % in 2 to (size of (command line args))) for %path in %files: for file %filename in %path: - unless (%filename matches "%.nom$") (do next %filename) + unless (%filename::matches "%.nom$") (do next %filename) %file = (read file %filename) %tree = (parse %file from %filename) for %t in recursive %tree: diff --git a/tools/parse.nom b/tools/parse.nom index 0622e27..ee4a722 100755 --- a/tools/parse.nom +++ b/tools/parse.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V3.7.5.6 +#!/usr/bin/env nomsu -V3.8.7.6 # Tool to print out a parse tree of files in an easy-to-read format. Usage: nomsu tools/parse.nom file1 file2 directory1 ... @@ -32,5 +32,5 @@ action [print tree %t at indent %indent]: for %path in (=lua "arg"): for file %filename in %path: - unless (%filename matches "%.nom$"): do next %filename + unless (%filename::matches "%.nom$"): do next %filename print tree (parse (read file %filename) from %filename) at indent "" diff --git a/tools/replace.nom b/tools/replace.nom index 76617cf..a0de4cc 100755 --- a/tools/replace.nom +++ b/tools/replace.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V3.7.5.6 +#!/usr/bin/env nomsu -V3.8.7.6 # Tool to find and replace one tree with another. nomsu tools/replace.nom [-i] tree_to_replace replacement file1 file2 directory1 ... @@ -21,7 +21,7 @@ if ((size of %args) < 3): %replacement = (parse (%args::remove index 1)) for %path in %args: for file %filename in %path: - unless (any [%filename matches "%.nom$", %filename == "-", %filename == "stdin"]): + unless (any [%filename::matches "%.nom$", %filename == "-", %filename == "stdin"]): do next %filename %tree = (parse (read file %filename) from %filename) %tree2 = (%tree with %pattern ~> %replacement) diff --git a/tools/test.nom b/tools/test.nom index 07f8c7d..5c42ec9 100755 --- a/tools/test.nom +++ b/tools/test.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V3.7.5.6 +#!/usr/bin/env nomsu -V3.8.7.6 # 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 ... @@ -14,13 +14,13 @@ if (%args.1 == "-v"): # Make sure all the files get run for %path in (command line args): for file %filename in %path: - if (%filename matches "%.nom$"): use %filename + if (%filename::matches "%.nom$"): use %filename for %path in (command line args): use %path %tests = ((=lua "Source:from_string(\%s)") = %t for %s = %t in (tests)) for %path in (command line args): for file %filename in %path: - unless (%filename matches "%.nom$"): do next %filename + unless (%filename::matches "%.nom$"): do next %filename %file_tests = [] for %src = %test in %tests: if (%src.filename == %filename): @@ -32,7 +32,7 @@ for %path in (command line args): if %verbose: say "" for % in %file_tests: if %verbose: - say " \(yellow (%.test with "\n" replaced by "\n "))" + say " \(yellow (%.test::with "\n" -> "\n "))" run %.test if %verbose: say (green "PASS") diff --git a/tools/upgrade.nom b/tools/upgrade.nom index 15f9b8c..d85465e 100755 --- a/tools/upgrade.nom +++ b/tools/upgrade.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V3.7.5.6 +#!/usr/bin/env nomsu -V3.8.7.6 # Tool to automatically update code from old versions of Nomsu. Usage: nomsu tools/upgrade.nom [-i] file1 file2 directory1 ... @@ -21,7 +21,7 @@ if (%args.1 is "-t"): for %path in %args: for file %filename in %path: - unless (%filename matches "%.nom$"): do next %filename + unless (%filename::matches "%.nom$"): do next %filename %tree = (parse (read file %filename) from %filename) %uptree = (%tree upgraded) %text = ".." |
