diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2018-11-11 15:50:46 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2018-11-11 15:50:46 -0800 |
| commit | 4efe44ed271aeed8e25e909344788d92a0d9f82b (patch) | |
| tree | 73766440b53031d4fc8210dbe3b0aece47e6b852 /tools/parse.nom | |
| parent | ba03cb67c3c8ba53451eba25dd2186f095cd1db2 (diff) | |
Fully upgraded to 4.10.12.7, including deprecating the old list/dict
comprehension methods, in favor of the new native support.
Diffstat (limited to 'tools/parse.nom')
| -rwxr-xr-x | tools/parse.nom | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/parse.nom b/tools/parse.nom index 1465bb3..6f88179 100755 --- a/tools/parse.nom +++ b/tools/parse.nom @@ -1,8 +1,8 @@ -#!/usr/bin/env nomsu -V4.8.10 +#!/usr/bin/env nomsu -V4.10.12.7 # Tool to print out a parse tree of files in an easy-to-read format. Usage: nomsu tools/parse.nom file1 file2 directory1 ... - + use "lib/os.nom" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -21,14 +21,17 @@ externally (print tree %t at indent %indent) means: "Number": say "\%indent\(%t.1)" + "Var": say "\(%indent)%\(%t.1)" + else: say "\%indent\(%t.type):" for %arg in %t: - if: + when: (%arg is syntax tree): print tree %arg at indent "\%indent " + else: say "\%indent \(quote %arg)" |
