Registers a callback for lemmas.
void setOnLemma(void Function(AST, int level)? f) { final wasNull = _areLemmaCallbacksNull; _onLemma = f; _updateCallbacks(wasNull); }