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.nom9
-rw-r--r--compatibility/3.6.nom21
-rw-r--r--compatibility/3.nom2
-rw-r--r--compatibility/compatibility.nom16
9 files changed, 42 insertions, 16 deletions
diff --git a/compatibility/2.3.nom b/compatibility/2.3.nom
index 4e4a022..5e75ce7 100644
--- a/compatibility/2.3.nom
+++ b/compatibility/2.3.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V3.5.5.6
+#!/usr/bin/env nomsu -V3.6.5.6
#
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 cf88b13..2207343 100644
--- a/compatibility/2.4.nom
+++ b/compatibility/2.4.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V3.5.5.6
+#!/usr/bin/env nomsu -V3.6.5.6
#
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 53a0435..cd266da 100644
--- a/compatibility/2.5.5.5.nom
+++ b/compatibility/2.5.5.5.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V3.5.5.6
+#!/usr/bin/env nomsu -V3.6.5.6
#
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 a76ab3a..4c67809 100644
--- a/compatibility/2.5.nom
+++ b/compatibility/2.5.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V3.5.5.6
+#!/usr/bin/env nomsu -V3.6.5.6
#
This file defines upgrades from Nomsu <2.5 to Nomsu 2.5
diff --git a/compatibility/2.nom b/compatibility/2.nom
index 5d4d0f6..1fdfa50 100644
--- a/compatibility/2.nom
+++ b/compatibility/2.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V3.5.5.6
+#!/usr/bin/env nomsu -V3.6.5.6
#
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 32d598c..a8b8a69 100644
--- a/compatibility/3.5.5.6.nom
+++ b/compatibility/3.5.5.6.nom
@@ -1,8 +1,11 @@
-#!/usr/bin/env nomsu -V3.5.5.6
+#!/usr/bin/env nomsu -V3.6.5.6
#
This file defines upgrades from Nomsu <3.5.5.6 to Nomsu 3.5.5.6
use "compatibility/compatibility.nom"
-upgrade action "traceback" to "3.5.5.6" via ([%] -> (barf "'traceback' has been deprecated"))
-upgrade action "traceback 1" to "3.5.5.6" via ([%] -> (barf "'traceback 1' has been deprecated"))
+upgrade action "traceback" to "3.5.5.6" via (..)
+ [%] -> (barf "'traceback' has been deprecated")
+
+upgrade action "traceback 1" to "3.5.5.6" via (..)
+ [%] -> (barf "'traceback 1' has been deprecated")
diff --git a/compatibility/3.6.nom b/compatibility/3.6.nom
new file mode 100644
index 0000000..6697375
--- /dev/null
+++ b/compatibility/3.6.nom
@@ -0,0 +1,21 @@
+#!/usr/bin/env nomsu -V3
+#
+ This file defines upgrades from Nomsu <3.6 to 3.6
+
+use "compatibility/compatibility.nom"
+
+upgrade action (to %1 write %2) to "3.6" as (..)
+ %1::append %2
+upgrade action (%1 <-write %2) to "3.6" as (..)
+ %1::append %2
+upgrade action (to %1 write %2 joined by %3) to "3.6" as (..)
+ %1::append %2 joined by %3
+upgrade action (declare locals in %lua) to "3.6" as (..)
+ %lua::declare locals
+upgrade action (declare locals %locs in %lua) to "3.6" as (..)
+ %lua::declare locals %locs
+upgrade action (add free vars %vars to %lua) to "3.6" as (..)
+ %lua::add free vars %vars
+upgrade action (remove free vars %vars from %lua) to "3.6" as (..)
+ %lua::remove free vars %vars
+
diff --git a/compatibility/3.nom b/compatibility/3.nom
index 408472f..ea33b14 100644
--- a/compatibility/3.nom
+++ b/compatibility/3.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V3.5.5.6
+#!/usr/bin/env nomsu -V3.6.5.6
#
This file defines upgrades from Nomsu <=2 to Nomsu 3
diff --git a/compatibility/compatibility.nom b/compatibility/compatibility.nom
index 86a5ac7..d74cabe 100644
--- a/compatibility/compatibility.nom
+++ b/compatibility/compatibility.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V3.5.5.6
+#!/usr/bin/env nomsu -V3.6.5.6
#
This file contains code for defining ways to upgrade code between different versions
of Nomsu.
@@ -33,20 +33,22 @@ compile [upgrade action %actions to %version as %body] to:
return %replacements.(%t.1)
..else:
return ".."
- \(%t.type)(\(quote "\(%t.source)"), \(..)
+ \(%t.type){source=\(quote "\(%t.source)"), \(..)
quote "\(%t.1) \000\(=lua "string.format('%X', __MANGLE_INDEX)")"
- ..)
+ ..}
(%t is syntax tree):
%args = ((make tree %) for % in %t)
- add "\(\%tree as lua id).source" to %args at index 1
- return "\(%t.type)(\(%args joined with ", "))"
+ add "source=\(\%tree as lua id).source" to %args at index 1
+ if %t.target:
+ add "target=\(make tree %t.target)" to %args at index 1
+ return "\(%t.type){\(%args joined with ", ")}"
else:
return (quote "\%t")
- unless ("\%lua" == ""): to %lua write "\n"
- to %lua write (..)
+ unless ("\%lua" == ""): %lua::append "\n"
+ %lua::append (..)
Lua ".."
A_upgrade_action_1_to_2_via_3(\(quote %action.stub), \(%version as lua expr), function(\(..)
\%tree as lua id