update: normed more stuff
This commit is contained in:
parent
74937f457f
commit
d42f9ae49f
8 changed files with 349 additions and 230 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/09/02 20:01:50 by maiboyer #+# #+# */
|
||||
/* Updated: 2024/09/06 17:00:26 by maiboyer ### ########.fr */
|
||||
/* Updated: 2024/09/14 14:30:56 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -76,4 +76,42 @@ struct s_subtree_data
|
|||
// The fundamental building block of a syntax tree.
|
||||
typedef t_subtree_data *t_subtree;
|
||||
|
||||
typedef struct s_subtree_new_leaf_args t_st_newleaf_args;
|
||||
typedef struct s_subtree_new_error_args t_st_newerr_args;
|
||||
|
||||
struct s_subtree_new_leaf_args
|
||||
{
|
||||
TSSymbol symbol;
|
||||
Length padding;
|
||||
Length size;
|
||||
t_u32 lookahead_bytes;
|
||||
TSStateId parse_state;
|
||||
bool has_external_tokens;
|
||||
bool depends_on_column;
|
||||
bool is_keyword;
|
||||
const TSLanguage *language;
|
||||
};
|
||||
|
||||
struct s_subtree_new_error_args
|
||||
{
|
||||
t_i32 lookahead_char;
|
||||
Length padding;
|
||||
Length size;
|
||||
t_u32 bytes_scanned;
|
||||
TSStateId parse_state;
|
||||
const TSLanguage *language;
|
||||
};
|
||||
|
||||
struct s_summarize_state
|
||||
{
|
||||
t_u32 structural_index;
|
||||
const TSSymbol *alias_sequence;
|
||||
t_u32 lookahead_end_byte;
|
||||
t_subtree *children;
|
||||
t_subtree child;
|
||||
t_u32 child_lookahead_end_byte;
|
||||
t_u32 grandchild_count;
|
||||
t_usize i;
|
||||
};
|
||||
|
||||
#endif /* SUBTREE_INNER_H */
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/08/31 12:03:06 by maiboyer #+# #+# */
|
||||
/* Updated: 2024/09/02 20:25:33 by maiboyer ### ########.fr */
|
||||
/* Updated: 2024/09/14 14:14:46 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -42,8 +42,8 @@ void ts_subtree_array_delete(t_vec_subtree *);
|
|||
void ts_subtree_array_remove_trailing_extras(t_vec_subtree *, t_vec_subtree *);
|
||||
void ts_subtree_array_reverse(t_vec_subtree *);
|
||||
|
||||
t_subtree ts_subtree_new_leaf(TSSymbol, Length, Length, t_u32, TSStateId, bool, bool, bool, const TSLanguage *);
|
||||
t_subtree ts_subtree_new_error(t_i32, Length, Length, t_u32, TSStateId, const TSLanguage *);
|
||||
t_subtree ts_subtree_new_leaf(t_st_newleaf_args args);
|
||||
t_subtree ts_subtree_new_error(t_st_newerr_args args);
|
||||
t_subtree ts_subtree_new_node(TSSymbol, t_vec_subtree *, t_u32, const TSLanguage *);
|
||||
t_subtree ts_subtree_new_error_node(t_vec_subtree *, bool, const TSLanguage *);
|
||||
t_subtree ts_subtree_new_missing_leaf(TSSymbol, Length, t_u32, const TSLanguage *);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue