220 lines
5.5 KiB
XML
220 lines
5.5 KiB
XML
|
|
<package xmlns="http://www.lovullo.com/rater"
|
|
xmlns:c="http://www.lovullo.com/calc"
|
|
xmlns:t="http://www.lovullo.com/rater/apply-template">
|
|
|
|
<template name="_empty_" desc="Empty" />
|
|
|
|
<template name="_with-static-identified_"
|
|
desc="Template with identified expressions">
|
|
<rate yields="tplStaticA">
|
|
<c:sum />
|
|
</rate>
|
|
<classify as="tpl-static-b">
|
|
<any />
|
|
</classify>
|
|
</template>
|
|
|
|
<template name="_with-static-unidentified_"
|
|
desc="Unidentified expressions in body">
|
|
<c:sum>
|
|
<c:product />
|
|
</c:sum>
|
|
</template>
|
|
|
|
<template name="_with-static-mix_"
|
|
desc="Both identified and unidentified that may or may
|
|
not be reachable in expansion context">
|
|
<c:product>
|
|
<c:sum />
|
|
</c:product>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<rate yields="tplStaticMix" />
|
|
|
|
<rate yields="tplStaticMixEnd">
|
|
<c:product />
|
|
</rate>
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template name="_short-hand-nullary_" desc="No params" />
|
|
<apply-template name="_short-hand-nullary_" />
|
|
|
|
<template name="_short-hand-unary_" desc="One param" />
|
|
<apply-template name="_short-hand-unary_">
|
|
<with-param name="@foo@" value="bar" />
|
|
</apply-template>
|
|
|
|
<template name="_short-hand-nary_" desc="N params" />
|
|
<apply-template name="_short-hand-nary_">
|
|
<with-param name="@foo@" value="bar" />
|
|
<with-param name="@bar@" value="baz" />
|
|
<with-param name="@baz@" value="quux" />
|
|
</apply-template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template name="_short-hand-nullary-body_" desc="Nullary with body" />
|
|
<apply-template name="_short-hand-nullary-body_">
|
|
<with-param name="@values@" value="___dsgr-bb5___" />
|
|
</apply-template>
|
|
<template name="___dsgr-bb5___"
|
|
desc="Desugared body of shorthand template application of `_short-hand-nullary-body_`">
|
|
<c:product>
|
|
<c:sum />
|
|
</c:product>
|
|
</template>
|
|
|
|
<template name="_short-hand-nary-body_" desc="N-ary with body" />
|
|
<apply-template name="_short-hand-nary-body_">
|
|
<with-param name="@bar@" value="baz" />
|
|
<with-param name="@baz@" value="quux" />
|
|
<with-param name="@values@" value="___dsgr-c6c___" />
|
|
</apply-template>
|
|
<template name="___dsgr-c6c___"
|
|
desc="Desugared body of shorthand template application of `_short-hand-nary-body_`">
|
|
<c:sum>
|
|
<c:product />
|
|
</c:sum>
|
|
</template>
|
|
|
|
<template name="_short-hand-nullary-outer_"
|
|
desc="Outer template holding an inner" />
|
|
<apply-template name="_short-hand-nullary-outer_">
|
|
<with-param name="@values@" value="___dsgr-d50___" />
|
|
</apply-template>
|
|
<template name="___dsgr-d50___"
|
|
desc="Desugared body of shorthand template application of `_short-hand-nullary-outer_`">
|
|
<template name="_short-hand-nullary-inner-dfn-inner_"
|
|
desc="Inner template applied inner" />
|
|
<apply-template name="_short-hand-nullary-inner-dfn-inner_" />
|
|
</template>
|
|
|
|
<template name="_short-hand-nullary-inner-dfn-outer_"
|
|
desc="Define template outer but apply inner" />
|
|
<apply-template name="_short-hand-nullary-outer_">
|
|
<with-param name="@values@" value="___dsgr-ea4___" />
|
|
</apply-template>
|
|
<template name="___dsgr-ea4___"
|
|
desc="Desugared body of shorthand template application of `_short-hand-nullary-outer_`">
|
|
<apply-template name="_short-hand-nullary-inner-dfn-outer_" />
|
|
</template>
|
|
|
|
<template name="_short-hand-unary-with-body_"
|
|
desc="Unary with body" />
|
|
<apply-template name="_short-hand-unary-with-body_">
|
|
<with-param name="@foo@" value="bar" />
|
|
<with-param name="@values@" value="___dsgr-f6b___" />
|
|
</apply-template>
|
|
<template name="___dsgr-f6b___"
|
|
desc="Desugared body of shorthand template application of `_short-hand-unary-with-body_`">
|
|
<template name="_short-hand-unary-with-body-inner_"
|
|
desc="Inner template" />
|
|
<apply-template name="_short-hand-unary-with-body-inner_" />
|
|
</template>
|
|
|
|
<template name="_short-hand-in-expr_"
|
|
desc="Template to be applied within an expression" />
|
|
<rate yields="shortHandTplInExpr">
|
|
<apply-template name="_short-hand-in-expr_">
|
|
<with-param name="@in@" value="rate" />
|
|
</apply-template>
|
|
</rate>
|
|
|
|
<template name="_tpl-with-short-hand-inner_"
|
|
desc="Template with a shorthand application in its body">
|
|
<template name="_tpl-with-short-hand-inner-inner_" />
|
|
<apply-template name="_tpl-with-short-hand-inner-inner_" />
|
|
|
|
<c:sum>
|
|
<apply-template name="_tpl-with-short-hand-inner-inner_">
|
|
<with-param name="@in@" value="sum" />
|
|
</apply-template>
|
|
</c:sum>
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template name="_match-child_" desc="Template with a match child">
|
|
<match on="foo" value="TRUE" />
|
|
</template>
|
|
|
|
<template name="_tpl-param_" desc="Template with a param">
|
|
<param name="@foo@" desc="A parameter" />
|
|
<param name="@bar@" desc="Another parameter" />
|
|
|
|
<any>
|
|
<match on="@foo@" value="TRUE" />
|
|
<match on="@bar@" value="TRUE" />
|
|
</any>
|
|
</template>
|
|
|
|
|
|
<template name="_tpl-param_body_"
|
|
desc="Template with params with bodies">
|
|
<param name="@text@" desc="A param with a literal">
|
|
<text>lonely foo</text>
|
|
</param>
|
|
|
|
<param name="@ref@" desc="A param with a ref">
|
|
<param-value name="@text@" />
|
|
</param>
|
|
|
|
<param name="@both@" desc="A param with both literal and ref">
|
|
<text>foo </text>
|
|
<param-value name="@text@" />
|
|
<text> bar</text>
|
|
</param>
|
|
|
|
<any>
|
|
<match on="@ref@" value="TRUE" />
|
|
<match on="@both@" value="TRUE" />
|
|
</any>
|
|
</template>
|
|
</package>
|
|
|