def
Lean.Syntax.formatStx
(stx : Lean.Syntax)
(maxDepth : optParam (Option Nat) none)
(showInfo : optParam 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.
Equations
- Lean.Syntax.formatStx stx maxDepth showInfo = Lean.Syntax.formatStxAux maxDepth showInfo 0 stx
Instances For
Equations
- Lean.Syntax.instToFormatSyntax = { format := fun stx => Lean.Syntax.formatStx stx none }
Equations
- Lean.Syntax.instToStringSyntax = { toString := toString ∘ Std.format }
Equations
- Lean.Syntax.instToFormatTSyntax = { format := fun x => Std.format x.raw }