aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-07-17 17:53:07 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-07-17 17:53:17 -0700
commit854b2a652ff473c9d2eaa3222008d4baed36ae63 (patch)
tree82c14202cb84cbddfdca3f3812cee90ec0ba95f5 /tools
parent77a338c1673ae5815ea2124f709cc657da30e8c8 (diff)
Fixed a bug in text escapes in nomsu codegen.
Diffstat (limited to 'tools')
-rw-r--r--tools/autoformat.nom6
-rw-r--r--tools/upgrade.nom10
2 files changed, 16 insertions, 0 deletions
diff --git a/tools/autoformat.nom b/tools/autoformat.nom
new file mode 100644
index 0000000..a755b09
--- /dev/null
+++ b/tools/autoformat.nom
@@ -0,0 +1,6 @@
+use "core"
+use "lib/os.nom"
+
+for %path in (=lua "arg"):
+ for file %filename in %path:
+ say ((parse (read file %filename) from %filename) as nomsu)
diff --git a/tools/upgrade.nom b/tools/upgrade.nom
new file mode 100644
index 0000000..e55d835
--- /dev/null
+++ b/tools/upgrade.nom
@@ -0,0 +1,10 @@
+use "core"
+use "compatibility"
+use "lib/os.nom"
+
+for %path in (=lua "arg"):
+ for file %filename in %path:
+ %tree <- (parse (read file %filename) from %filename)
+ %tree <- (%tree upgraded from %tree.version to (Nomsu version))
+ say "#!/usr/bin/env nomsu -V\(Nomsu version)\n\(%tree as nomsu)"
+