fix: trim syntax in messages

This commit is contained in:
Sebastian Ullrich 2023-03-29 11:08:57 +02:00
parent bafa4e0a78
commit f9dcc9ca1b

View file

@ -103,6 +103,8 @@ def mkPPContext (nCtx : NamingContext) (ctx : MessageDataContext) : PPContext :=
}
def ofSyntax (stx : Syntax) : MessageData :=
-- discard leading/trailing whitespace
let stx := stx.copyHeadTailInfoFrom .missing
.ofPPFormat {
pp := fun
| some ctx => ppTerm ctx ⟨stx⟩ -- HACK: might not be a term