started spliting funcs into other stuff

This commit is contained in:
Maieul BOYER 2024-05-30 15:53:46 +02:00
parent 3906ec2722
commit c8dcae9550
No known key found for this signature in database
2 changed files with 93 additions and 205 deletions

91
parser/src/funcs.h Normal file
View file

@ -0,0 +1,91 @@
#ifndef FUNCS_H
#define FUNCS_H
#include "./api_structs.h"
bool ts_external_scanner_state_eq(const t_external_scanner_state *self, const char *, unsigned);
bool ts_lexer_set_included_ranges(t_lexer *self, const t_parse_range *ranges, uint32_t count);
bool ts_range_array_intersects(const t_range_array *self, unsigned start_index, uint32_t start_byte, uint32_t end_byte);
bool ts_stack_can_merge(t_stack *, t_stack_version, t_stack_version);
bool ts_stack_has_advanced_since_error(const t_stack *, t_stack_version);
bool ts_stack_is_active(const t_stack *, t_stack_version);
bool ts_stack_is_halted(const t_stack *, t_stack_version);
bool ts_stack_is_paused(const t_stack *, t_stack_version);
bool ts_stack_merge(t_stack *, t_stack_version, t_stack_version);
bool ts_subtree_external_scanner_state_eq(t_subtree, t_subtree);
char *ts_subtree_string(t_subtree, t_symbol, bool, const t_language *, bool include_all);
const char *ts_external_scanner_state_data(const t_external_scanner_state *);
const t_external_scanner_state *ts_subtree_external_scanner_state(t_subtree self);
int ts_stack_dynamic_precedence(t_stack *, t_stack_version);
int ts_subtree_compare(t_subtree, t_subtree, t_subtree_pool *);
t_first_tree *ts_tree_new(t_subtree root, const t_language *language, const t_parse_range *, unsigned);
t_length ts_stack_position(const t_stack *, t_stack_version);
t_mutable_subtree ts_subtree_make_mut(t_subtree_pool *, t_subtree);
t_mutable_subtree ts_subtree_new_node(t_symbol, t_subtree_array *, unsigned, const t_language *);
t_parse_node ts_node_new(const t_first_tree *, const t_subtree *, t_length, t_symbol);
t_parse_node ts_tree_cursor_parent_node(const t_tree_cursor *);
t_parse_range *ts_lexer_included_ranges(const t_lexer *self, uint32_t *count);
t_stack *ts_stack_new(t_subtree_pool *);
t_stack_slice_array ts_stack_pop_all(t_stack *, t_stack_version);
t_stack_slice_array ts_stack_pop_count(t_stack *, t_stack_version, uint32_t count);
t_stack_slice_array ts_stack_pop_pending(t_stack *, t_stack_version);
t_stack_summary *ts_stack_get_summary(t_stack *, t_stack_version);
t_stack_version ts_stack_copy_version(t_stack *, t_stack_version);
t_state_id ts_language_next_state(const t_language *self, t_state_id state, t_symbol symbol);
t_state_id ts_stack_state(const t_stack *, t_stack_version);
t_subtree ts_stack_last_external_token(const t_stack *, t_stack_version);
t_subtree ts_stack_resume(t_stack *, t_stack_version);
t_subtree ts_subtree_edit(t_subtree, const t_input_edit *edit, t_subtree_pool *);
t_subtree ts_subtree_last_external_token(t_subtree);
t_subtree ts_subtree_new_error(t_subtree_pool *, int32_t, t_length, t_length, uint32_t, t_state_id, const t_language *);
t_subtree ts_subtree_new_error_node(t_subtree_array *, bool, const t_language *);
t_subtree ts_subtree_new_leaf(t_subtree_pool *, t_symbol, t_length, t_length, uint32_t, t_state_id, bool, bool, bool, const t_language *);
t_subtree ts_subtree_new_missing_leaf(t_subtree_pool *, t_symbol, t_length, uint32_t, const t_language *);
t_subtree_array ts_stack_pop_error(t_stack *, t_stack_version);
t_subtree_pool ts_subtree_pool_new(uint32_t capacity);
t_symbol ts_language_public_symbol(const t_language *, t_symbol);
t_symbol_metadata ts_language_symbol_metadata(const t_language *, t_symbol);
t_tree_cursor_step ts_tree_cursor_goto_first_child_internal(t_tree_cursor *);
t_tree_cursor_step ts_tree_cursor_goto_next_sibling_internal(t_tree_cursor *);
uint32_t ts_stack_version_count(const t_stack *);
unsigned ts_stack_error_cost(const t_stack *, t_stack_version version);
unsigned ts_stack_node_count_since_error(const t_stack *, t_stack_version);
unsigned ts_subtree_get_changed_ranges(const t_subtree *old_tree, const t_subtree *new_tree, t_tree_cursor *cursor1, t_tree_cursor *cursor2, const t_language *language, const t_range_array *included_range_differences, t_parse_range **ranges);
void ts_external_scanner_state_delete(t_external_scanner_state *self);
void ts_external_scanner_state_init(t_external_scanner_state *, const char *, unsigned);
void ts_language_table_entry(const t_language *, t_state_id, t_symbol, t_table_entry *);
void ts_lexer_advance_to_end(t_lexer *lexer);
void ts_lexer_delete(t_lexer *lexer);
void ts_lexer_finish(t_lexer *lexer, uint32_t *);
void ts_lexer_init(t_lexer *lexer);
void ts_lexer_mark_end(t_lexer *lexer);
void ts_lexer_reset(t_lexer *lexer, t_length);
void ts_lexer_set_input(t_lexer *lexer, t_parse_input);
void ts_lexer_start(t_lexer *lexer);
void ts_range_array_get_changed_ranges(const t_parse_range *old_ranges, unsigned old_range_count, const t_parse_range *new_ranges, unsigned new_range_count, t_range_array *differences);
void ts_stack_clear(t_stack *);
void ts_stack_delete(t_stack *);
void ts_stack_halt(t_stack *, t_stack_version);
void ts_stack_pause(t_stack *, t_stack_version, t_subtree);
void ts_stack_push(t_stack *, t_stack_version, t_subtree, bool, t_state_id);
void ts_stack_record_summary(t_stack *, t_stack_version, unsigned max_depth);
void ts_stack_remove_version(t_stack *, t_stack_version);
void ts_stack_renumber_version(t_stack *, t_stack_version, t_stack_version);
void ts_stack_set_last_external_token(t_stack *, t_stack_version, t_subtree);
void ts_stack_swap_versions(t_stack *, t_stack_version, t_stack_version);
void ts_subtree_array_clear(t_subtree_pool *, t_subtree_array *);
void ts_subtree_array_copy(t_subtree_array, t_subtree_array *);
void ts_subtree_array_delete(t_subtree_pool *, t_subtree_array *);
void ts_subtree_array_remove_trailing_extras(t_subtree_array *, t_subtree_array *);
void ts_subtree_array_reverse(t_subtree_array *);
void ts_subtree_balance(t_subtree, t_subtree_pool *, const t_language *);
void ts_subtree_pool_delete(t_subtree_pool *);
void ts_subtree_release(t_subtree_pool *, t_subtree);
void ts_subtree_retain(t_subtree);
void ts_subtree_set_symbol(t_mutable_subtree *, t_symbol, const t_language *);
void ts_subtree_summarize(t_mutable_subtree, const t_subtree *, uint32_t, const t_language *);
void ts_subtree_summarize_children(t_mutable_subtree, const t_language *);
void ts_tree_cursor_current_status(const t_tree_cursor *, t_field_id *, bool *, bool *, bool *, t_symbol *, unsigned *);
void ts_tree_cursor_init(t_tree_cursor *, t_parse_node);
#endif // FUNCS_H