blob: b4100bf7e89d531c7adbc93c467f198218addc56 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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)
|