feat: add quot_precheck Lean.Parser.Term.explicit

This commit is contained in:
Jon Eugster 2023-02-07 16:29:38 +01:00 committed by Sebastian Ullrich
parent 9d013ba3f5
commit 07bd2a8488

View file

@ -123,6 +123,11 @@ private def isSectionVariable (e : Expr) : TermElabM Bool := do
| `(($e :)) => precheck e
| _ => throwUnsupportedSyntax
@[builtin_quot_precheck Lean.Parser.Term.explicit] def precheckExplicit : Precheck
| `(@ $id) => do
precheck id
| _ => throwUnsupportedSyntax
@[builtin_quot_precheck choice] def precheckChoice : Precheck := fun stx => do
let checks ← stx.getArgs.mapM (_root_.observing ∘ precheck)
let fails := checks.zip stx.getArgs |>.filterMap fun