diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-03-20 15:55:57 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-03-20 15:55:57 -0700 |
| commit | e665d9725c4bb02f4c18d16527367f424cb880fa (patch) | |
| tree | aed161ee6b338c2bad2312591f746459414ccafa /lib/compatibility/4.11.nom | |
| parent | 606fd090002f3d545cbd58440e96624907846f45 (diff) | |
Auto-updated to 7.0.0 syntax and removed some shims.
Diffstat (limited to 'lib/compatibility/4.11.nom')
| -rw-r--r-- | lib/compatibility/4.11.nom | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lib/compatibility/4.11.nom b/lib/compatibility/4.11.nom index e30734d..e91f034 100644 --- a/lib/compatibility/4.11.nom +++ b/lib/compatibility/4.11.nom @@ -1,5 +1,6 @@ -#!/usr/bin/env nomsu -V6.15.13.8 -# +#!/usr/bin/env nomsu -V7.0.0 + +### This file defines upgrades from Nomsu <4.11 to Nomsu 4.11 (overhaul of function literals, deleting (if all of ...), etc. shorthand) @@ -7,22 +8,22 @@ use "compatibility/compatibility" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# Overhaul of function literals: +### Overhaul of function literals: upgrade action "call 1 with" to "4.11" via for ($tree $end_version): $tree2 = {.type = "Action", .source = $tree.source, .1 = $tree.2} - for $arg in $tree.4 at $i: + for ($i = $arg) in $tree.4: $tree2.($i + 1) = $arg return (SyntaxTree $tree2) -upgrade action (-> $yield_value) to "4.11" as (yield $yield_value) +upgrade action ->$yield_value to "4.11" as (yield $yield_value) -# Replace set {$x:1, $y:2} with [$x, $y] = [1, 2] +### Replace set {$x:1, $y:2} with [$x, $y] = [1, 2] upgrade action "set" to "4.11" via for ($tree $end_version): - [$lhs, $rhs] = [\[], \[]] + [$lhs, $rhs] = [`[], `[]] $lhs.source = $tree.2.source $rhs.source = $tree.2.source - for $entry in $tree.2 at $i: + for ($i = $entry) in $tree.2: $lhs.$i = $entry.1 $rhs.$i = $entry.2 return ("Action" tree from $tree.source with $lhs "=" $rhs) @@ -34,7 +35,7 @@ upgrade action "1 with 2 ~>" to "4.11" via Hint: Perhaps this could be use ($tree, map ...) instead. ") -# Changing filesystem API: +### Changing filesystem API: upgrade action (for file $f in $path $body) to "4.11" as for $f in (files for $path) $body @@ -45,7 +46,7 @@ upgrade action (line $n in $text) to "4.11" as ($text, line $n) upgrade action (line number of $pos in $text) to "4.11" as $text, line number at $pos -# Deduplicating goto labels: +### Deduplicating goto labels: upgrade action [=== $label ===, *** $label ***] to "4.11" as (--- $label ---) upgrade action [===stop $label ===, ***stop $label ***] to "4.11" as ---stop $label --- @@ -53,7 +54,7 @@ upgrade action [===stop $label ===, ***stop $label ***] to "4.11" as upgrade action [===next $label ===, ***next $label ***] to "4.11" as ---next $label --- -# Deprecating shorthand functions: +### Deprecating shorthand functions: upgrade action [if all of $items $body, if all of $items then $body] to "4.11" as if (all of $items) $body |
