aboutsummaryrefslogtreecommitdiff
path: root/lib/tools/find.nom
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tools/find.nom')
-rwxr-xr-xlib/tools/find.nom10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/tools/find.nom b/lib/tools/find.nom
index a4db987..db7a2c5 100755
--- a/lib/tools/find.nom
+++ b/lib/tools/find.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V6.14
+#!/usr/bin/env nomsu -V6.15.13.8
#
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
@@ -55,7 +55,7 @@ command line program with $args:
Warning: searching stdin (ctrl-d to abort). To avoid this message, use nomsu -t find -
")
$filenames = ["stdin"]
-
+
for $filename in $filenames:
$file = (read file $filename)
unless $file:
@@ -79,7 +79,11 @@ command line program with $args:
if ($t matches $pattern_tree):
$line_num = ($file, line number at $t.source.start)
$results, add {
- .line = $line_num, .text = "\(blue "\$filename:\$line_num:")\n\(source lines of $t)"
+ .line = $line_num
+ .text = ("
+ \(blue "\$filename:\$line_num:")
+ \(source lines of $t)
+ ")
}
for $sub in $t: