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

@deprecated use ts_parser_parse_with_options and pass in a callback instead, this will be removed in 0.26.

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.