splitted more stuff
This commit is contained in:
parent
749fdf627f
commit
009be4a4b4
28 changed files with 1595 additions and 1287 deletions
35
parser/src/stack/stack_funcs4.c
Normal file
35
parser/src/stack/stack_funcs4.c
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* stack_funcs4.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/08/31 16:58:39 by maiboyer #+# #+# */
|
||||
/* Updated: 2024/08/31 16:58:51 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "parser/stack.h"
|
||||
#include "parser/_inner/stack.h"
|
||||
|
||||
t_u32 ts_stack_version_count(const t_stack *self)
|
||||
{
|
||||
return (self->heads.size);
|
||||
}
|
||||
|
||||
TSStateId ts_stack_state(const t_stack *self, t_stack_version version)
|
||||
{
|
||||
return (array_get(&self->heads, version)->node->state);
|
||||
}
|
||||
|
||||
Length ts_stack_position(const t_stack *self, t_stack_version version)
|
||||
{
|
||||
return (array_get(&self->heads, version)->node->position);
|
||||
}
|
||||
|
||||
Subtree ts_stack_last_external_token(const t_stack *self,
|
||||
t_stack_version version)
|
||||
{
|
||||
return (array_get(&self->heads, version)->last_external_token);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue