diff options
Diffstat (limited to 'compatibility/2.4.nom')
| -rw-r--r-- | compatibility/2.4.nom | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/compatibility/2.4.nom b/compatibility/2.4.nom index 1279968..40b363a 100644 --- a/compatibility/2.4.nom +++ b/compatibility/2.4.nom @@ -37,12 +37,15 @@ upgrade $tree to "2.4" as: $action = (=lua "SyntaxTree{type='Block', source=\$action.source, \$action}") $conditions, add $action $new_lines, add - =lua "SyntaxTree{type='Action', source=\$conditions[1].source, unpack(\$conditions)}" + =lua (" + SyntaxTree{type='Action', source=\$conditions[1].source, unpack(\$conditions)} + ") $conditions = [] return \(when $body) with vars { - .body = (=lua "SyntaxTree{type='Block', source=\$tree[2].source, unpack(\$new_lines)}") + .body = + =lua "SyntaxTree{type='Block', source=\$tree[2].source, unpack(\$new_lines)}" } "if 1 is ?" "if 1 = ?": @@ -70,11 +73,13 @@ upgrade $tree to "2.4" as: $action = $line.3 unless ($action is "Block" syntax tree): $action = \(: $action) $values, add $action - $new_lines, - add (=lua "SyntaxTree{type='Action', source=\$values[1].source, unpack(\$values)}") + $new_lines, add + =lua "SyntaxTree{type='Action', source=\$values[1].source, unpack(\$values)}" $values = [] return \(if $var is $body) with vars { - .var = ($tree.2 upgraded), .body = (=lua "SyntaxTree{type='Block', source=\$tree[5].source, unpack(\$new_lines)}") + .var = ($tree.2 upgraded) + .body = + =lua "SyntaxTree{type='Block', source=\$tree[5].source, unpack(\$new_lines)}" } |
