lean4-htt/tests/lean/1275.lean.expected.out
Kyle Miller 6cdede33fb
fix: make sure name literals use escaping when pretty printing (#5639)
The app unexpanders for `Name.mkStr1` through `Name.mkStr8` weren't
respecting the escaping rules for names. For example, ``#check `«a.b»``
would show `` `a.b``.

This PR folds the unexpanders into the name literal delaborator, where
escaping is already handled.
2024-10-08 17:36:49 +00:00

22 lines
628 B
Text

fun x => do
let info ← MonadRef.mkInfoFromRefPos
let scp ← getCurrMacroScope
let mainModule ← getMainModule
pure
{
raw :=
Syntax.node2 info `«term👉__» (Syntax.atom info "👉")
x.raw } : (x : TSyntax [`ident, `token._]) → ?m x (TSyntax `term)
true
true
fun x => do
let info ← MonadRef.mkInfoFromRefPos
let scp ← getCurrMacroScope
let mainModule ← getMainModule
pure
{
raw :=
Syntax.node2 info `termBarBazBoing (Syntax.atom info "bar")
x.raw } : (x : TSyntax [`token.baz, `token.boing]) → ?m x (TSyntax `term)
true
true