Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoseph Frazer <joseph.frazer@ryansg.com>2020-04-13 09:03:31 -0400
committerJoseph Frazer <joseph.frazer@ryansg.com>2020-04-17 07:42:09 -0400
commitaa2bc6eedf547551dc8344913687632887b4fb1f (patch)
tree87e9424d27ec99c2e9846322c493454b0ed64801
parent3dabc126f2000ec3cd11f25bf9a92cb96446b7f6 (diff)
downloadtame-aa2bc6eedf547551dc8344913687632887b4fb1f.tar.gz
tame-aa2bc6eedf547551dc8344913687632887b4fb1f.tar.bz2
tame-aa2bc6eedf547551dc8344913687632887b4fb1f.zip
[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.
-rw-r--r--core/base.xml9
-rw-r--r--src/current/include/preproc/macros.xsl11
2 files changed, 15 insertions, 5 deletions
diff --git a/core/base.xml b/core/base.xml
index 696ba9e..264104c 100644
--- a/core/base.xml
+++ b/core/base.xml
@@ -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>
diff --git a/src/current/include/preproc/macros.xsl b/src/current/include/preproc/macros.xsl
index 33c68b7..1857ad4 100644
--- a/src/current/include/preproc/macros.xsl
+++ b/src/current/include/preproc/macros.xsl
@@ -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>