any/all blocks within classifications are extracted into their own
classifications. When they have sibling nodes, the extracted
classifications did not have their templates expanded. Ouch.
This is a situation that should never happen (I haven't yet determined
whether or not we should support this type of thing in the future), but when
it does, do something intelligent.
* src/current/include/preproc/symtable.xsl (preproc:symtable)[c:*[@generates]]:
Consider only first ancestor lv:rate.
For example, with template-generating templates, if a reference is unknown
and therefore determined to be blank, an attribute might be completely
removed while the template is being generated. (See the /when package in
core for an example.) That is not good.
* src/current/include/preproc/template
(preproc:expand-template): Add `tpl' tunneling param to
preproc:apply-template application.
(preproc:apply-template)[@*]: Retain param reference if applying template
does not define it.
This is important for template-generating templates.
* src/current/include/preproc/template.xsl (lv:if,lv:unlesS):
Retain conditional nodes verbatim when referenced param is unknown.
* src/current/include/preproc/expand.xsl
(lv:classify): Set `@preproc:yields-generated' if `@yields' was not
previously defined.
* src/current/include/preproc/macros.xsl:
(lv:rate-each): Set `@preproc:yields-generated` if `@yields' was not
previously defined.
* src/current/include/preproc/symtable.xsl:
(lv:rate, lv:classify): Set `@preproc:generated` on symbol if
`@preproc:yields-generated'.
Not time to address styling this at the moment. This code was previously
not reached until recent fixes. And I forgot that this was even
permitted (such complex calculations within matches)!
* src/current/summary.xsl (match-desc): Do not terminate on unknown
match-desc elements.
Rather than producing a syntax error, provide a useful warning and simply
yield 0.
* src/current/compiler/js.xsl (compile)[lv:rate]: Warn and yield 0 when no
calculation is provided in the body.
We've never done this before (thus this bug lasting so many years), but only
because it doesn't really make much sense in practice; this was caught when
writing test cases.
* src/current/compiler/js.xsl (compile)[lv:match]: Compile `consts' instead
of `args' when referencing a constant.
* src/current/include/preproc/template.xsl
(preproc:gen-param-value)[lv:param-add]: Resolve value of @value before
processing numeric expression (to support template variables). Error
when any values are not numeric rather than producing NaN.
This is imperfect, but will work based on current assumptions.
* src/current/include/preproc/expand.xsl (preproc:expand)[c:const,lv:const):
If '@' is found, do not perform expansion.
They corrupt the display. This solution isn't ideal, though.
* src/current/include/calc-display.xsl: Use new `preproc:tex-index'.
(preproc:tex-index): Add function.
* src/current/summary.xsl: Use `preproc:tex-index' for @index display.
* src/current/include/display.xsl (preproc:dim-to-str): New function.
(summary:desc): Use it. Display appropriate generator dimensions as a
string rather than hard-coding to `vector'. Remove yield symbol ref.
Vector length is customarily denoted by |V|.
* src/current/include/calc-display.xsl (c:sum, c:length-of): Use new
notation.
* src/current/summary.xsl: Update N.B. with new notation.
There's no point in having a link to itself. Further, the link was wrong.
* src/current/summary.xsl (gen-equation-details): Remove link from generator
name.
When a symbol is imported as local, and subsequently directly imported using
another package with @export, the symbol needs to be overridden as
non-local.
* src/current/include/preproc/symtable.xsl
(preproc:sym-discover): Deduplicate based on local status.
(preproc:symtable-process-symbols): Retain non-local symbols when only
local version of the symbol exists.
This is a linker bug that I don't have time to debug at the
moment. Hopefully the linker will be re-written in Scheme sometime in the
near future anyway.
* src/current/summary.xsl (preproc:sym-lookup): Take first result of symbol
lookup.
If it is copied an yields an empty value, then it is later converted into a
0, which is wholly incorrect in the case of generators.
* src/current/include/preproc/macros.xsl (preproc:macros)[lv:rate-each]:
Conditionally copy `@dim'.
This is just a temporary workaround for a failed lookup; no time to debug at
the moment.
* src/current/summary.xsl (preproc:sym-lookup): Allow empty sequence as
return value.
If the hash is e.g. `:class:*', it tries to parse it, which is
invalid. There's a better solution to this problem, but I don't have time
to test possibly messing this up right now.
* src/current/scripts/entry-form.js (begin): Ignore JSON parsing errors.
This same problem can occur anywhere---everything needs to be converted to
use the new `preproc:sym-lookup', but I don't have the time at the moment.
* src/current/summary.xsl (preproc:sym-lookup): New function.
(program): New toplevel variable.
(process-match)[lv:match]: Use function.