Removed some useless stuff and made some changes

This commit is contained in:
Maieul BOYER 2024-08-31 12:18:38 +00:00
parent acb734cda0
commit e91a509d4c
17 changed files with 216 additions and 92 deletions

View file

@ -6,7 +6,7 @@
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/22 13:54:54 by maiboyer #+# #+# */
/* Updated: 2024/08/30 19:46:23 by maiboyer ### ########.fr */
/* Updated: 2024/08/31 12:10:39 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
@ -86,7 +86,6 @@ typedef struct TSInput
{
void *payload;
const t_u8 *(*read)(void *payload, t_u32 byte_index, TSPoint position, t_u32 *bytes_read);
TSInputEncoding encoding;
} TSInput;
typedef enum TSLogType

View file

@ -1,3 +1,15 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* array.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/31 12:03:22 by maiboyer #+# #+# */
/* Updated: 2024/08/31 12:03:29 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef TREE_SITTER_ARRAY_H_
#define TREE_SITTER_ARRAY_H_

View file

@ -1,3 +1,15 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* input.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/31 12:03:19 by maiboyer #+# #+# */
/* Updated: 2024/08/31 12:03:29 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef INPUT_H
#define INPUT_H

View file

@ -1,3 +1,15 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* language.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/31 12:03:18 by maiboyer #+# #+# */
/* Updated: 2024/08/31 12:03:29 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef LANGUAGE_H
#define LANGUAGE_H

View file

@ -1,3 +1,15 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* length.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/31 12:03:16 by maiboyer #+# #+# */
/* Updated: 2024/08/31 12:03:29 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef LENGTH_H
#define LENGTH_H

View file

@ -1,3 +1,15 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* lexer.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/31 12:03:15 by maiboyer #+# #+# */
/* Updated: 2024/08/31 12:03:29 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef LEXER_H
#define LEXER_H

View file

@ -1,3 +1,15 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* parser.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/31 12:03:13 by maiboyer #+# #+# */
/* Updated: 2024/08/31 12:03:29 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef PARSER_H
#define PARSER_H

View file

@ -1,3 +1,15 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* point.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/31 12:03:10 by maiboyer #+# #+# */
/* Updated: 2024/08/31 12:03:29 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef POINT_H
#define POINT_H

View file

@ -1,3 +1,15 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* reduce_action.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/31 12:03:09 by maiboyer #+# #+# */
/* Updated: 2024/08/31 12:03:29 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef REDUCE_ACTION_H
#define REDUCE_ACTION_H

View file

@ -1,3 +1,15 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* stack.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/31 12:03:07 by maiboyer #+# #+# */
/* Updated: 2024/08/31 12:03:08 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef PARSE_STACK_H
#define PARSE_STACK_H

View file

@ -1,3 +1,15 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* subtree.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/31 12:03:06 by maiboyer #+# #+# */
/* Updated: 2024/08/31 12:03:06 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef SUBTREE_H
#define SUBTREE_H

View file

@ -1,10 +1,20 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* tree.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/08/31 12:03:04 by maiboyer #+# #+# */
/* Updated: 2024/08/31 12:04:05 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef TREE_H
#define TREE_H
#include "parser/subtree.h"
#include "me/types.h"
#include "parser/subtree.h"
typedef struct ParentCacheEntry ParentCacheEntry;
@ -12,8 +22,6 @@ struct TSTree
{
Subtree root;
const TSLanguage *language;
TSRange *included_ranges;
t_u32 included_range_count;
};
struct ParentCacheEntry
@ -24,7 +32,7 @@ struct ParentCacheEntry
TSSymbol alias_symbol;
};
TSTree *ts_tree_new(Subtree root, const TSLanguage *language, const TSRange *, t_u32);
TSTree *ts_tree_new(Subtree root, const TSLanguage *language);
TSNode ts_node_new(const TSTree *, const Subtree *, Length, TSSymbol);
#endif // TREE_H