fix: token antiquotations should create synthetic positions

synthetic means synthetic means synthetic
This commit is contained in:
Sebastian Ullrich 2022-08-01 23:31:19 +02:00 committed by Leonardo de Moura
parent 303e322255
commit 0272c30b4b

View file

@ -112,7 +112,7 @@ private partial def quoteSyntax : Syntax → TermElabM Term
`(@TSyntax.raw $(quote <| ks.map (·.1)) $(getAntiquotTerm (getCanonicalAntiquot stx)))
else if isTokenAntiquot stx && !isEscapedAntiquot stx then
match stx[0] with
| Syntax.atom _ val => `(Syntax.atom (Option.getD (getHeadInfo? $(getAntiquotTerm stx)) info) $(quote val))
| Syntax.atom _ val => `(Syntax.atom (SourceInfo.fromRef $(getAntiquotTerm stx)) $(quote val))
| _ => throwErrorAt stx "expected token"
else if isAntiquotSuffixSplice stx && !isEscapedAntiquot (getCanonicalAntiquot (getAntiquotSuffixSpliceInner stx)) then
-- splices must occur in a `many` node