aboutsummaryrefslogtreecommitdiff
path: root/lib/tools/parse.nom
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-03-20 15:55:57 -0700
committerBruce Hill <bruce@bruce-hill.com>2019-03-20 15:55:57 -0700
commite665d9725c4bb02f4c18d16527367f424cb880fa (patch)
treeaed161ee6b338c2bad2312591f746459414ccafa /lib/tools/parse.nom
parent606fd090002f3d545cbd58440e96624907846f45 (diff)
Auto-updated to 7.0.0 syntax and removed some shims.
Diffstat (limited to 'lib/tools/parse.nom')
-rwxr-xr-xlib/tools/parse.nom11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/tools/parse.nom b/lib/tools/parse.nom
index 89af6f6..7224901 100755
--- a/lib/tools/parse.nom
+++ b/lib/tools/parse.nom
@@ -1,5 +1,6 @@
-#!/usr/bin/env nomsu -V6.15.13.8
-#
+#!/usr/bin/env nomsu -V7.0.0
+
+###
Tool to print out a parse tree of files in an easy-to-read format. Usage:
nomsu tools/parse.nom file1 file2 directory1 ...
@@ -42,9 +43,9 @@ use "commandline"
"a Syntax Tree":
$body = ([: for $bit in $: add ($bit as xml)], joined with " ")
if ($.type == "Action"):
- return "<Action name=\"\(($, get stub) as xml)\">\$body</Action>"
+ return "<Action name=\"\(($, get stub) as xml)\">\($body)</Action>"
..else:
- return "<\($.type)>\$body</\($.type)>"
+ return "<\($.type)>\($body)</\($.type)>"
"Text":
return
@@ -73,7 +74,7 @@ command line program with $args:
$file = (read file $filename)
unless $file:
fail "File does not exist: \$filename"
- $nomsu = (NomsuCode from (Source $filename 1 (#$file)) $file)
+ $nomsu = (NomsuCode from (Source $filename 1 #$file) $file)
$tree = ($nomsu parsed)
when:
($args.x or $args.xml):