Display error on non-scalar constant lv:match/@value (bugfix)
* src/current/compiler/js.xsl (compile)[lv:match]: Display error on bad match, as it was intended.master
parent
00ce03ab25
commit
440b935dc0
|
@ -811,19 +811,20 @@
|
||||||
select="root(.)/preproc:symtable/preproc:sym[ @name=$value ]" />
|
select="root(.)/preproc:symtable/preproc:sym[ @name=$value ]" />
|
||||||
|
|
||||||
<choose>
|
<choose>
|
||||||
|
<!-- value unavailable (TODO: vector/matrix support) -->
|
||||||
|
<when test="$sym and not( $sym/@value )">
|
||||||
|
<message>
|
||||||
|
<text>[jsc] !!! bad classification match: `</text>
|
||||||
|
<value-of select="$value" />
|
||||||
|
<text>' is not a scalar constant</text>
|
||||||
|
</message>
|
||||||
|
</when>
|
||||||
|
|
||||||
<!-- simple constant -->
|
<!-- simple constant -->
|
||||||
<when test="$sym and @value">
|
<when test="$sym and @value">
|
||||||
<value-of select="$sym/@value" />
|
<value-of select="$sym/@value" />
|
||||||
</when>
|
</when>
|
||||||
|
|
||||||
<!-- value unavailable (XXX: this probably should never happen...) -->
|
|
||||||
<when test="$sym and @value">
|
|
||||||
<message>
|
|
||||||
<text>[jsc] !!! TODO: bad classification match: '</text>
|
|
||||||
<value-of select="$value" />
|
|
||||||
</message>
|
|
||||||
</when>
|
|
||||||
|
|
||||||
<otherwise>
|
<otherwise>
|
||||||
<text>'</text>
|
<text>'</text>
|
||||||
<!-- TODO: Should we disallow entirely? -->
|
<!-- TODO: Should we disallow entirely? -->
|
||||||
|
|
Loading…
Reference in New Issue