#[no_mangle]
pub unsafe extern "C" fn ts_highlighter_highlight(
this: *const TSHighlighter,
scope_name: *const c_char,
source_code: *const c_char,
source_code_len: u32,
output: *mut TSHighlightBuffer,
cancellation_flag: *const AtomicUsize,
) -> ErrorCode
Expand description
Highlight a string of source code.
ยงSafety
The caller must ensure that scope_name
, source_code
, output
, and cancellation_flag
are
valid for the lifetime of the TSHighlighter
instance, and are non-null.
this
must be a non-null pointer to a TSHighlighter
instance created by
ts_highlighter_new