diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-21 20:22:09 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-21 20:22:09 +0100 |
| commit | 5a8dbc6347b3541e84fe669b22c17ad3b715e258 (patch) | |
| tree | b148c450939688caaaeb4adac6f2faa1eaffe649 /vendor/github.com/mitjafelicijan/go-tree-sitter/lexer.h | |
| download | qwe-editor-5a8dbc6347b3541e84fe669b22c17ad3b715e258.tar.gz | |
Engage!
Diffstat (limited to 'vendor/github.com/mitjafelicijan/go-tree-sitter/lexer.h')
| -rw-r--r-- | vendor/github.com/mitjafelicijan/go-tree-sitter/lexer.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/vendor/github.com/mitjafelicijan/go-tree-sitter/lexer.h b/vendor/github.com/mitjafelicijan/go-tree-sitter/lexer.h new file mode 100644 index 0000000..a8cc38f --- /dev/null +++ b/vendor/github.com/mitjafelicijan/go-tree-sitter/lexer.h | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | #ifndef TREE_SITTER_LEXER_H_ | ||
| 2 | #define TREE_SITTER_LEXER_H_ | ||
| 3 | |||
| 4 | #ifdef __cplusplus | ||
| 5 | extern "C" { | ||
| 6 | #endif | ||
| 7 | |||
| 8 | #include "./length.h" | ||
| 9 | #include "./subtree.h" | ||
| 10 | #include "api.h" | ||
| 11 | #include "./parser.h" | ||
| 12 | |||
| 13 | typedef struct { | ||
| 14 | TSLexer data; | ||
| 15 | Length current_position; | ||
| 16 | Length token_start_position; | ||
| 17 | Length token_end_position; | ||
| 18 | |||
| 19 | TSRange *included_ranges; | ||
| 20 | const char *chunk; | ||
| 21 | TSInput input; | ||
| 22 | TSLogger logger; | ||
| 23 | |||
| 24 | uint32_t included_range_count; | ||
| 25 | uint32_t current_included_range_index; | ||
| 26 | uint32_t chunk_start; | ||
| 27 | uint32_t chunk_size; | ||
| 28 | uint32_t lookahead_size; | ||
| 29 | bool did_get_column; | ||
| 30 | |||
| 31 | char debug_buffer[TREE_SITTER_SERIALIZATION_BUFFER_SIZE]; | ||
| 32 | } Lexer; | ||
| 33 | |||
| 34 | void ts_lexer_init(Lexer *); | ||
| 35 | void ts_lexer_delete(Lexer *); | ||
| 36 | void ts_lexer_set_input(Lexer *, TSInput); | ||
| 37 | void ts_lexer_reset(Lexer *, Length); | ||
| 38 | void ts_lexer_start(Lexer *); | ||
| 39 | void ts_lexer_finish(Lexer *, uint32_t *); | ||
| 40 | void ts_lexer_advance_to_end(Lexer *); | ||
| 41 | void ts_lexer_mark_end(Lexer *); | ||
| 42 | bool ts_lexer_set_included_ranges(Lexer *self, const TSRange *ranges, uint32_t count); | ||
| 43 | TSRange *ts_lexer_included_ranges(const Lexer *self, uint32_t *count); | ||
| 44 | |||
| 45 | #ifdef __cplusplus | ||
| 46 | } | ||
| 47 | #endif | ||
| 48 | |||
| 49 | #endif // TREE_SITTER_LEXER_H_ | ||
