[DEV-7198] Create a "yield" template

Create a "yield" and add backwards compatibility for the macro of the
same name. This is one of 2 macros that need to be replaced so we do not
have to worry about them with the new compiler.
master
Joseph Frazer 2020-04-13 09:03:31 -04:00
parent 3dabc126f2
commit aa2bc6eedf
2 changed files with 15 additions and 5 deletions

View File

@ -216,5 +216,14 @@
<warning>Ignored block!</warning>
</template>
</section>
<template name="_yield_"
desc="Final scalar result provided to caller">
<param name="@values@" desc="Yield calculation" />
<rate yields="___yield" local="true">
<param-copy name="@values@" />
</rate>
</template>
</package>

View File

@ -348,13 +348,14 @@
<!--
lv:yield is simply another rate block with a special name that is recognized
by the linker
wrapper around `<t:yield />`
-->
<template match="lv:yield" mode="preproc:macros" priority="5">
<lv:rate yields="___yield" local="true">
<apply-templates mode="preproc:macros" />
</lv:rate>
<t:yield>
<copy-of select="@*" />
<apply-templates mode="preproc:expand" />
</t:yield>
</template>