From 10bd72e858a8ffaacafa296dbbc429dc73b0111c Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 18 Jan 2019 14:22:17 -0800 Subject: Added `tree` back as a parameter to compile actions, which helps with better error reporting, e.g. for (fail) (no arguments). Overall better error reporting now. Also added shorthand ("Action" tree with ...) for (SyntaxTree {.type = "Action", .1 = ...}). --- lib/compatibility/4.10.12.7.nom | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'lib/compatibility/4.10.12.7.nom') diff --git a/lib/compatibility/4.10.12.7.nom b/lib/compatibility/4.10.12.7.nom index eeff2f2..be53cb6 100644 --- a/lib/compatibility/4.10.12.7.nom +++ b/lib/compatibility/4.10.12.7.nom @@ -63,10 +63,8 @@ upgrade $tree to "4.10.12.7" as: $i += 1 return --- (insert chunk) --- - [$chunk1, $chunk2] = [ - SyntaxTree {.type = "Block", .source = $first_chunk.source} - SyntaxTree {.type = "Block", .source = $first_chunk.source} - ] + [$chunk1, $chunk2] = + ["Block" tree from $first_chunk.source, "Block" tree from $first_chunk.source] for $j in 1 to ($i - 1): $chunk1.$j = $first_chunk.$j @@ -74,8 +72,7 @@ upgrade $tree to "4.10.12.7" as: for $j in $i to (size of $first_chunk): $chunk2.($j - $i + 1) = $first_chunk.$j - $new_tree = - SyntaxTree {.source = $tree.source, .type = "FileChunks"} $chunk1 $chunk2 + $new_tree = ("FileChunks" tree from $tree.source with $chunk1 $chunk2) for $i in 2 to (size of $tree): $new_tree.($i + 1) = $tree.$i -- cgit v1.2.3