aboutsummaryrefslogtreecommitdiff
path: root/lib/compatibility/2.4.nom
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compatibility/2.4.nom')
-rw-r--r--lib/compatibility/2.4.nom9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/compatibility/2.4.nom b/lib/compatibility/2.4.nom
index 953307b..1296777 100644
--- a/lib/compatibility/2.4.nom
+++ b/lib/compatibility/2.4.nom
@@ -10,7 +10,8 @@ upgrade $tree to "2.4" as:
unless ($tree is "Action" syntax tree): return
if $tree.stub is:
"when" "if":
- if ((size of $tree) == 3): return $tree
+ if ((#$tree) == 3):
+ return $tree
$conditions = []
$new_lines = []
$body =
@@ -22,7 +23,7 @@ upgrade $tree to "2.4" as:
$new_lines, add $line
($line.stub == "*"):
- if ((size of $line) == 2):
+ if ((#$line) == 2):
$conditions, add $line.2
..else:
$new_lines, add $line
@@ -60,7 +61,7 @@ upgrade $tree to "2.4" as:
$new_lines, add $line
($line.stub == "*"):
- if ((size of $line) == 2):
+ if ((#$line) == 2):
$values, add $line.2
..else:
$new_lines, add $line
@@ -82,4 +83,4 @@ upgrade $tree to "2.4" as:
.var = ($tree.2 upgraded)
.body =
=lua "SyntaxTree{type='Block', source=\$tree[5].source, unpack(\$new_lines)}"
- }
+ } \ No newline at end of file