tree_sitter::ffi

Function ts_parser_set_cancellation_flag

source
pub unsafe extern "C" fn ts_parser_set_cancellation_flag(
    self_: *mut TSParser,
    flag: *const usize,
)
Expand description

Set the parser’s current cancellation flag pointer.

If a non-null pointer is assigned, then the parser will periodically read from this pointer during parsing. If it reads a non-zero value, it will halt early, returning NULL. See ts_parser_parse for more information.