summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-12-25 09:59:28 -0800
committerKaz Kylheku <kaz@kylheku.com>2016-12-25 09:59:28 -0800
commita791cd6527f20c531898390e14f3c7c21c1d9571 (patch)
treed94c60a05abc8cc274bf5b5976c6917c88176b70 /eval.c
parentd45338dd1be5dae9e0c3d979d846398677ee5699 (diff)
downloadtxr-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