style: noming the /sources folder
This commit is contained in:
parent
0862cd35c4
commit
9608c84a84
2 changed files with 20 additions and 17 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/03/28 14:40:38 by rparodi #+# #+# */
|
/* Created: 2024/03/28 14:40:38 by rparodi #+# #+# */
|
||||||
/* Updated: 2024/09/19 17:28:35 by maiboyer ### ########.fr */
|
/* Updated: 2024/09/19 23:44:20 by rparodi ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -43,7 +43,8 @@ void ft_take_args(t_state *state);
|
||||||
t_language *tree_sitter_sh(void);
|
t_language *tree_sitter_sh(void);
|
||||||
void ast_free(t_ast_node node);
|
void ast_free(t_ast_node node);
|
||||||
|
|
||||||
t_error split_str_first(t_const_str s, char splitter, t_str *before, t_str *after)
|
t_error split_str_first(\
|
||||||
|
t_const_str s, char splitter, t_str *before, t_str *after)
|
||||||
{
|
{
|
||||||
t_usize i;
|
t_usize i;
|
||||||
|
|
||||||
|
|
@ -90,7 +91,8 @@ void print_node_data(t_node *t, t_usize depth)
|
||||||
idx = 0;
|
idx = 0;
|
||||||
if (t->kind == 7)
|
if (t->kind == 7)
|
||||||
return;
|
return;
|
||||||
printf("\x1b[%im[%-6s](%lu)\x1b[0m", t->field_str == NULL ? 90 : 32, t->field_str == NULL ? "nil" : t->field_str, t->field);
|
printf("\x1b[%im[%-6s](%lu)\x1b[0m", t->field_str == NULL ? \
|
||||||
|
90 : 32, t->field_str == NULL ? "nil" : t->field_str, t->field);
|
||||||
while (idx++ < depth + 1)
|
while (idx++ < depth + 1)
|
||||||
printf("\t");
|
printf("\t");
|
||||||
idx = 0;
|
idx = 0;
|
||||||
|
|
@ -106,7 +108,8 @@ void parse_str(t_state *state)
|
||||||
t_node node;
|
t_node node;
|
||||||
t_ast_node out;
|
t_ast_node out;
|
||||||
|
|
||||||
tree = ts_parser_parse_string(state->parser, state->str_input, str_len(state->str_input));
|
tree = ts_parser_parse_string(\
|
||||||
|
state->parser, state->str_input, str_len(state->str_input));
|
||||||
node = ts_tree_root_node(tree);
|
node = ts_tree_root_node(tree);
|
||||||
if (ast_from_node(node, state->str_input, &out))
|
if (ast_from_node(node, state->str_input, &out))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/05/02 13:22:14 by maiboyer #+# #+# */
|
/* Created: 2024/05/02 13:22:14 by maiboyer #+# #+# */
|
||||||
/* Updated: 2024/09/13 15:29:25 by maiboyer ### ########.fr */
|
/* Updated: 2024/09/19 23:44:41 by rparodi ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue