diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2018-11-19 17:37:37 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2018-11-19 17:37:37 -0800 |
| commit | a89d69e843ba83df928051005d02a932a9981f46 (patch) | |
| tree | 17f99cda2d4e5f0a7983ed14f4ac559b64944207 /compatibility | |
| parent | 43ff3892f39188163446f1a00ee8d2aad59e0392 (diff) | |
Autoformatted/auto-upgraded.
Diffstat (limited to 'compatibility')
| -rw-r--r-- | compatibility/2.3.nom | 2 | ||||
| -rw-r--r-- | compatibility/2.4.nom | 2 | ||||
| -rw-r--r-- | compatibility/2.5.5.5.nom | 2 | ||||
| -rw-r--r-- | compatibility/2.5.nom | 2 | ||||
| -rw-r--r-- | compatibility/2.nom | 2 | ||||
| -rw-r--r-- | compatibility/3.5.5.6.nom | 2 | ||||
| -rw-r--r-- | compatibility/3.6.nom | 2 | ||||
| -rw-r--r-- | compatibility/3.7.nom | 2 | ||||
| -rw-r--r-- | compatibility/3.8.nom | 2 | ||||
| -rw-r--r-- | compatibility/3.nom | 2 | ||||
| -rw-r--r-- | compatibility/4.10.12.7.nom | 15 | ||||
| -rw-r--r-- | compatibility/4.11.nom | 14 | ||||
| -rw-r--r-- | compatibility/4.8.10.nom | 2 | ||||
| -rw-r--r-- | compatibility/4.9.nom | 2 | ||||
| -rw-r--r-- | compatibility/compatibility.nom | 4 |
15 files changed, 33 insertions, 24 deletions
diff --git a/compatibility/2.3.nom b/compatibility/2.3.nom index a07729c..1664429 100644 --- a/compatibility/2.3.nom +++ b/compatibility/2.3.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V4.11 +#!/usr/bin/env nomsu -V4.11.12.8 # This file defines upgrades from Nomsu <2.3 to Nomsu 2.3 diff --git a/compatibility/2.4.nom b/compatibility/2.4.nom index ef78a89..dbc6517 100644 --- a/compatibility/2.4.nom +++ b/compatibility/2.4.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V4.10.12.7 +#!/usr/bin/env nomsu -V4.11.12.8 # This file defines upgrades from Nomsu <2.4 to Nomsu 2.4 diff --git a/compatibility/2.5.5.5.nom b/compatibility/2.5.5.5.nom index 9bbee06..6da70d4 100644 --- a/compatibility/2.5.5.5.nom +++ b/compatibility/2.5.5.5.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V4.10.12.7 +#!/usr/bin/env nomsu -V4.11.12.8 # This file defines upgrades from Nomsu <2.5.5.5 to Nomsu 2.5.5.5 diff --git a/compatibility/2.5.nom b/compatibility/2.5.nom index 816691e..a1a33b7 100644 --- a/compatibility/2.5.nom +++ b/compatibility/2.5.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V4.10.12.7 +#!/usr/bin/env nomsu -V4.11.12.8 # This file defines upgrades from Nomsu <2.5 to Nomsu 2.5 diff --git a/compatibility/2.nom b/compatibility/2.nom index 2ca4526..311002d 100644 --- a/compatibility/2.nom +++ b/compatibility/2.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V4.10.12.7 +#!/usr/bin/env nomsu -V4.11.12.8 # This file defines upgrades from Nomsu 1 to Nomsu 2 diff --git a/compatibility/3.5.5.6.nom b/compatibility/3.5.5.6.nom index aebd0a5..de6cc1f 100644 --- a/compatibility/3.5.5.6.nom +++ b/compatibility/3.5.5.6.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V4.10.12.7 +#!/usr/bin/env nomsu -V4.11.12.8 # This file defines upgrades from Nomsu <3.5.5.6 to Nomsu 3.5.5.6 diff --git a/compatibility/3.6.nom b/compatibility/3.6.nom index 1a9edb1..fad8a32 100644 --- a/compatibility/3.6.nom +++ b/compatibility/3.6.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V4.10.12.7 +#!/usr/bin/env nomsu -V4.11.12.8 # This file defines upgrades from Nomsu <3.6 to 3.6 diff --git a/compatibility/3.7.nom b/compatibility/3.7.nom index 874b113..26b643f 100644 --- a/compatibility/3.7.nom +++ b/compatibility/3.7.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V4.10.12.7 +#!/usr/bin/env nomsu -V4.11.12.8 # This file defines upgrades from Nomsu <3.7 to 3.7 diff --git a/compatibility/3.8.nom b/compatibility/3.8.nom index 583b52b..d70e6e8 100644 --- a/compatibility/3.8.nom +++ b/compatibility/3.8.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V4.10.12.7 +#!/usr/bin/env nomsu -V4.11.12.8 # This file defines upgrades from Nomsu <3.8 to 3.8 (Text method changes) diff --git a/compatibility/3.nom b/compatibility/3.nom index 69f8d25..a1ce99b 100644 --- a/compatibility/3.nom +++ b/compatibility/3.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V4.10.12.7 +#!/usr/bin/env nomsu -V4.11.12.8 # This file defines upgrades from Nomsu <=2 to Nomsu 3 diff --git a/compatibility/4.10.12.7.nom b/compatibility/4.10.12.7.nom index 2e42bdc..fe1511c 100644 --- a/compatibility/4.10.12.7.nom +++ b/compatibility/4.10.12.7.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V4.10.12.7 +#!/usr/bin/env nomsu -V4.11.12.8 # This file defines upgrades from Nomsu <4.10.12.7 to 4.10.12.7 use "compatibility/compatibility.nom" @@ -56,20 +56,25 @@ upgrade %tree to "4.10.12.7" as: if ((%first_chunk.%i.type == "Action") and (%first_chunk.%i.stub == "use")): %has_use = (yes) ..else: - if %has_use: go to (insert chunk) + if %has_use: + go to (insert chunk) %i += 1 return - === (insert chunk) === [%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 %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 + return %new_tree diff --git a/compatibility/4.11.nom b/compatibility/4.11.nom index 05edfea..71bf3ee 100644 --- a/compatibility/4.11.nom +++ b/compatibility/4.11.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V4.11 +#!/usr/bin/env nomsu -V4.11.12.8 # This file defines upgrades from Nomsu <4.11 to Nomsu 4.11 (overhaul of function literals, deleting (if all of ...), etc. shorthand) @@ -14,7 +14,6 @@ upgrade action "call 1 with" to "4.11" via (..) for %arg in %tree.4 at %i: %tree2.(%i + 1) = %arg return (SyntaxTree %tree2) - upgrade action (-> %yield_value) to "4.11" as (yield %yield_value) # Replace set {%x:1, %y:2} with [%x, %y] = [1, 2] @@ -29,10 +28,15 @@ upgrade action "set" to "4.11" via (..) return (SyntaxTree {type: "Action", source: %tree.source, 1: %lhs, 2: "=", 3: %rhs}) # Changing filesystem API: -upgrade action (for file %f in %path %body) to "4.11" as (for %f in (files for %path) %body) -upgrade action (%expr for file %f in %path) to "4.11" as [: for %f in (files for %path): add %expr] +upgrade action (for file %f in %path %body) to "4.11" as (..) + for %f in (files for %path) %body + +upgrade action (%expr for file %f in %path) to "4.11" as [..] + : for %f in (files for %path): add %expr + 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) +upgrade action (line number of %pos in %text) to "4.11" as (..) + %text::line number at %pos # Deprecating shorthand functions: upgrade action [if all of %items %body, if all of %items then %body] to "4.11" as (..) diff --git a/compatibility/4.8.10.nom b/compatibility/4.8.10.nom index 9049830..f20886f 100644 --- a/compatibility/4.8.10.nom +++ b/compatibility/4.8.10.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V4.10.12.7 +#!/usr/bin/env nomsu -V4.11.12.8 # This file defines upgrades from Nomsu <4.8.10 to 4.8.10 (renaming "action" -> "means") use "compatibility/compatibility.nom" diff --git a/compatibility/4.9.nom b/compatibility/4.9.nom index ab58a86..5dc0d29 100644 --- a/compatibility/4.9.nom +++ b/compatibility/4.9.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V4.10.12.7 +#!/usr/bin/env nomsu -V4.11.12.8 # This file defines upgrades from Nomsu <4.9 to 4.9 use "compatibility/compatibility.nom" diff --git a/compatibility/compatibility.nom b/compatibility/compatibility.nom index 23ec703..5be8eeb 100644 --- a/compatibility/compatibility.nom +++ b/compatibility/compatibility.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V4.10.12.7 +#!/usr/bin/env nomsu -V4.11.12.8 # This file contains code for defining ways to upgrade code between different versions of Nomsu. @@ -105,7 +105,7 @@ externally (%tree upgraded) means (..) %tree upgraded from (%tree.version or (Nomsu version)) to (Nomsu version) externally (use %path from version %version) means: - for file %filename in %path: + for %filename in (files for %path): if (=lua "LOADED[\%filename]"): do next %filename %file = (read file %filename) |
