def
Lean.Syntax.formatStx
(stx : Lean.Syntax)
(maxDepth : Option Nat := none)
(showInfo : Bool := false)
:
Pretty print the given syntax stx
as a Format
.
Nodes deeper than maxDepth
are omitted.
Setting the showInfo
flag will also print the SourceInfo
for each node.
Instances For
Equations
- Lean.Syntax.instToString = { toString := toString ∘ Lean.format }
Equations
- Lean.Syntax.instToFormatTSyntax = { format := fun (x : Lean.TSyntax k) => Lean.format x.raw }
Equations
- Lean.Syntax.instToStringTSyntax = { toString := fun (x : Lean.TSyntax k) => toString x.raw }