diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-12-25 09:59:28 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-12-25 09:59:28 -0800 |
commit | a791cd6527f20c531898390e14f3c7c21c1d9571 (patch) | |
tree | d94c60a05abc8cc274bf5b5976c6917c88176b70 /eval.c | |
parent | d45338dd1be5dae9e0c3d979d846398677ee5699 (diff) | |
download | txr-a791cd6527f20c531898390e14f3c7c21c1d9571.tar.gz txr-a791cd6527f20c531898390e14f3c7c21c1d9571.tar.bz2 txr-a791cd6527f20c531898390e14f3c7c21c1d9571.zip |
Fix inconsistency in regex-source.
If we compile the regex expression (compound "str*"), calling
regex-source on the compiled regex object yields "str*".
That, of course, is treated as regex character syntax if
fed back to regex-compile, and the * becomes an operator.
We want the source to be (compound "str*").
This happens because the AST optimizer reduces
(compound X) -> X.
* regex.c (regex_compile): If the optimized expression is just
a character string atom S, then for the purposes of
maintaining the source code, convert it to (compound S).
Diffstat (limited to 'eval.c')
0 files changed, 0 insertions, 0 deletions