check ambiguity of "'" against tail if atom token is about to be quoted
This commit is contained in:
@@ -568,7 +568,12 @@ impl<'a, Outputter: HCValueOutputter> HCPrinter<'a, Outputter> {
|
|||||||
#[inline]
|
#[inline]
|
||||||
fn ambiguity_check(&self, atom: &str) -> bool {
|
fn ambiguity_check(&self, atom: &str) -> bool {
|
||||||
let tail = self.outputter.range_from(self.last_item_idx..);
|
let tail = self.outputter.range_from(self.last_item_idx..);
|
||||||
|
|
||||||
|
if !self.quoted || non_quoted_token(atom.chars()) {
|
||||||
requires_space(tail, atom)
|
requires_space(tail, atom)
|
||||||
|
} else {
|
||||||
|
requires_space(tail, "'")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn enqueue_op(&mut self, mut max_depth: usize, name: Atom, spec: OpDesc) {
|
fn enqueue_op(&mut self, mut max_depth: usize, name: Atom, spec: OpDesc) {
|
||||||
|
|||||||
Reference in New Issue
Block a user