diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-01-01 17:15:51 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-01-01 17:17:23 -0800 |
| commit | 3e89092833a6d407e711fe4ae5f44474ff34cf64 (patch) | |
| tree | 5ffe2df86f648b604347b59999992d74f71a796c /tools/find.nom | |
| parent | e68eb04d690454428216a0f0f1b11399feeb7dc1 (diff) | |
Some changes to the error API, a fix for statement block parsing, and
replacing ((foo 1 baz)'s meaning) with $(foo 1 baz).
Diffstat (limited to 'tools/find.nom')
| -rwxr-xr-x | tools/find.nom | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/find.nom b/tools/find.nom index 781ca3f..8f2bc9f 100755 --- a/tools/find.nom +++ b/tools/find.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V6.13.12.8 +#!/usr/bin/env nomsu -V6.14 # This is a tool to find syntax trees matching a pattern. "*" is a wildcard that will match any subtree, and "**" is a wildcard that will match any @@ -24,7 +24,7 @@ use "lib/consolecolor.nom" $wildcard = ($(COMMAND LINE ARGS).wildcard or "%*") $pattern = $(COMMAND LINE ARGS).extras.1 if (any of [not $pattern, $pattern == "*", $pattern == "**"]): - barf (" + fail (" Usage: nomsu -t find [-l] [--wildcard=<wildcard>] <pattern>, where <pattern> is valid Nomsu code ") $pattern = ($pattern, with "\$wildcard\$wildcard" -> "$multi_wildcard") @@ -57,11 +57,11 @@ if ((#$filenames) == 0): for $filename in $filenames: $file = (read file $filename) unless $file: - barf "File does not exist: \$filename" + fail "File does not exist: \$filename" $code = (NomsuCode from ($Source $filename 1 (size of $file)) $file) try: $tree = ($code parsed) - ..and if it barfs $msg: + ..if it fails $msg: say red (" \$filename failed to parse: |
