| 210 | // --- Parse timeout callback --- |
| 211 | |
| 212 | static bool cbm_timeout_cb(TSParseState *state) { |
| 213 | uint64_t deadline = *(uint64_t *)state->payload; |
| 214 | return now_ns() > deadline; |
| 215 | } |
| 216 | |
| 217 | // --- Thread-local parser pool --- |
| 218 | // TSParser is not thread-safe, but can be reused across files on the same thread. |