diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2018-09-26 12:45:08 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2018-09-26 12:45:19 -0700 |
| commit | 692fae5416ce1f2702b599ffb27b2e3d2235eba7 (patch) | |
| tree | 12ae256ef5606251bc013935390fdef7e737d79d /tools | |
| parent | 28d0792e69bbb9c467c616eb3dc89a60085c35f2 (diff) | |
Incremental fixes and more nomnom ports.
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/find_action.nom | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/find_action.nom b/tools/find_action.nom index e6fe90a..8381855 100755 --- a/tools/find_action.nom +++ b/tools/find_action.nom @@ -15,12 +15,19 @@ for %path in %files: unless (%filename::matches "%.nom$") (do next %filename) %file = (read file %filename) %tree = (parse %file from %filename) + %results = [] for %t in recursive %tree: if (%t is "Action" syntax tree): if (%t.stub is %stub): %line_num = (line number of %t.source.start in %file) - say (blue "\%filename:\%line_num:") - say (yellow (source lines of %t)) + %results::add {..} + line: %line_num + text: "\ + ..\(blue "\%filename:\%line_num:") + \(yellow (source lines of %t))" if (%t is syntax tree): for %sub in %t: recurse %t on %sub + sort %results by % -> %.line + for % in %results: + say %.text |
