Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-01-12 09:36:07 -0500
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-09-11 09:30:52 -0400
commit039092382554a03f45d277e4ad0cf14b3acb4570 (patch)
tree9944c9097cbb201f30563122725c091c8b3e47c6
parent1b4ba4c5627de86822117ec2a5e927efb3a42271 (diff)
downloadtame-039092382554a03f45d277e4ad0cf14b3acb4570.tar.gz
tame-039092382554a03f45d277e4ad0cf14b3acb4570.tar.bz2
tame-039092382554a03f45d277e4ad0cf14b3acb4570.zip
assert: Add _assert_/@class@
This predicates the assertion for each class match. * assert.xml (_assert_)[@class@]: Add parameter.
-rw-r--r--core/assert.xml17
1 files changed, 16 insertions, 1 deletions
diff --git a/core/assert.xml b/core/assert.xml
index 8822f96..b3d3146 100644
--- a/core/assert.xml
+++ b/core/assert.xml
@@ -42,6 +42,8 @@
yields~$\top$,
only one assertion will ever match,
even if others would match if execution were to continue.}
+ \tt{@class@} may optionally be used to predicate the asseriton itself---%
+ the assertion will be performed only on respective class matches.
\ref{_assert_} implements assertions by genearting two classifications---%
one to perform the actual assertion,
@@ -60,6 +62,9 @@
<text>Assertion</text>
</param>
+ <param name="@class@" desc="Only perform assertion for respective class
+ matches (optional)" />
+
<param name="@neg_as@"
desc="Generated name for classification to be negated">
@@ -74,7 +79,17 @@
<!-- The actual assertion will be performed by one classification... -->
<classify as="@neg_as@" yields="@neg_yields@"
desc="{@failure@} (assertion result)">
- <param-copy name="@values@" />
+ <any>
+ <!-- if class is provided and does not match, then the assertion
+ succeeds automatically -->
+ <if name="@class@">
+ <t:match-class name="@class@" value="FALSE" />
+ </if>
+
+ <all>
+ <param-copy name="@values@" />
+ </all>
+ </any>
</classify>
<!-- ...which is in turn negated for the terminating