aboutsummaryrefslogtreecommitdiff
path: root/lib/compatibility/4.10.12.7.nom
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-01-18 14:22:17 -0800
committerBruce Hill <bruce@bruce-hill.com>2019-01-18 14:22:48 -0800
commit10bd72e858a8ffaacafa296dbbc429dc73b0111c (patch)
tree3dec18257ac6d1affe78aa33a9b389a25eda1256 /lib/compatibility/4.10.12.7.nom
parent520acd39795766354fc44c6e15f5f33f255ca33a (diff)
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 = ...}).
Diffstat (limited to 'lib/compatibility/4.10.12.7.nom')
-rw-r--r--lib/compatibility/4.10.12.7.nom9
1 files changed, 3 insertions, 6 deletions
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