Mark generated @yields on classes and rate-each as such on symbols

* src/current/include/preproc/expand.xsl
  (lv:classify): Set `@preproc:yields-generated' if `@yields' was not
    previously defined.
* src/current/include/preproc/macros.xsl:
  (lv:rate-each): Set `@preproc:yields-generated` if `@yields' was not
    previously defined.
* src/current/include/preproc/symtable.xsl:
  (lv:rate, lv:classify): Set `@preproc:generated` on symbol if
    `@preproc:yields-generated'.
master
Mike Gerwitz 2018-01-16 12:12:33 -05:00
parent f8dcdbfd23
commit 211387ce2f
3 changed files with 15 additions and 1 deletions

View File

@ -550,6 +550,9 @@
<!-- certain characters are not valid for @yields -->
<xsl:value-of select="translate( @as, '-', '' )" />
</xsl:attribute>
<xsl:attribute name="preproc:yields-generated"
select="'true'" />
</xsl:if>
<xsl:apply-templates mode="preproc:expand"

View File

@ -406,6 +406,8 @@
<xsl:otherwise>
<xsl:attribute name="yields"
select="concat( '_', @generates )" />
<xsl:attribute name="preproc:yields-generated"
select="'true'" />
</xsl:otherwise>
</xsl:choose>
</xsl:if>

View File

@ -660,7 +660,12 @@
<preproc:sym name="{@yields}" type="rate"
extclass="{$external}"
local="{@local}" dtype="float" dim="0" tex="{@sym}" />
local="{@local}" dtype="float" dim="0" tex="{@sym}">
<xsl:if test="@preproc:yields-generated">
<xsl:attribute name="preproc:generated" select="'true'" />
</xsl:if>
</preproc:sym>
<xsl:apply-templates mode="preproc:symtable" />
</xsl:template>
@ -736,6 +741,10 @@
extclass="{$external}" terminate="{$terminate}"
type="cgen" dtype="boolean" dim="?" desc="{@desc}">
<xsl:if test="@preproc:yields-generated">
<xsl:attribute name="preproc:generated" select="'true'" />
</xsl:if>
<xsl:sequence select="@preproc:*" />
</preproc:sym>
</xsl:if>