aboutsummaryrefslogtreecommitdiff
path: root/compatibility
diff options
context:
space:
mode:
Diffstat (limited to 'compatibility')
-rw-r--r--compatibility/2.3.nom2
-rw-r--r--compatibility/2.4.nom2
-rw-r--r--compatibility/2.5.5.5.nom2
-rw-r--r--compatibility/2.5.nom2
-rw-r--r--compatibility/2.nom2
-rw-r--r--compatibility/3.5.5.6.nom2
-rw-r--r--compatibility/3.6.nom2
-rw-r--r--compatibility/3.7.nom2
-rw-r--r--compatibility/3.8.nom2
-rw-r--r--compatibility/3.nom2
-rw-r--r--compatibility/4.8.10.nom60
-rw-r--r--compatibility/compatibility.nom44
12 files changed, 95 insertions, 29 deletions
diff --git a/compatibility/2.3.nom b/compatibility/2.3.nom
index fb137b8..7de353e 100644
--- a/compatibility/2.3.nom
+++ b/compatibility/2.3.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V4.8.8.6
+#!/usr/bin/env nomsu -V4.8.10
#
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 b770840..1a7c9c3 100644
--- a/compatibility/2.4.nom
+++ b/compatibility/2.4.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V4.8.8.6
+#!/usr/bin/env nomsu -V4.8.10
#
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 a3f8b27..efed78d 100644
--- a/compatibility/2.5.5.5.nom
+++ b/compatibility/2.5.5.5.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V4.8.8.6
+#!/usr/bin/env nomsu -V4.8.10
#
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 fe17dfb..b1e01b0 100644
--- a/compatibility/2.5.nom
+++ b/compatibility/2.5.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V4.8.8.6
+#!/usr/bin/env nomsu -V4.8.10
#
This file defines upgrades from Nomsu <2.5 to Nomsu 2.5
diff --git a/compatibility/2.nom b/compatibility/2.nom
index 2364f56..d7a1489 100644
--- a/compatibility/2.nom
+++ b/compatibility/2.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V4.8.8.6
+#!/usr/bin/env nomsu -V4.8.10
#
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 068e65d..89fbc8a 100644
--- a/compatibility/3.5.5.6.nom
+++ b/compatibility/3.5.5.6.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V4.8.8.6
+#!/usr/bin/env nomsu -V4.8.10
#
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 eec97eb..7cd5c64 100644
--- a/compatibility/3.6.nom
+++ b/compatibility/3.6.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V4.8.8.6
+#!/usr/bin/env nomsu -V4.8.10
#
This file defines upgrades from Nomsu <3.6 to 3.6
diff --git a/compatibility/3.7.nom b/compatibility/3.7.nom
index 5b458de..599e0d5 100644
--- a/compatibility/3.7.nom
+++ b/compatibility/3.7.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V4.8.8.6
+#!/usr/bin/env nomsu -V4.8.10
#
This file defines upgrades from Nomsu <3.7 to 3.7
diff --git a/compatibility/3.8.nom b/compatibility/3.8.nom
index 9538770..0709688 100644
--- a/compatibility/3.8.nom
+++ b/compatibility/3.8.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V4.8.8.6
+#!/usr/bin/env nomsu -V4.8.10
#
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 36df17d..5156aa8 100644
--- a/compatibility/3.nom
+++ b/compatibility/3.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V4.8.8.6
+#!/usr/bin/env nomsu -V4.8.10
#
This file defines upgrades from Nomsu <=2 to Nomsu 3
diff --git a/compatibility/4.8.10.nom b/compatibility/4.8.10.nom
new file mode 100644
index 0000000..66152b5
--- /dev/null
+++ b/compatibility/4.8.10.nom
@@ -0,0 +1,60 @@
+#!/usr/bin/env nomsu -V4.8.10.6
+#
+ This file defines upgrades from Nomsu <4.8.10 to 4.8.10 (renaming "action" -> "means")
+use "compatibility/compatibility.nom"
+
+upgrade action "local action 1 2" to "4.8.10" via (..)
+ [%tree, %end_version] ->:
+ %spec = %tree.3
+ %body = %tree.4
+ if %spec.type is:
+ "List":
+ if ((size of %spec) == 1):
+ return \(%spec.1 means %body)
+ ..else:
+ return \(%spec all mean %body)
+ else:
+ return \(%spec means %body)
+
+upgrade action "action 1 2" to "4.8.10" via (..)
+ [%tree, %end_version] ->:
+ %spec = %tree.2
+ %body = %tree.3
+ if %spec.type is:
+ "List":
+ if ((size of %spec) == 1):
+ return \(externally %spec.1 means %body)
+ ..else:
+ return \(externally %spec all mean %body)
+ else:
+ return \(externally %spec means %body)
+
+upgrade action "compile 1 to 2" to "4.8.10" via (..)
+ [%tree, %end_version] ->:
+ %spec = %tree.2
+ %body = %tree.4
+ if %spec.type is:
+ "List":
+ if ((size of %spec) == 1):
+ return \(%spec.1 compiles to %body)
+ ..else:
+ return \(%spec all compile to %body)
+ else:
+ return \(%spec compiles to %body)
+
+upgrade action "parse 1 as 2" to "4.8.10" via (..)
+ [%tree, %end_version] ->:
+ %spec = %tree.2
+ %body = %tree.4
+ if %spec.type is:
+ "List":
+ if ((size of %spec) == 1):
+ return \(%spec.1 parses as %body)
+ ..else:
+ return \(%spec all parse as %body)
+ else:
+ return \(%spec parse as %body)
+
+upgrade action (compile as %) to "4.8.10" as (what % compiles to)
+upgrade action (action %) to "4.8.10" as (%'s meaning)
+upgrade action (remove action %) to "4.8.10" as ((%'s meaning) = (nil))
diff --git a/compatibility/compatibility.nom b/compatibility/compatibility.nom
index acd1d11..1153ab4 100644
--- a/compatibility/compatibility.nom
+++ b/compatibility/compatibility.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V4.8.8.6
+#!/usr/bin/env nomsu -V4.8.10
#
This file contains code for defining ways to upgrade code between different versions
of Nomsu.
@@ -6,17 +6,17 @@
use "lib/os.nom"
%UPGRADES = {}
-action [upgrade to %version via %upgrade_fn]:
+externally (upgrade to %version via %upgrade_fn) means:
%UPGRADES.%version = %upgrade_fn
%ACTION_UPGRADES = ({} with fallback % -> {})
-action [upgrade action %stub to %version via %upgrade_fn]:
+externally (upgrade action %stub to %version via %upgrade_fn) means:
%ACTION_UPGRADES.%version.%stub = %upgrade_fn
-parse [upgrade %tree to %version as %body] as (..)
- upgrade to %version via ([%] -> (% with %tree -> %body))
+(upgrade %tree to %version as %body) parses as (..)
+ upgrade to %version via ([%, %end_version] -> (% with %tree -> %body))
-compile [upgrade action %actions to %version as %body] to:
+(upgrade action %actions to %version as %body) compiles to:
if (%actions is "Action" syntax tree):
%actions = \[%actions]
%lua = (Lua "")
@@ -27,7 +27,7 @@ compile [upgrade action %actions to %version as %body] to:
%replacements.(%action.%i.1) = "\(\%tree as lua id)[\%i]"
define mangler
- local action [make tree %t]:
+ (make tree %t) means:
when:
(%t is "Var" syntax tree):
if %replacements.(%t.1):
@@ -52,7 +52,7 @@ compile [upgrade action %actions to %version as %body] to:
%retval = (make tree %body)
%lua::append (..)
Lua "\
- ..upgrade_action_1_to_2_via_3(\(quote %action.stub), \(%version as lua expr), function(\(..)
+ ..upgrade_action_1_to_2_via(\(quote %action.stub), \(%version as lua expr), function(\(..)
\%tree as lua id
..)
return \%retval
@@ -60,11 +60,12 @@ compile [upgrade action %actions to %version as %body] to:
return %lua
-action [..]
+externally [..]
%tree upgraded from %start_version to %end_version
%tree upgraded to %end_version from %start_version
-..:
- local action [%ver as list] ((% as number) for % in %ver matching "[0-9]+")
+..all mean:
+ unless (%tree is syntax tree): return %tree
+ (%ver as list) means ((% as number) for % in %ver matching "[0-9]+")
%versions = {}
for %v = % in %UPGRADES:
%versions.%v = (yes)
@@ -78,25 +79,30 @@ action [..]
%tree = (..)
%tree with % -> (..)
if ((% is "Action" syntax tree) and %ACTION_UPGRADES.%ver.(%.stub)):
- return (call %ACTION_UPGRADES.%ver.(%.stub) with [%])
+ %with_upgraded_args = (..)
+ %k = (%v upgraded from %start_version to %end_version) for %k = %v in %
+ set %with_upgraded_args 's metatable to (% 's metatable)
+ return (..)
+ call %ACTION_UPGRADES.%ver.(%.stub) with [%with_upgraded_args, %end_version]
if %UPGRADES.%ver:
- %tree = (call %UPGRADES.%ver with [%tree])
+ %with_upgraded_args = (..)
+ %k = (%v upgraded from %start_version to %end_version) for %k = %v in %tree
+ set %with_upgraded_args 's metatable to (%tree 's metatable)
+ %tree = (call %UPGRADES.%ver with [%with_upgraded_args, %end_version])
return %tree
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-parse [%tree upgraded from %start_version] as (..)
+externally (%tree upgraded from %start_version) means (..)
%tree upgraded from %start_version to (Nomsu version)
-parse [%tree upgraded to %end_version] as (..)
+externally (%tree upgraded to %end_version) means (..)
%tree upgraded from (%tree.version or (Nomsu version)) to %end_version
-parse [%tree upgraded] as (..)
+externally (%tree upgraded) means (..)
%tree upgraded from (%tree.version or (Nomsu version)) to (Nomsu version)
-action [use %path from version %version]:
+externally (use %path from version %version) means:
for file %filename in %path:
if (=lua "LOADED[\%filename]"): do next %filename
%file = (read file %filename)