code / nomsu

Lines6.6K Lua5.1K PEG1.3K make117
2 others 83
Markdown60 Bourne Again Shell23
(20 lines)
1 #!/usr/bin/env nomsu -V7.0.0
2 ###
3 This file defines upgrades from Nomsu <5.13 to 5.13
4 use "compatibility/compatibility"
6 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8 upgrade action (size of $) to "5.13" as #$
9 upgrade action "with" to "5.13" via
10 for $tree:
11 $assignments = $tree.2
12 $body = $tree.3
13 if ($assignments.type != "Dict"): return $tree
14 $new_assignments = \[]
15 for ($i = $a) in $assignments:
16 when:
17 (($a.type == "DictEntry") and (#$a == 1)): $a = $a.1
18 (all of [$a.type == "DictEntry", #$a == 2]): $a = \(\$a.1 = \$a.2)
19 $new_assignments.$i = $a
20 return \(with \$new_assignments \$body)