Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Gerwitz <mike.gerwitz@rtspecialty.com>2017-12-11 10:43:45 -0500
committerMike Gerwitz <mike.gerwitz@rtspecialty.com>2017-12-11 10:50:49 -0500
commite78c3cbe98f6c0f2436285aca057ea1bbc09d9cd (patch)
tree6993e4bb05ea90a6856540f5138348ede8f363f0
parenta38327b50591aa81efdddf0d06679e9e9b4d1b9b (diff)
downloadtame-e78c3cbe98f6c0f2436285aca057ea1bbc09d9cd.tar.gz
tame-e78c3cbe98f6c0f2436285aca057ea1bbc09d9cd.tar.bz2
tame-e78c3cbe98f6c0f2436285aca057ea1bbc09d9cd.zip
symtable: Add @lparent to let lparam symbols
* src/current/include/preproc/symtable.xsl (preproc:symtable)[c:let]: Add @lparam to symbol.
-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).