Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-01-29 13:12:39 -0500
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-01-29 13:14:02 -0500
commit9747d16464b377e6e6571cf60fe1838ea3d6c302 (patch)
tree7d9a207793de38cfa55c2d081a1c889303a8dd02
parent440b935dc0861d549a9bb77b75aa76447b172ee9 (diff)
downloadtame-9747d16464b377e6e6571cf60fe1838ea3d6c302.tar.gz
tame-9747d16464b377e6e6571cf60fe1838ea3d6c302.tar.bz2
tame-9747d16464b377e6e6571cf60fe1838ea3d6c302.zip
Permit matrix reference in c:length-of (bugfix)v2.8.9
* src/current/compiler/validate.xsl (lvv:validate)[c:value]: Allow direct matrix reference (without index) in `c:length-of'.
-rw-r--r--src/current/compiler/validate.xsl10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/current/compiler/validate.xsl b/src/current/compiler/validate.xsl
index 4d69c3e..e4dc74d 100644
--- a/src/current/compiler/validate.xsl
+++ b/src/current/compiler/validate.xsl
@@ -496,15 +496,16 @@
</xsl:choose>
</xsl:when>
- <!-- matrices require two indexes, unless being used as an argument to a
- function or as part of a dot product (it is also acceptable as the
- return value of a function, which must be in a tail position) -->
+ <!-- TODO: generalize this! -->
+ <!-- Matrix references require two indexes, unless referenced within
+ contexts -->
<xsl:when test="
( number( $is-set ) gt 1 )
and not( ./c:index[ $is-set ] )
and not( ancestor::c:arg )
and not( ancestor::c:let )
and not( ancestor::c:product[ @dot ] )
+ and not( ancestor::c:length-of )
and not( ancestor::c:cons )
and not( ancestor::c:cons )
and not(
@@ -519,8 +520,7 @@
<xsl:value-of select="@name" />
<xsl:text> requires </xsl:text>
<xsl:value-of select="$is-set" />
- <xsl:text> indexes (use c:index) unless being</xsl:text>
- <xsl:text> passed as a function argument</xsl:text>
+ <xsl:text> indexes (use c:index) in this context</xsl:text>
</xsl:with-param>
</xsl:call-template>
</xsl:when>