nomsu/lib/compatibility/7.nom
Bruce Hill 057f5b74eb Moving to better, more centralized versioning system. Now the Nomsu
version is just defined as a list at the top of nomsu.moon, and uses
X.Y.Z form instead of X.Y.Z.W. Added a ([...], from 2) method and a
([...], up to 5) method, and fixed a few upgrade bugs.
2019-02-06 15:34:00 -08:00

35 lines
1.1 KiB
Plaintext

#!/usr/bin/env nomsu -V7
###
This file defines upgrades from Nomsu <7 to 7
use "compatibility/compatibility"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
upgrade action ($tree with $t -> $replacement) to "7" as
$tree, with ($t -> $replacement)
upgrade action [
tree $tree with vars $replacements, $tree with vars $replacements
] to "7" as ($tree, with $replacements)
upgrade action ($tree has subtree $match_tree) to "7" as
$tree, contains $match_tree
upgrade $tree to "7" as:
if ($tree.type == "EscapedNomsu"):
$e = $tree.1
return
"Action" tree from $tree.source with ("Text" tree with $e.type) "tree" "with"
unpack $e
upgrade action "Nomsu version" to "7" via ->(`$(NOMSU VERSION))
upgrade action [
"Nomsu syntax version", "Nomsu compiler version", "core version", "lib version"
] to "7" via:
for $:
at $.source fail ("
Deprecation error: Actions for accessing specific parts of the version number have been deprecated.
Hint: Use $(NOMSU VERSION).1, etc. instead.
")