Now it worksTM

This commit is contained in:
Maieul BOYER 2024-09-03 14:18:30 +02:00
parent 740b46ed73
commit f8fca53ae6
No known key found for this signature in database
2 changed files with 6 additions and 6 deletions

View file

@ -6,7 +6,7 @@
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */ /* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2024/09/02 21:33:35 by maiboyer #+# #+# */ /* Created: 2024/09/02 21:33:35 by maiboyer #+# #+# */
/* Updated: 2024/09/02 21:41:54 by maiboyer ### ########.fr */ /* Updated: 2024/09/03 14:15:44 by maiboyer ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -19,16 +19,16 @@
t_subtree ts_subtree_new_node(TSSymbol symbol, t_vec_subtree *children, t_subtree ts_subtree_new_node(TSSymbol symbol, t_vec_subtree *children,
t_u32 production_id, const TSLanguage *language) t_u32 production_id, const TSLanguage *language)
{ {
TSSymbolMetadata metadata; TSSymbolMetadata metadata;
bool fragile; bool fragile;
t_subtree data; t_subtree data;
metadata = ts_language_symbol_metadata(language, symbol); metadata = ts_language_symbol_metadata(language, symbol);
fragile = symbol == ts_builtin_sym_error fragile = symbol == ts_builtin_sym_error
|| symbol == ts_builtin_sym_error_repeat; || symbol == ts_builtin_sym_error_repeat;
vec_subtree_reserve(children, ts_subtree_alloc_size(children->len) vec_subtree_reserve(children, ts_subtree_alloc_size(children->len)
/ sizeof(t_subtree)); / sizeof(t_subtree));
data = (children->buffer[children->len]); data = (void *)&children->buffer[children->len];
*data = (t_subtree_data){.ref_count = 1, .symbol = symbol, .child_count = \ *data = (t_subtree_data){.ref_count = 1, .symbol = symbol, .child_count = \
children->len, .visible = metadata.visible, .named = metadata.named, \ children->len, .visible = metadata.visible, .named = metadata.named, \
.has_changes = false, .has_external_scanner_state_change = false, \ .has_changes = false, .has_external_scanner_state_change = false, \

View file

@ -6,7 +6,7 @@
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */ /* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/14 18:26:27 by maiboyer #+# #+# */ /* Created: 2024/05/14 18:26:27 by maiboyer #+# #+# */
/* Updated: 2024/09/02 13:40:13 by maiboyer ### ########.fr */ /* Updated: 2024/09/03 14:17:58 by maiboyer ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */