diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-05-18 06:21:23 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-05-18 06:21:23 -0700 |
commit | c51a26976c735531cf2f63d503f125da87f90133 (patch) | |
tree | c8efd7acf0728ab5e4f824b1b434fecb043d3083 /ftw.h | |
parent | 07376fac04b7c353d72563ca939ac990c162e901 (diff) | |
download | txr-c51a26976c735531cf2f63d503f125da87f90133.tar.gz txr-c51a26976c735531cf2f63d503f125da87f90133.tar.bz2 txr-c51a26976c735531cf2f63d503f125da87f90133.zip |
parser: bugfix: set line number on <lineno> tokens.
This issue was revealed as a garbage line number in
an unbound variable warning diagnostic, where the variable
occurs in a quasi word list literal. A small test case
is (list #`@var`) where var unbound.
The fix is, in the lexer, to set the yylval->lineno for all
tokens which are declared as <lineno> in the grammar file,
for which doing so has beens neglected. We do this even for
those tokens whose line number values are never accessd in any
rule; it could arise in the future.
* parser.l (grammar): Set the yylval->lineno for the tokens
HASH_BACKSLASH, HASH_B_QUOTE, HASH_SLASH, WORDS, WSPLICE,
QWORDS and QWSPLICE.
Diffstat (limited to 'ftw.h')
0 files changed, 0 insertions, 0 deletions