Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-01-16 12:12:33 -0500
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2018-01-16 12:12:33 -0500
commit211387ce2f7617b0e155b734259d3aaba3116db5 (patch)
tree5ab0e9ced09ff7565b8c19141087839a7fcb5818
parentf8dcdbfd230c3596058a4c327ad72ecaf6f9c682 (diff)
downloadtame-211387ce2f7617b0e155b734259d3aaba3116db5.tar.gz
tame-211387ce2f7617b0e155b734259d3aaba3116db5.tar.bz2
tame-211387ce2f7617b0e155b734259d3aaba3116db5.zip
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'.
-rw-r--r--src/current/include/preproc/expand.xsl3
-rw-r--r--src/current/include/preproc/macros.xsl2
-rw-r--r--src/current/include/preproc/symtable.xsl11
3 files changed, 15 insertions, 1 deletions
diff --git a/src/current/include/preproc/expand.xsl b/src/current/include/preproc/expand.xsl
index 0cb4312..e1d82af 100644
--- a/src/current/include/preproc/expand.xsl
+++ b/src/current/include/preproc/expand.xsl
@@ -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"
diff --git a/src/current/include/preproc/macros.xsl b/src/current/include/preproc/macros.xsl
index 5026df1..9636579 100644
--- a/src/current/include/preproc/macros.xsl
+++ b/src/current/include/preproc/macros.xsl
@@ -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>
diff --git a/src/current/include/preproc/symtable.xsl b/src/current/include/preproc/symtable.xsl
index 8bb3146..e8fefe5 100644
--- a/src/current/include/preproc/symtable.xsl
+++ b/src/current/include/preproc/symtable.xsl
@@ -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>