fix: delaborator: share mdata tree position with child
This commit is contained in:
parent
425cbac0dc
commit
95910108dc
1 changed files with 2 additions and 1 deletions
|
|
@ -214,7 +214,8 @@ def withProj {α} (d : DelabM α) : DelabM α := do
|
|||
|
||||
def withMDataExpr {α} (d : DelabM α) : DelabM α := do
|
||||
let Expr.mdata _ e _ ← getExpr | unreachable!
|
||||
descend e 0 d
|
||||
-- do not change position so that options on an mdata are automatically forwarded to the child
|
||||
withReader ({ · with expr := e }) d
|
||||
|
||||
partial def annotatePos (pos : Nat) : Syntax → Syntax
|
||||
| stx@(Syntax.ident _ _ _ _) => stx.setInfo { pos := pos }
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue