feat: starting the analyse
This commit is contained in:
parent
df8c6fc091
commit
8bc92d6ac9
4 changed files with 14 additions and 7 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/09/27 11:46:45 by rparodi #+# #+# */
|
||||
/* Updated: 2024/09/28 14:49:11 by rparodi ### ########.fr */
|
||||
/* Updated: 2024/09/29 13:08:27 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ bool is_quote(char c)
|
|||
* @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)
|
||||
t_error find_end_string(t_const_str raw, t_usize *start, t_token *output)
|
||||
{
|
||||
char tmp;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/09/25 16:27:03 by rparodi #+# #+# */
|
||||
/* Updated: 2024/09/28 15:27:28 by rparodi ### ########.fr */
|
||||
/* Updated: 2024/09/29 13:10:20 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -41,8 +41,13 @@ t_error start_analyse(t_const_str raw, enum e_token list, t_vec_token *output)
|
|||
i = 0;
|
||||
while (raw[i] != '\0')
|
||||
{
|
||||
if (is_space(raw[i]))
|
||||
if (me_isspace(raw[i]))
|
||||
token = token_new(WHITESPACE);
|
||||
if (is_quote(raw[i]))
|
||||
find_end_string(raw, &i, &token);
|
||||
if (is_dollar(raw[i]))
|
||||
token = token_new(DOLLAR);
|
||||
vec_token_push(output, token);
|
||||
i++;
|
||||
}
|
||||
return (NO_ERROR);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue