Lean4
@[term_elab withoutCDotImpl, inherit_doc withoutCDot]
def elabWithoutCDot : TermElab
| `(without_cdot_impl($e : $type)), _ => do
let type ← withSynthesize (postpone := .yes) <| elabType type
let e ← elabTerm e type
ensureHasType type e
| `(without_cdot_impl($e :)), expectedType? => do
let e ← withSynthesize (postpone := .no) <| elabTerm e none
ensureHasType expectedType? e
| `(without_cdot_impl($e)), expectedType? => do
elabTerm e expectedType?
| _, _ => throwUnsupportedSyntax