summaryrefslogtreecommitdiffstats
path: root/tests/012/struct.tl
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-11-26 08:40:22 -0800
committerKaz Kylheku <kaz@kylheku.com>2016-11-26 08:40:22 -0800
commitdf9f85b3b720a9ebf7381b2cad7a9680ad0e31bf (patch)
treec7075648f15fda21e1eb313421206c4b8828f381 /tests/012/struct.tl
parent1f959abcf7cc1d18401d440b42761ac0b1babb78 (diff)
downloadtxr-df9f85b3b720a9ebf7381b2cad7a9680ad0e31bf.tar.gz
txr-df9f85b3b720a9ebf7381b2cad7a9680ad0e31bf.tar.bz2
txr-df9f85b3b720a9ebf7381b2cad7a9680ad0e31bf.zip
bugfix: quasilit read/print consistency, part 1.
The bug is that `@@@a` prints as `@@a` which reads as a different object. In this patch we simplify how quasiliterals are represented. Embedded expressions are no longer (sys:expr E), just E. Meta-numbers N and variables V are still (sys:var N). However `@@a` and `@a` remain equivalent. * eval.c (subst_vars): No need to look for expr_s; just evaluate a compound form. The recursive nested case is unnecessary and is removed. (expand_quasi): Do nothandle expr_s; it is not part of the quasi syntax any more. * lib.c (out_quasi_str): Do not look for expr_s in the quasi syntax; just print any expression with a @ the fallback case. * match.c (tx_subst_vars): Analogous changes to those done in subst_vars in eval.c. * parser.y (quasi_meta_helper): Static function removed. This was responsible for the issue due to stripping a level of meta from expressions already having a meta on them. (quasi_item): In the `@` n_expr syntax case, no longer call quasi_meta_helper. The remaining logic is simple enough to put in line. Symbols and integers get wrapped with (sys:var ...); other expressions are integrated into the syntax as-is.
Diffstat (limited to 'tests/012/struct.tl')
0 files changed, 0 insertions, 0 deletions