Documentation

Lean.ParserCompiler

Gadgets for compiling parser declarations into other programs, such as pretty printers.

structure Lean.ParserCompiler.Context (α : Type) :
Type
Equations
Equations
  • One or more equations did not get rendered due to their size.

Takes an expression of type Parser, and determines the syntax kind of the root node it produces.

partial def Lean.ParserCompiler.compileParserExpr {α : Type} (ctx : Lean.ParserCompiler.Context α) (builtin : Bool) (force : Bool) (e : Lean.Expr) :

Translate an expression of type Parser into one of type tyName, tagging intermediary constants with ctx.combinatorAttr. If force is false, refuse to do so for imported constants.

Precondition: α must match ctx.tyName.

Equations
  • One or more equations did not get rendered due to their size.