aboutsummaryrefslogtreecommitdiff
path: root/compatibility/4.10.12.7.nom
diff options
context:
space:
mode:
Diffstat (limited to 'compatibility/4.10.12.7.nom')
-rw-r--r--compatibility/4.10.12.7.nom49
1 files changed, 49 insertions, 0 deletions
diff --git a/compatibility/4.10.12.7.nom b/compatibility/4.10.12.7.nom
new file mode 100644
index 0000000..c314b68
--- /dev/null
+++ b/compatibility/4.10.12.7.nom
@@ -0,0 +1,49 @@
+#!/usr/bin/env nomsu -V4.10.12.7
+#
+ 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 (%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 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 %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 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 (% as lua statements) to "4.10.12.7" as (% as lua)
+
+upgrade %tree to "4.10.12.7" as:
+ if (%tree.type == "FileChunks"):
+ %first_chunk = %tree.1
+ %first_has_use = (no)
+ %i = 1
+ repeat while (%i < (size of %first_chunk)):
+ if %first_has_use:
+ if ((%first_chunk.%i.type != "Action") or (%first_chunk.%i.stub != "use")):
+ %chunk2 = (%SyntaxTree {type:"Block"})
+ for %j in %i to (size of %first_chunk.%i):
+ %chunk2.((size of %chunk2) + 1) = %first_chunk.%i.%j
+ for %j in %i to (size of %first_chunk.%i):
+ %first_chunk.%i.%j = (nil)
+ %table.insert %tree 2 %chunk2
+ return %tree
+ ..else:
+ if ((%first_chunk.type == "Action") and (%first_chunk.stub == "use")):
+ %first_has_use = (yes)
+ %i += 1