The best way to control Claude Code, Codex and more from any computer or phone

main
h 27 lines 706 Bytes
Raw
1 #ifndef T3_HIGHLIGHTS_H
2 #define T3_HIGHLIGHTS_H
3
4 #include <stddef.h>
5 #include <stdint.h>
6
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10
11 /**
12 * Lexes UTF-8 `source` with @pierre/highlights language `language` and points
13 * `records` at `(endUtf16, tokenId)` pairs. A token ID of UINT32_MAX ends a
14 * line, and its end value is where the next line starts. The records stay
15 * valid until the next call. Returns the number of uint32 values, or -1 when
16 * the lexer could not run.
17 *
18 * Not thread-safe: callers serialize access.
19 */
20 int64_t t3_highlights_tokenize(const uint8_t* source, size_t length, uint8_t language,
21 const uint32_t** records);
22
23 #ifdef __cplusplus
24 }
25 #endif
26
27 #endif