fix: now compling with flag
This commit is contained in:
parent
8bc92d6ac9
commit
d43ec1b814
3 changed files with 8 additions and 11 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/09/26 17:59:23 by maiboyer #+# #+# */
|
/* Created: 2024/09/26 17:59:23 by maiboyer #+# #+# */
|
||||||
/* Updated: 2024/09/29 13:08:58 by rparodi ### ########.fr */
|
/* Updated: 2024/09/29 13:30:06 by rparodi ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -59,7 +59,7 @@ bool is_dollar(char c);
|
||||||
bool is_quote(char c);
|
bool is_quote(char c);
|
||||||
bool is_space(char c);
|
bool is_space(char c);
|
||||||
t_error find_end_string(t_const_str raw, t_usize *start, t_token *output);
|
t_error find_end_string(t_const_str raw, t_usize *start, t_token *output);
|
||||||
t_error start_analyse(t_const_str raw, enum e_token list, t_vec_token *output);
|
t_error start_analyse(t_const_str raw, t_vec_token *output);
|
||||||
t_error tokeniser(t_const_str raw, enum e_token list);
|
t_error tokeniser(t_const_str raw);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/09/27 11:46:45 by rparodi #+# #+# */
|
/* Created: 2024/09/27 11:46:45 by rparodi #+# #+# */
|
||||||
/* Updated: 2024/09/29 13:08:27 by rparodi ### ########.fr */
|
/* Updated: 2024/09/29 13:28:31 by rparodi ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -39,13 +39,10 @@ bool is_quote(char c)
|
||||||
*/
|
*/
|
||||||
t_error find_end_string(t_const_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;
|
|
||||||
|
|
||||||
if (!raw || !output)
|
if (!raw || !output)
|
||||||
return (ERROR);
|
return (ERROR);
|
||||||
if (is_quote(raw[(*start)]))
|
if (is_quote(raw[(*start)]))
|
||||||
{
|
{
|
||||||
tmp = raw[(*start)];
|
|
||||||
string_push_char(&output->string, raw[(*start)]);
|
string_push_char(&output->string, raw[(*start)]);
|
||||||
(*start)++;
|
(*start)++;
|
||||||
if (raw[(*start)] == '\0')
|
if (raw[(*start)] == '\0')
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/09/25 16:27:03 by rparodi #+# #+# */
|
/* Created: 2024/09/25 16:27:03 by rparodi #+# #+# */
|
||||||
/* Updated: 2024/09/29 13:10:20 by rparodi ### ########.fr */
|
/* Updated: 2024/09/29 13:29:54 by rparodi ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -31,7 +31,7 @@ bool me_isspace(char c)
|
||||||
// MAIX: tu peux faire un token par character "whitespace", vu qu'on va
|
// MAIX: tu peux faire un token par character "whitespace", vu qu'on va
|
||||||
// manipuler la list de token apres pour faire des truc plus simple a process
|
// manipuler la list de token apres pour faire des truc plus simple a process
|
||||||
// on se debrouillera pour plus avoir plein de token whitespace :)
|
// on se debrouillera pour plus avoir plein de token whitespace :)
|
||||||
t_error start_analyse(t_const_str raw, enum e_token list, t_vec_token *output)
|
t_error start_analyse(t_const_str raw, t_vec_token *output)
|
||||||
{
|
{
|
||||||
t_usize i;
|
t_usize i;
|
||||||
t_token token;
|
t_token token;
|
||||||
|
|
@ -56,13 +56,13 @@ t_error start_analyse(t_const_str raw, enum e_token list, t_vec_token *output)
|
||||||
// MAIX: attention tu ne fais rien avec le vec_token ici :D
|
// MAIX: attention tu ne fais rien avec le vec_token ici :D
|
||||||
// aussi l'argument list est censer faire quoi ?
|
// aussi l'argument list est censer faire quoi ?
|
||||||
// c'est un reste d'une version ancienne ?
|
// c'est un reste d'une version ancienne ?
|
||||||
t_error tokeniser(t_const_str raw, enum e_token list)
|
t_error tokeniser(t_const_str raw)
|
||||||
{
|
{
|
||||||
t_vec_token output;
|
t_vec_token output;
|
||||||
|
|
||||||
if (!raw)
|
if (!raw)
|
||||||
return (ERROR);
|
return (ERROR);
|
||||||
output = vec_token_new(16, NULL);
|
output = vec_token_new(16, NULL);
|
||||||
start_analyse(raw, list, &output);
|
start_analyse(raw, &output);
|
||||||
return (NO_ERROR);
|
return (NO_ERROR);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue