Normed parser/src/node.c into multiple files

This commit is contained in:
Maieul BOYER 2024-08-31 17:30:30 +00:00
parent 009be4a4b4
commit 36d9d411ba
10 changed files with 242 additions and 165 deletions

View file

@ -6,7 +6,7 @@
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/31 17:10:57 by maiboyer #+# #+# */
/* Updated: 2024/08/31 17:11:24 by maiboyer ### ########.fr */
/* Updated: 2024/08/31 17:24:15 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
@ -14,14 +14,16 @@
#include "parser/length.h"
#include "parser/subtree.h"
TSNode ts_node_new(const TSTree *tree, const Subtree *subtree, Length position, TSSymbol alias)
TSNode ts_node_new(const TSTree *tree, const Subtree *subtree, \
Length position, TSSymbol alias)
{
return (TSNode){
position.bytes, position.extent.row, position.extent.column, alias, subtree, tree,
};
return ((TSNode){
position.bytes, position.extent.row, position.extent.column, \
alias, subtree, tree,
});
}
TSNode ts_node__null(void)
TSNode ts_node__null(void)
{
return ts_node_new(NULL, NULL, length_zero(), 0);
return (ts_node_new(NULL, NULL, length_zero(), 0));
}