Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/current/include/preproc/symtable.xsl12
-rw-r--r--src/symtable/symbols.xsl5
2 files changed, 11 insertions, 6 deletions
diff --git a/src/current/include/preproc/symtable.xsl b/src/current/include/preproc/symtable.xsl
index 7635c9a..a79261e 100644
--- a/src/current/include/preproc/symtable.xsl
+++ b/src/current/include/preproc/symtable.xsl
@@ -836,14 +836,14 @@
<!-- the name is generated automatically by the preprocessor; the user cannot
set it -->
- <xsl:variable name="lname" select="
- ancestor::c:let[
- c:values/c:value[ @name=$name ]
- ]/@name
- " />
+ <xsl:variable name="lname" as="xs:string?"
+ select="ancestor::c:let[1]/@name" />
+ <!-- @lparent instead of @parent because the let does not actually exist
+ as a symbol -->
<preproc:sym name=":{$lname}:{@name}" local="true" varname="{@name}"
- type="lparam" dtype="{@type}" dim="{$dim}" desc="{@desc}" tex="{@sym}" />
+ type="lparam" dtype="{@type}" dim="{$dim}" desc="{@desc}" tex="{@sym}"
+ lparent="{$lname}" />
<xsl:apply-templates mode="preproc:symtable" />
</xsl:template>
diff --git a/src/symtable/symbols.xsl b/src/symtable/symbols.xsl
index b3f609e..e1819c3 100644
--- a/src/symtable/symbols.xsl
+++ b/src/symtable/symbols.xsl
@@ -247,6 +247,11 @@
defined scope (e.g. function parameters; let expressions).
This symbol is not used by the linker.
+ @item lparent
+ Local parameter parent.
+ This is set for @code{let} expressions in place of @code{@@parent}
+ since the parent let does not actually generate a symbol.
+
@item const
Global constant.
Constant values (of any dimension).