From ddb839bfd4ba8dbdd214f3e885629fc8fe57e68c Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Thu, 14 Mar 2019 16:30:43 -0700 Subject: Replacing (size of $) with (#$) as should have been done before. --- lib/compatibility/2.4.nom | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/compatibility/2.4.nom') 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 -- cgit v1.2.3