aboutsummaryrefslogtreecommitdiff
path: root/tools/parse.nom
diff options
context:
space:
mode:
Diffstat (limited to 'tools/parse.nom')
-rwxr-xr-xtools/parse.nom9
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)"