From 9fceff7e785bb234971b443809eef3da9051c598 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 14 Jan 2019 16:30:17 -0800 Subject: Added (SyntaxTree {...} ...) shorthand for SyntaxTree{..., ...} and added some shebangs. --- compatibility/4.10.12.7.nom | 3 +-- compatibility/4.11.nom | 3 +-- compatibility/6.14.nom | 8 ++++++++ compatibility/init.nom | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) (limited to 'compatibility') diff --git a/compatibility/4.10.12.7.nom b/compatibility/4.10.12.7.nom index e88b5be..c241898 100644 --- a/compatibility/4.10.12.7.nom +++ b/compatibility/4.10.12.7.nom @@ -77,8 +77,7 @@ upgrade $tree to "4.10.12.7" as: $chunk2.($j - $i + 1) = $first_chunk.$j $new_tree = - SyntaxTree - {.source = $tree.source, .type = "FileChunks", .1 = $chunk1, .2 = $chunk2} + SyntaxTree {.source = $tree.source, .type = "FileChunks"} $chunk1 $chunk2 for $i in 2 to (size of $tree): $new_tree.($i + 1) = $tree.$i diff --git a/compatibility/4.11.nom b/compatibility/4.11.nom index 7864bc2..24dbbdc 100644 --- a/compatibility/4.11.nom +++ b/compatibility/4.11.nom @@ -27,8 +27,7 @@ upgrade action "set" to "4.11" via $rhs.$i = $entry.2 return - SyntaxTree - {.type = "Action", .source = $tree.source, .1 = $lhs, .2 = "=", .3 = $rhs} + SyntaxTree {.type = "Action", .source = $tree.source} $lhs "=" $rhs upgrade action "1 with 2 ~>" to "4.11" via for $tree: diff --git a/compatibility/6.14.nom b/compatibility/6.14.nom index affdabf..8443157 100644 --- a/compatibility/6.14.nom +++ b/compatibility/6.14.nom @@ -31,3 +31,11 @@ upgrade action (\(1's meaning)).stub to "6.14" via $tree -> (SyntaxTree {.source = $tree.source, .type = "Var", $tree.1}) upgrade action (log base $b of $n) to "6.14" as (log $n base $b) + +upgrade action "use" to "6.14" via + for $tree: + $path = $tree.2.1 + $path = ($path, with "%.nom$" -> "") + $path = ($path, with "^lib/" -> "") + return \(use (SyntaxTree {.source = $tree.2.source, .type="Text"} $path)) + diff --git a/compatibility/init.nom b/compatibility/init.nom index 056428f..40cafff 100644 --- a/compatibility/init.nom +++ b/compatibility/init.nom @@ -1,4 +1,4 @@ - +#!/usr/bin/env nomsu -V6.14.13.8 export "compatibility/compatibility" export "compatibility/2" export "compatibility/2.3" -- cgit v1.2.3