1 #ifndef TREE_SITTER_PARSER_H_
2 #define TREE_SITTER_PARSER_H_
12 #define ts_builtin_sym_error ((TSSymbol)-1)
13 #define ts_builtin_sym_end 0
14 #define TREE_SITTER_SERIALIZATION_BUFFER_SIZE 1024
18 #ifndef TREE_SITTER_API_H_
120 void *(*create)(void);
133 #define START_LEXER() \
134 bool result = false; \
140 lexer->advance(lexer, skip); \
143 lookahead = lexer->lookahead;
145 #define ADVANCE(state_value) \
147 state = state_value; \
151 #define SKIP(state_value) \
154 state = state_value; \
158 #define ACCEPT_TOKEN(symbol_value) \
160 lexer->result_symbol = symbol_value; \
161 lexer->mark_end(lexer);
163 #define END_STATE() return result;
169 #define SMALL_STATE(id) id - LARGE_STATE_COUNT
173 #define ACTIONS(id) id
175 #define SHIFT(state_value) \
178 .type = TSParseActionTypeShift, \
179 .state = state_value \
183 #define SHIFT_REPEAT(state_value) \
186 .type = TSParseActionTypeShift, \
187 .state = state_value, \
192 #define SHIFT_EXTRA() \
195 .type = TSParseActionTypeShift, \
200 #define REDUCE(symbol_val, child_count_val, ...) \
203 .type = TSParseActionTypeReduce, \
204 .symbol = symbol_val, \
205 .child_count = child_count_val, \
212 .type = TSParseActionTypeRecover \
215 #define ACCEPT_INPUT() \
217 .type = TSParseActionTypeAccept \
static RZ_NULLABLE RzILOpBitVector * shift(RzILOpBitVector *val, RZ_NULLABLE RzILOpBool **carry_out, arm_shifter type, RZ_OWN RzILOpBitVector *dist)
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
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 static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec struct timespec static rem const char static group const void length
static void struct sockaddr socklen_t static fromlen static backlog static fork char char char static envp int struct rusage static rusage struct utsname static buf struct sembuf unsigned
@ TSParseActionTypeAccept
@ TSParseActionTypeRecover
@ TSParseActionTypeReduce
uint32_t large_state_count
const TSLexMode * lex_modes
const TSParseActionEntry * parse_actions
uint32_t production_id_count
const char *const * field_names
const TSSymbol * alias_sequences
const TSFieldMapSlice * field_map_slices
const char *const * symbol_names
const TSSymbol * symbol_map
uint16_t max_alias_sequence_length
const uint32_t * small_parse_table_map
unsigned(* serialize)(void *, char *)
void(* deserialize)(void *, const char *, unsigned)
const TSFieldMapEntry * field_map_entries
const uint16_t * parse_table
const TSSymbol * public_symbol_map
const TSStateId * primary_state_ids
struct TSLanguage::@436 external_scanner
bool(* scan)(void *, TSLexer *, const bool *symbol_whitelist)
const TSSymbolMetadata * symbol_metadata
const uint16_t * alias_map
TSSymbol keyword_capture_token
bool(* lex_fn)(TSLexer *, TSStateId)
const uint16_t * small_parse_table
bool(* keyword_lex_fn)(TSLexer *, TSStateId)
uint32_t external_token_count
void(* advance)(TSLexer *, bool)
uint32_t(* get_column)(TSLexer *)
bool(* eof)(const TSLexer *)
bool(* is_at_included_range_start)(const TSLexer *)
void(* mark_end)(TSLexer *)