baml.sap._new_parse_cache

(internal) Builds a parse cache for `T`.

Reference version

Signature

function baml.sap._new_parse_cache<T>() -> baml.sap._ParseCache<T> throws never

(internal) Builds a parse cache for T.

A free function rather than a _ParseCache static method: a static method's class type args have no receiver to ride in on, and the call path derives them from the receiver's type — so a static method would be given operand slots the call site never fills. Instance methods on a generic class (_parse_final, _parse_partial) are threaded correctly.

Source:<builtin>/baml/ns_sap/sap.bamlbytes 1410–1494