Next: , Previous: , Up: Symbol Types   [Contents][Index]


C.2.2 Template Symbols

Templates produce a single tpl symbol representing the macro itself. At the time of parsing, we do not care about the body of the template—when applied, it will expand into code that will be further processed recursively during another pass to produce the appropriate symbols for that expansion.

match: preproc:symtable on lv:template

Produce a tpl symbol with the following attributes:

name

Name of the template as provided by lv:template/@name.

dim

Always ‘0’; templates are processed as macros before compilation.

desc

Template description as provided by lv:template/@desc.

<template mode="preproc:symtable"  priority="5"  match="lv:template">
  <preproc:sym type="tpl"  name="{@name}"  dim="0"  desc="{@desc}">
    <if test="@preproc:generated = 'true'">
      <attribute name="local"  select="'true'" />
    </if>

    <sequence select="@preproc:*" />
  </preproc:sym>
</template>