aboutsummaryrefslogtreecommitdiff
path: root/lib/compatibility
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-01-16 21:33:02 -0800
committerBruce Hill <bruce@bruce-hill.com>2019-01-16 21:33:30 -0800
commit520acd39795766354fc44c6e15f5f33f255ca33a (patch)
treea4a538dd72ab9a1e229ec3d44beb86b80cfbe7ba /lib/compatibility
parent517d661368611fe753e9fd97a7adb2e45fca745e (diff)
Overhauling OO-API a little to make it more minimalistic.
Diffstat (limited to 'lib/compatibility')
-rw-r--r--lib/compatibility/2.4.nom4
-rw-r--r--lib/compatibility/2.nom2
-rw-r--r--lib/compatibility/6.15.nom8
3 files changed, 10 insertions, 4 deletions
diff --git a/lib/compatibility/2.4.nom b/lib/compatibility/2.4.nom
index a904dd0..953307b 100644
--- a/lib/compatibility/2.4.nom
+++ b/lib/compatibility/2.4.nom
@@ -21,7 +21,7 @@ upgrade $tree to "2.4" as:
(not ($line is "Action" syntax tree)):
$new_lines, add $line
- ($line.stub is "*"):
+ ($line.stub == "*"):
if ((size of $line) == 2):
$conditions, add $line.2
..else:
@@ -59,7 +59,7 @@ upgrade $tree to "2.4" as:
(not ($line is "Action" syntax tree)):
$new_lines, add $line
- ($line.stub is "*"):
+ ($line.stub == "*"):
if ((size of $line) == 2):
$values, add $line.2
..else:
diff --git a/lib/compatibility/2.nom b/lib/compatibility/2.nom
index ca3cb6a..0b17082 100644
--- a/lib/compatibility/2.nom
+++ b/lib/compatibility/2.nom
@@ -29,7 +29,7 @@ upgrade $tree to "2" as:
]
for $n in $need_blocks:
- if ($tree.stub is $n):
+ if ($tree.stub == $n):
$bits = [: for $ in $tree: add (($ upgraded) if ($ is syntax tree) else $)]
unless (($bits, last) is "Block" syntax tree):
$body = ($bits, last)
diff --git a/lib/compatibility/6.15.nom b/lib/compatibility/6.15.nom
index 72d625d..ed892c1 100644
--- a/lib/compatibility/6.15.nom
+++ b/lib/compatibility/6.15.nom
@@ -13,7 +13,7 @@ upgrade action (externally $x all mean $y) to "6.15" as
upgrade action ($lists flattened) to "6.15" as [
: for $ in recursive $lists:
- if ($ is a "List"):
+ if ($ is "a List"):
for $child in $:
recurse $ on $child
..else: add $
@@ -24,3 +24,9 @@ upgrade action (compile error at $pos $msg $hint) to "6.15" as
Compile error: \$msg
Hint: \$hint
")
+
+upgrade action ($x is $y) to "6.15" as ($x == $y)
+upgrade action [$a isn't $b, $a is not $b, $a not= $b] to "6.15" as ($a != $b)
+upgrade action [$a is a $b, $a is an $b] to "6.15" as ($a is $b)
+upgrade action [$a isn't a $b, $a isn't an $b, $a is not a $b, $a is not an $b]
+..to "6.15" as ($a isn't $b)