summaryrefslogtreecommitdiffstats
path: root/parser.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-04-24 10:54:29 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-04-24 10:54:29 -0700
commit4e32c272c818c01577f42a63e09b01f8b6257fe4 (patch)
tree687e058d52c4e685f1a4543bb99e53a9a0336e31 /parser.h
parente186650c97103dd3c54621af7f7e2ab5ac07a70a (diff)
downloadtxr-4e32c272c818c01577f42a63e09b01f8b6257fe4.tar.gz
txr-4e32c272c818c01577f42a63e09b01f8b6257fe4.tar.bz2
txr-4e32c272c818c01577f42a63e09b01f8b6257fe4.zip
compiler: optimize zero and one item quasiliterals.
* share/txr/stdlib/compiler.tl (expand-quasi): Do not emit sys:fmt-join call unconditionally. If expand-quasi yields a list of one expression, we can just yield that expression. If the list is empty, we can yield a mutable empty string. (That case will not arise via `` because that converts to "" at read time, but code that generates quasiliteral syntax might have an empty case, and expect a mutable string in all cases).
Diffstat (limited to 'parser.h')
0 files changed, 0 insertions, 0 deletions