Rizin
unix-like reverse engineering framework and cli tools
lexer.h
Go to the documentation of this file.
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 "tree_sitter/api.h"
11 #include "tree_sitter/parser.h"
12 
13 typedef struct {
18 
20  const char *chunk;
23 
30 
32 } Lexer;
33 
34 void ts_lexer_init(Lexer *);
35 void ts_lexer_delete(Lexer *);
37 void ts_lexer_reset(Lexer *, Length);
38 void ts_lexer_start(Lexer *);
39 void ts_lexer_finish(Lexer *, uint32_t *);
41 void ts_lexer_mark_end(Lexer *);
42 bool ts_lexer_set_included_ranges(Lexer *self, const TSRange *ranges, uint32_t count);
44 
45 #ifdef __cplusplus
46 }
47 #endif
48 
49 #endif // TREE_SITTER_LEXER_H_
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void count
Definition: sflib.h:98
void ts_lexer_init(Lexer *)
Definition: lexer.c:275
void ts_lexer_set_input(Lexer *, TSInput)
Definition: lexer.c:308
void ts_lexer_finish(Lexer *, uint32_t *)
Definition: lexer.c:337
void ts_lexer_advance_to_end(Lexer *)
Definition: lexer.c:357
void ts_lexer_delete(Lexer *)
Definition: lexer.c:304
void ts_lexer_start(Lexer *)
Definition: lexer.c:322
void ts_lexer_reset(Lexer *, Length)
Definition: lexer.c:316
void ts_lexer_mark_end(Lexer *)
Definition: lexer.c:363
TSRange * ts_lexer_included_ranges(const Lexer *self, uint32_t *count)
Definition: lexer.c:395
bool ts_lexer_set_included_ranges(Lexer *self, const TSRange *ranges, uint32_t count)
Definition: lexer.c:367
#define TREE_SITTER_SERIALIZATION_BUFFER_SIZE
Definition: parser.h:14
unsigned int uint32_t
Definition: sftypes.h:29
Definition: length.h:9
Definition: lexer.h:13
bool did_get_column
Definition: lexer.h:29
TSLexer data
Definition: lexer.h:14
const char * chunk
Definition: lexer.h:20
uint32_t lookahead_size
Definition: lexer.h:28
Length token_start_position
Definition: lexer.h:16
TSLogger logger
Definition: lexer.h:22
uint32_t current_included_range_index
Definition: lexer.h:25
uint32_t chunk_size
Definition: lexer.h:27
TSRange * included_ranges
Definition: lexer.h:19
Length token_end_position
Definition: lexer.h:17
uint32_t included_range_count
Definition: lexer.h:24
Length current_position
Definition: lexer.h:15
TSInput input
Definition: lexer.h:21
uint32_t chunk_start
Definition: lexer.h:26
Definition: api.h:67
Definition: parser.h:43
Definition: api.h:78
Definition: api.h:60