From fe8734ea38fc5da9fdb78ea79b91846fe39e3937 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl?= Date: Sat, 28 Sep 2024 12:19:55 +0200 Subject: [PATCH] docs: doxygen for all function in the token --- parser/src/dollar.c | 8 +++++++- parser/src/quotes.c | 16 +++++++++++++++- parser/src/token.c | 9 ++++++++- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/parser/src/dollar.c b/parser/src/dollar.c index 7eff09b6..0c3ee5a6 100644 --- a/parser/src/dollar.c +++ b/parser/src/dollar.c @@ -6,7 +6,7 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/09/27 22:18:46 by rparodi #+# #+# */ -/* Updated: 2024/09/27 22:20:40 by rparodi ### ########.fr */ +/* Updated: 2024/09/28 11:47:09 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,6 +16,12 @@ #include "me/types.h" #include +/** + * @brief boolean function that's say if it's a dollar or not + * + * @param c character will be checked + * @return true if it's dollar, if not return false + */ bool is_dollar(char c) { if (c == '$') diff --git a/parser/src/quotes.c b/parser/src/quotes.c index 59f40f19..cb4b9464 100644 --- a/parser/src/quotes.c +++ b/parser/src/quotes.c @@ -6,7 +6,7 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/09/27 11:46:45 by rparodi #+# #+# */ -/* Updated: 2024/09/27 22:40:57 by rparodi ### ########.fr */ +/* Updated: 2024/09/28 11:50:00 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,6 +16,12 @@ #include "me/types.h" #include +/** + * @brief boolean function that's say if it's a quote or not + * + * @param c character will be checked + * @return true if it's quote, if not return false + */ bool is_quote(char c) { if (c == '"' || c == '\'') @@ -23,6 +29,14 @@ bool is_quote(char c) return (false); } +/** + * @brief token function that's read the string and return the tokens + * + * @param raw the input from stdin + * @param start the index where the first quote was found + * @param output the token of the string + * @return Check if there is an error on this function + */ t_error find_end_string(t_str raw, t_usize *start, t_token *output) { if (!raw || !output) diff --git a/parser/src/token.c b/parser/src/token.c index 83feaf38..b94d6f18 100644 --- a/parser/src/token.c +++ b/parser/src/token.c @@ -6,7 +6,7 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/09/25 16:27:03 by rparodi #+# #+# */ -/* Updated: 2024/09/27 22:29:04 by rparodi ### ########.fr */ +/* Updated: 2024/09/28 12:16:45 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ @@ -16,7 +16,14 @@ #include "me/vec/vec_token.h" #include #include +#include "me/mem/mem.h" +/** + * @brief boolean function that's say if it's a space or not + * + * @param c character will be checked + * @return true if it's space, if not return false + */ bool is_space(char c) { if (c == ' ')