diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-01-15 15:53:31 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-01-15 15:54:28 -0800 |
| commit | bf37295faeb9535c56671f4b2050260e1b88cd32 (patch) | |
| tree | d544b68bca8c5bdf0926cc20a12f925c1761cfda /lib/tools/find.nom | |
| parent | ef70abe4b7ed8d04574ab24ea4fd74fe2a64221f (diff) | |
Updating to v6.15, which includes "external (...)" instead of separate
'externally' versions of stuff, and some auto-formatting.
Diffstat (limited to 'lib/tools/find.nom')
| -rwxr-xr-x | lib/tools/find.nom | 10 |
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: |
