feat: Export frontend functions
This commit is contained in:
parent
4f5950ed78
commit
762a139e78
|
@ -8,6 +8,7 @@ namespace Lean.FileMap
|
|||
/-- Extract the range of a `Syntax` expressed as lines and columns. -/
|
||||
-- Extracted from the private declaration `Lean.Elab.formatStxRange`,
|
||||
-- in `Lean.Elab.InfoTree.Main`.
|
||||
@[export pantograph_frontend_stx_range]
|
||||
protected def stxRange (fileMap : FileMap) (stx : Syntax) : Position × Position :=
|
||||
let pos := stx.getPos?.getD 0
|
||||
let endPos := stx.getTailPos?.getD pos
|
||||
|
|
|
@ -88,6 +88,7 @@ structure TacticInvocation where
|
|||
namespace TacticInvocation
|
||||
|
||||
/-- Return the range of the tactic, as a pair of file positions. -/
|
||||
@[export pantograph_frontend_tactic_invocation_range]
|
||||
protected def range (t : TacticInvocation) : Position × Position := t.ctx.fileMap.stxRange t.info.stx
|
||||
|
||||
/-- Pretty print a tactic. -/
|
||||
|
|
Loading…
Reference in New Issue