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.
master
Mike Gerwitz 2018-10-30 13:23:33 -04:00
parent 73d691273e
commit f719d391c7
1 changed files with 7 additions and 1 deletions

View File

@ -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>