aboutsummaryrefslogtreecommitdiff
path: root/compatibility/compatibility.nom
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-07-18 17:55:29 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-07-18 17:56:15 -0700
commitbf67a610135c0803187cf6ed896638962f142d14 (patch)
treea0b126c954168282c8c69ea728d4abbae712ac33 /compatibility/compatibility.nom
parentacb86f78c3f79479ac3a73f0e5862f8f5d8f31f5 (diff)
Updating to version 2.4.4.3, with new syntax for multi-statement 'if'
and switch statements.
Diffstat (limited to 'compatibility/compatibility.nom')
-rw-r--r--compatibility/compatibility.nom10
1 files changed, 5 insertions, 5 deletions
diff --git a/compatibility/compatibility.nom b/compatibility/compatibility.nom
index 9482e32..c5ac55f 100644
--- a/compatibility/compatibility.nom
+++ b/compatibility/compatibility.nom
@@ -21,16 +21,16 @@ compile [upgrade action %action to %version as %body] to:
%replacements.(%action.%i.1) = "\(\%tree as lua id)[\%i]"
local action [make tree %t]:
when:
- * (%t is "Var" syntax tree):
+ (%t is "Var" syntax tree):
if (%replacements.(%t.1)):
return %replacements.(%t.1)
..else:
return "\(%t.type)(\(quote "\(%t.source)"), \(quote "\(%t.1) \0\(=lua "string.format('%X', __MANGLE_INDEX)")"))"
- * (%t is syntax tree):
+ (%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 ", "))"
- *else: return (quote "\%t")
+ else: return (quote "\%t")
return (..)
Lua ".."
A_upgrade_action_1_to_2_via_3(\(quote %action.stub), \(%version as lua expr), function(\(\%tree as lua id))
@@ -66,9 +66,9 @@ parse [%tree upgraded from %start_version] as (..)
%tree upgraded from %start_version to (Nomsu version)
parse [%tree upgraded to %end_version] as (..)
- %tree upgraded from %tree.version to %end_version
+ %tree upgraded from (%tree.version or "0") to %end_version
-parse [%tree upgraded] as (%tree upgraded from %tree.version to (Nomsu version))
+parse [%tree upgraded] as (%tree upgraded from (%tree.version or "0") to (Nomsu version))
action [use %path from version %version] (..)
for file %filename in %path:
if (=lua "LOADED[\%filename]"): do next %filename