(55 lines)
1 #!/usr/bin/env nomsu -V7.0.02 ###3 This file defines upgrades from Nomsu <7 to 75 use "compatibility/compatibility"7 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~9 upgrade action ($tree with $t -> $replacement) to "7" as10 $tree, with ($t -> $replacement)12 upgrade action [13 tree $tree with vars $replacements, $tree with vars $replacements14 ] to "7" as ($tree, with $replacements)16 upgrade action ($tree has subtree $match_tree) to "7" as17 $tree, contains $match_tree19 upgrade action (for $var in $iterable at $i $body) to "7" as20 for ($i = $var) in $iterable $body22 upgrade action (for $k = $v in $iterable $body) to "7" as23 for ($k = $v) in $iterable $body25 upgrade action [26 for $var in $start to $stop by $step $body27 for $var in $start to $stop via $step $body28 ] to "7" as (for $var in ($start to $stop by $step) $body)30 upgrade action (for $var in $start to $stop $body) to "7" as31 for $var in ($start to $stop) $body33 upgrade $tree to "7" as:34 if ($tree.type == "EscapedNomsu"):35 $t =36 "Action" tree from $tree.source with ("Text" tree with $tree.1.type) "tree"37 "with"39 for $tok in $tree.1:40 if ($tok is "Text"):41 $t, add ("Text" tree with $tok)42 ..else:43 $t, add $tok45 return $t47 upgrade action "Nomsu version" to "7" via ->(\$(NOMSU VERSION))48 upgrade action [49 "Nomsu syntax version", "Nomsu compiler version", "core version", "lib version"50 ] to "7" via51 for $:52 at $.source fail ("53 Deprecation error: Actions for accessing specific parts of the version number have been deprecated.54 Hint: Use $(NOMSU VERSION).1, etc. instead.55 ")