2019-03-20 15:55:57 -07:00
|
|
|
#!/usr/bin/env nomsu -V7.0.0
|
|
|
|
###
|
2019-01-08 16:33:23 -08:00
|
|
|
This file defines upgrades from Nomsu <5.13 to 5.13
|
2019-01-10 16:33:37 -08:00
|
|
|
use "compatibility/compatibility"
|
2019-01-08 16:33:23 -08:00
|
|
|
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2019-03-20 15:55:57 -07:00
|
|
|
upgrade action (size of $) to "5.13" as #$
|
2019-01-15 15:53:31 -08:00
|
|
|
upgrade action "with" to "5.13" via
|
2019-01-08 16:33:23 -08:00
|
|
|
for $tree:
|
|
|
|
$assignments = $tree.2
|
|
|
|
$body = $tree.3
|
2019-01-15 15:53:31 -08:00
|
|
|
if ($assignments.type != "Dict"): return $tree
|
2019-03-20 16:41:44 -07:00
|
|
|
$new_assignments = \[]
|
2019-03-20 15:55:57 -07:00
|
|
|
for ($i = $a) in $assignments:
|
2019-01-08 16:33:23 -08:00
|
|
|
when:
|
2019-03-20 15:55:57 -07:00
|
|
|
(($a.type == "DictEntry") and (#$a == 1)): $a = $a.1
|
2019-03-20 16:41:44 -07:00
|
|
|
(all of [$a.type == "DictEntry", #$a == 2]): $a = \(\$a.1 = \$a.2)
|
2019-01-08 16:33:23 -08:00
|
|
|
$new_assignments.$i = $a
|
2019-03-20 16:41:44 -07:00
|
|
|
return \(with \$new_assignments \$body)
|