From f8fca53ae681cd673fc3f469929df4e160da665d Mon Sep 17 00:00:00 2001 From: Maieul BOYER Date: Tue, 3 Sep 2024 14:18:30 +0200 Subject: [PATCH] Now it worksTM --- parser/src/subtree/subtree_new.c | 10 +++++----- stdme/src/mem/allocator.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/parser/src/subtree/subtree_new.c b/parser/src/subtree/subtree_new.c index 74a77751..607c795f 100644 --- a/parser/src/subtree/subtree_new.c +++ b/parser/src/subtree/subtree_new.c @@ -6,7 +6,7 @@ /* 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_u32 production_id, const TSLanguage *language) { - TSSymbolMetadata metadata; - bool fragile; - t_subtree data; + TSSymbolMetadata metadata; + bool fragile; + t_subtree data; metadata = ts_language_symbol_metadata(language, symbol); fragile = symbol == ts_builtin_sym_error || symbol == ts_builtin_sym_error_repeat; vec_subtree_reserve(children, ts_subtree_alloc_size(children->len) / 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 = \ children->len, .visible = metadata.visible, .named = metadata.named, \ .has_changes = false, .has_external_scanner_state_change = false, \ diff --git a/stdme/src/mem/allocator.c b/stdme/src/mem/allocator.c index 3eb26e8e..544822e4 100644 --- a/stdme/src/mem/allocator.c +++ b/stdme/src/mem/allocator.c @@ -6,7 +6,7 @@ /* 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 */ /* */ /* ************************************************************************** */