Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-03-19 15:23:41 -0400
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-03-19 15:23:41 -0400
commita3fcaa8737cbd52b417e9ab94b96984857814742 (patch)
tree163f1d917322ed86ff6bce835e14a02e89cb04f7 /src
parent2960f2d0b33cfdcd7b45adda1877706e27b52e1c (diff)
downloadtame-a3fcaa8737cbd52b417e9ab94b96984857814742.tar.gz
tame-a3fcaa8737cbd52b417e9ab94b96984857814742.tar.bz2
tame-a3fcaa8737cbd52b417e9ab94b96984857814742.zip
rate-each: Gentle @no2.12.0
* src/current/compiler/js.xsl (compile-class-condtion)[lv:rate]: Do not consider @no's in predicate generation when `@preproc:gentle-no' is set. * src/current/include/preproc/macros.xsl (preproc:macros)[lv:rate-each]: Set `@preproc:gentle-no' on generated `lv:rate', since the generator handles `@no' itself.
Diffstat (limited to 'src')
-rw-r--r--src/current/compiler/js.xsl15
-rw-r--r--src/current/include/preproc/macros.xsl2
2 files changed, 13 insertions, 4 deletions
diff --git a/src/current/compiler/js.xsl b/src/current/compiler/js.xsl
index 0d9b6f4..8bf9093 100644
--- a/src/current/compiler/js.xsl
+++ b/src/current/compiler/js.xsl
@@ -1182,10 +1182,19 @@
</template>
<template match="lv:rate" mode="compile-class-condition">
- <!-- generate expression for class list (leave the @no check to the cmatch
- algorithm, since we want per-index @no's) -->
+ <variable name="rate" select="." />
+
+ <!-- Generate expression for class list (leave the @no check to the cmatch
+ algorithm, since we want per-index @no's). If @preproc:gentle-no is
+ set by rate-each expansion, then we want to ignore them entirely,
+ since we do not want it to clear our the final yield (generators take
+ care of this using _CMATCH_). -->
<text>( </text>
- <variable name="class-set" select="./lv:class" />
+ <variable name="class-set"
+ select="./lv:class[
+ ( @no = 'true'
+ and not( $rate/@preproc:gentle-no = 'true' ) )
+ or not( @no = 'true' ) ]" />
<choose>
<when test="$class-set">
diff --git a/src/current/include/preproc/macros.xsl b/src/current/include/preproc/macros.xsl
index cbf4def..9c4ad1d 100644
--- a/src/current/include/preproc/macros.xsl
+++ b/src/current/include/preproc/macros.xsl
@@ -407,7 +407,7 @@
</xsl:message>
-->
- <lv:rate>
+ <lv:rate preproc:gentle-no="true">
<xsl:sequence select="@*[
not( local-name() = 'index' )
and not( local-name() = 'generates' )