aboutsummaryrefslogtreecommitdiff
path: root/lib/compatibility/2.4.nom
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-03-14 16:30:43 -0700
committerBruce Hill <bruce@bruce-hill.com>2019-03-14 16:30:43 -0700
commitddb839bfd4ba8dbdd214f3e885629fc8fe57e68c (patch)
treeaee183d005229b21a5ce636685f416f97bd5aa9e /lib/compatibility/2.4.nom
parent7f138199078a2fc2b6d6ee8d31da940120c8216a (diff)
Replacing (size of $) with (#$) as should have been done before.
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