aboutsummaryrefslogtreecommitdiff
path: root/compatibility/2.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/2.nom
parentacb86f78c3f79479ac3a73f0e5862f8f5d8f31f5 (diff)
Updating to version 2.4.4.3, with new syntax for multi-statement 'if'
and switch statements.
Diffstat (limited to 'compatibility/2.nom')
-rw-r--r--compatibility/2.nom4
1 files changed, 2 insertions, 2 deletions
diff --git a/compatibility/2.nom b/compatibility/2.nom
index 35ed1a0..a93730c 100644
--- a/compatibility/2.nom
+++ b/compatibility/2.nom
@@ -4,7 +4,7 @@ use "compatibility/compatibility.nom"
upgrade %tree to "2" as:
unless (%tree is "Action" syntax tree): return
- if (all[%tree.stub is "if % % else %", not (%tree.3 is "Var" syntax tree), not (%tree.5 is "Var" syntax tree)]):
+ if (%tree.stub is "if % % else %"):
%true_body = (%tree.3 upgraded)
unless (%true_body is "Block" syntax tree):
%true_body = (=lua "Block(\%true_body.source, \%true_body)")
@@ -22,7 +22,7 @@ upgrade %tree to "2" as:
"for % in % to % via % %", "for % in % to % %", "for % % in % %", "do %"
"for % in recursive % %", "test %", "with % %", "result of %"
for %n in %need_blocks:
- if ((%tree.stub is %n) and (not ((last in %tree) is "Var" syntax tree))):
+ if (%tree.stub is %n):
%bits = (((% upgraded) if (% is syntax tree) else %) for % in %tree)
unless ((last in %bits) is "Block" syntax tree):
%body = (last in %bits)