diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2018-12-14 20:21:03 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2018-12-14 20:21:03 -0800 |
| commit | 4fe63f253f58f87ab986fea38902d95f2a5ea338 (patch) | |
| tree | 12094f1c69b8ab375eb17507c959c43f9295c6c2 /compatibility/4.10.12.7.nom | |
| parent | 6abec65843f0f37f7fc6032ac5db0fff3db71815 (diff) | |
Auto-updated to version 5
Diffstat (limited to 'compatibility/4.10.12.7.nom')
| -rw-r--r-- | compatibility/4.10.12.7.nom | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/compatibility/4.10.12.7.nom b/compatibility/4.10.12.7.nom index 5887684..c5abe1a 100644 --- a/compatibility/4.10.12.7.nom +++ b/compatibility/4.10.12.7.nom @@ -1,80 +1,80 @@ -#!/usr/bin/env nomsu -V4.12.12.8 +#!/usr/bin/env nomsu -V5.12.12.8 # This file defines upgrades from Nomsu <4.10.12.7 to 4.10.12.7 use "compatibility/compatibility.nom" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -upgrade action (% as lua statements) to "4.10.12.7" as (% as lua) -upgrade action (% as lua return) to "4.10.12.7" as (..) - =lua "\%.type == 'Block' and \(% as lua) or 'return '..\(% as lua expr)" -upgrade action (Lua value %) to "4.10.12.7" as (Lua %) -upgrade action (%e for % in %items) to "4.10.12.7" as [: for % in %items: add %e] -upgrade action (%e for %k = %v in %items) to "4.10.12.7" as [..] - : for %k = %v in %items: add %e +upgrade action ($ as lua statements) to "4.10.12.7" as ($ as lua) +upgrade action ($ as lua return) to "4.10.12.7" as (..) + =lua "\$.type == 'Block' and \($ as lua) or 'return '..\($ as lua expr)" +upgrade action (Lua value $) to "4.10.12.7" as (Lua $) +upgrade action ($e for $ in $items) to "4.10.12.7" as [: for $ in $items: add $e] +upgrade action ($e for $k = $v in $items) to "4.10.12.7" as [..] + : for $k = $v in $items: add $e -upgrade action (%e for %i in %start to %stop) to "4.10.12.7" as [..] - : for %i in %start to %stop: add %e +upgrade action ($e for $i in $start to $stop) to "4.10.12.7" as [..] + : for $i in $start to $stop: add $e -upgrade action (%e for %i in %start to %stop by %step) to "4.10.12.7" as [..] - : for %i in %start to %stop by %step: add %e +upgrade action ($e for $i in $start to $stop by $step) to "4.10.12.7" as [..] + : for $i in $start to $stop by $step: add $e -upgrade action (%e for %i in %start to %stop via %step) to "4.10.12.7" as [..] - : for %i in %start to %stop by %step: add %e +upgrade action ($e for $i in $start to $stop via $step) to "4.10.12.7" as [..] + : for $i in $start to $stop by $step: add $e -upgrade action (%k = %v for % in %items) to "4.10.12.7" as {..} - : for % in %items: add %k = %v +upgrade action ($k = $v for $ in $items) to "4.10.12.7" as {..} + : for $ in $items: add $k = $v -upgrade action (%k = %v for %k0 = %v0 in %items) to "4.10.12.7" as {..} - : for %k0 = %v0 in %items: add %k = %v +upgrade action ($k = $v for $k0 = $v0 in $items) to "4.10.12.7" as {..} + : for $k0 = $v0 in $items: add $k = $v -upgrade action (%k = %v for %i in %start to %stop) to "4.10.12.7" as {..} - : for %i in %start to %stop: add %k = %v +upgrade action ($k = $v for $i in $start to $stop) to "4.10.12.7" as {..} + : for $i in $start to $stop: add $k = $v -upgrade action (%k = %v for %i in %start to %stop by %step) to "4.10.12.7" as {..} - : for %i in %start to %stop by %step: add %k = %v +upgrade action ($k = $v for $i in $start to $stop by $step) to "4.10.12.7" as {..} + : for $i in $start to $stop by $step: add $k = $v -upgrade action (%k = %v for %i in %start to %stop via %step) to "4.10.12.7" as {..} - : for %i in %start to %stop by %step: add %k = %v +upgrade action ($k = $v for $i in $start to $stop via $step) to "4.10.12.7" as {..} + : for $i in $start to $stop by $step: add $k = $v -upgrade action (parse %text from %filename) to "4.10.12.7" as (..) - (NomsuCode from (Source %filename 1 (size of %text)) %text) parsed +upgrade action (parse $text from $filename) to "4.10.12.7" as (..) + (NomsuCode from (Source $filename 1 (size of $text)) $text) parsed -upgrade action (% as lua statements) to "4.10.12.7" as (% as lua) -upgrade action (compile error at %pos %err hint %hint) to "4.10.12.7" as (..) - compile error at %pos %err %hint +upgrade action ($ as lua statements) to "4.10.12.7" as ($ as lua) +upgrade action (compile error at $pos $err hint $hint) to "4.10.12.7" as (..) + compile error at $pos $err $hint # In old code, it was okay to have imports at the top of the file in the same chunk, but changes to the API now require imports to be in their own file chunk in order for compilation to work properly. -upgrade %tree to "4.10.12.7" as: - if (%tree.type == "FileChunks"): - %first_chunk = %tree.1 - %i = 1 - %has_use = (no) - repeat while (%i <= (size of %first_chunk)): - if ((%first_chunk.%i.type == "Action") and (%first_chunk.%i.stub == "use")): - %has_use = (yes) +upgrade $tree to "4.10.12.7" as: + if ($tree.type == "FileChunks"): + $first_chunk = $tree.1 + $i = 1 + $has_use = (no) + repeat while ($i <= (size of $first_chunk)): + if (($first_chunk.$i.type == "Action") and ($first_chunk.$i.stub == "use")): + $has_use = (yes) ..else: - if %has_use: + if $has_use: go to (insert chunk) - %i += 1 + $i += 1 return --- (insert chunk) --- - [%chunk1, %chunk2] = [..] - SyntaxTree {type: "Block", source: %first_chunk.source} - SyntaxTree {type: "Block", source: %first_chunk.source} + [$chunk1, $chunk2] = [..] + SyntaxTree {type: "Block", source: $first_chunk.source} + SyntaxTree {type: "Block", source: $first_chunk.source} - for %j in 1 to (%i - 1): - %chunk1.%j = %first_chunk.%j + for $j in 1 to ($i - 1): + $chunk1.$j = $first_chunk.$j - for %j in %i to (size of %first_chunk): - %chunk2.(%j - %i + 1) = %first_chunk.%j + for $j in $i to (size of $first_chunk): + $chunk2.($j - $i + 1) = $first_chunk.$j - %new_tree = (..) - SyntaxTree {source: %tree.source, type: "FileChunks", 1: %chunk1, 2: %chunk2} + $new_tree = (..) + SyntaxTree {source: $tree.source, type: "FileChunks", 1: $chunk1, 2: $chunk2} - for %i in 2 to (size of %tree): - %new_tree.(%i + 1) = %tree.%i + for $i in 2 to (size of $tree): + $new_tree.($i + 1) = $tree.$i - return %new_tree + return $new_tree |
