fix: quote Name.anonymous

This commit is contained in:
Sebastian Ullrich 2022-04-06 15:23:35 +02:00
parent 7d48d125da
commit e6954bb4f3

View file

@ -792,7 +792,7 @@ instance : Quote Substring := ⟨fun s => Syntax.mkCApp `String.toSubstring #[qu
-- in contrast to `Name.toString`, we can, and want to be, precise here
private def getEscapedNameParts? (acc : List String) : Name → Option (List String)
| Name.anonymous => return acc
| Name.anonymous => if acc.isEmpty then none else some acc
| Name.str n s _ => do
let s ← Name.escapePart s
getEscapedNameParts? (s::acc) n