From f553597acdcc138b39ec745b746279e592ced04a Mon Sep 17 00:00:00 2001 From: Lukas Jiriste Date: Sun, 21 Jul 2024 18:19:51 +0200 Subject: [PATCH] Add is_token_type function --- src/execution.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/execution.c b/src/execution.c index 004da7d..0ba69df 100644 --- a/src/execution.c +++ b/src/execution.c @@ -6,7 +6,7 @@ /* By: ljiriste +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/07/21 08:57:54 by ljiriste #+# #+# */ -/* Updated: 2024/07/21 17:41:29 by ljiriste ### ########.fr */ +/* Updated: 2024/07/21 18:18:45 by ljiriste ### ########.fr */ /* */ /* ************************************************************************** */ @@ -30,6 +30,11 @@ int cmp_var_name(const char *a, const char *b) return (ft_strncmp(a, b, namelen)); } +int is_token_type(const t_parse_tree_node *node, const char *type) +{ + return (!ft_strcmp(node->token.type, type)); +} + void clear_old(t_vec *assignments, const char *new) { size_t i; -- 2.30.2