diff options
author | Mike Gerwitz <mike.gerwitz@rtspecialty.com> | 2018-10-30 13:23:33 -0400 |
---|---|---|
committer | Mike Gerwitz <mike.gerwitz@rtspecialty.com> | 2019-02-01 16:01:56 -0500 |
commit | f719d391c7915f8cb7814de4be3011d3b0a37fa2 (patch) | |
tree | 8e27af377882dfdce01d57533a3b89f6116c7ffc /src | |
parent | 73d691273e4c25a670d22d4399ddb45b3886f3be (diff) | |
download | tame-f719d391c7915f8cb7814de4be3011d3b0a37fa2.tar.gz tame-f719d391c7915f8cb7814de4be3011d3b0a37fa2.tar.bz2 tame-f719d391c7915f8cb7814de4be3011d3b0a37fa2.zip |
Default short-hand constant description to c:value-of/@label
This is a much more useful description if present.
* src/current/include/preproc/macros.xsl (preproc:macros)[c:value-of...]:
Default generated constant description to @label.
Diffstat (limited to 'src')
-rw-r--r-- | src/current/include/preproc/macros.xsl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/current/include/preproc/macros.xsl b/src/current/include/preproc/macros.xsl index 9c4ad1d..dff4c4d 100644 --- a/src/current/include/preproc/macros.xsl +++ b/src/current/include/preproc/macros.xsl @@ -159,9 +159,15 @@ <xsl:template mode="preproc:macros" match="c:value-of[ starts-with( @name, '#' ) ]" priority="7"> + <xsl:variable name="desc" as="xs:string" + select="if ( @label ) then + @label + else + 'Generated short-hand constant'" /> + <c:const value="{substring-after( @name, '#' )}" type="float" - desc="Generated short-hand constant" /> + desc="{$desc}" /> </xsl:template> |