diff options
Diffstat (limited to 'compatibility')
| -rw-r--r-- | compatibility/5.13.nom | 24 | ||||
| -rw-r--r-- | compatibility/6.14.nom | 33 |
2 files changed, 57 insertions, 0 deletions
diff --git a/compatibility/5.13.nom b/compatibility/5.13.nom new file mode 100644 index 0000000..b4100bf --- /dev/null +++ b/compatibility/5.13.nom @@ -0,0 +1,24 @@ +#!/usr/bin/env nomsu -V5.13 +# + This file defines upgrades from Nomsu <5.13 to 5.13 +use "compatibility/compatibility.nom" + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +upgrade action (size of $) to "5.13" as (#$) + +upgrade action "with" to "5.13" via (..) + for $tree: + $assignments = $tree.2 + $body = $tree.3 + if ($assignments.type != "Dict"): + return $tree + $new_assignments = \[] + for $a in $assignments at $i: + when: + (($a.type == "DictEntry") and ((#$a) == 1)): + $a = $a.1 + (all of [$a.type == "DictEntry", (#$a) == 2]): + $a = \($a.1 = $a.2) + $new_assignments.$i = $a + return \(with $new_assignments $body) diff --git a/compatibility/6.14.nom b/compatibility/6.14.nom new file mode 100644 index 0000000..01d3fac --- /dev/null +++ b/compatibility/6.14.nom @@ -0,0 +1,33 @@ +#!/usr/bin/env nomsu -V6.14 +# + This file defines upgrades from Nomsu <6.14 to 6.14 +use "compatibility/compatibility.nom" + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +upgrade action + try $action and if it succeeds $success or if it barfs $msg $fallback +..to "6.14" as (try $action if it succeeds $success if it fails $msg $fallback) + +upgrade action + try $action and if it barfs $msg $fallback or if it succeeds $success +..to "6.14" as (try $action if it fails $msg $fallback if it succeeds $success) + +upgrade action (try $action and if it barfs $fallback or if it succeeds $success) +..to "6.14" as (try $action if it fails $fallback if it succeeds $success) + +upgrade action (try $action and if it barfs $msg $fallback) to "6.14" as + try $action if it fails $msg $fallback + +upgrade action (try $action and if it succeeds $success) to "6.14" as + try $action if it succeeds $success + +upgrade action (assume $assumption or barf $err) to "6.14" as + unless $assumption: fail $err + +upgrade action (barf $msg) to "6.14" as (fail $msg) + +upgrade action (\(1's meaning)).stub to "6.14" via + $tree -> (SyntaxTree {.source = $tree.source, .type = "Var", $tree.1}) + +upgrade action (log base $b of $n) to "6.14" as (log $n base $b) |
