style: normed all the stuff
This commit is contained in:
parent
3ee9c00d5a
commit
df8c6fc091
3 changed files with 11 additions and 12 deletions
|
|
@ -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/28 11:50:00 by rparodi ### ########.fr */
|
/* Updated: 2024/09/28 14:49:11 by rparodi ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -39,10 +39,13 @@ bool is_quote(char c)
|
||||||
*/
|
*/
|
||||||
t_error find_end_string(t_str raw, t_usize *start, t_token *output)
|
t_error find_end_string(t_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,28 +6,22 @@
|
||||||
/* 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/28 14:48:31 by maiboyer ### ########.fr */
|
/* Updated: 2024/09/28 15:27:28 by rparodi ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
#include "parser/token.h"
|
#include "parser/token.h"
|
||||||
#include "me/string/string.h"
|
#include "me/string/string.h"
|
||||||
#include "me/types.h"
|
#include "me/types.h"
|
||||||
|
#include "me/char/char.h"
|
||||||
#include "me/vec/vec_token.h"
|
#include "me/vec/vec_token.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include "me/mem/mem.h"
|
#include "me/mem/mem.h"
|
||||||
|
|
||||||
|
|
||||||
// MAIX: attention les whitespace peuvent aussi etre des tab. de memoire il y a
|
// MAIX: attention les whitespace peuvent aussi etre des tab. de memoire il y a
|
||||||
// une fonction "me_isspace" qui check ce qu'on veut dans "me/char/char.h"
|
// une fonction "me_isspace" qui check ce qu'on veut dans "me/char/char.h"
|
||||||
/**
|
bool me_isspace(char c)
|
||||||
* @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 == ' ')
|
if (c == ' ')
|
||||||
return (true);
|
return (true);
|
||||||
|
|
@ -42,6 +36,8 @@ t_error start_analyse(t_const_str raw, enum e_token list, t_vec_token *output)
|
||||||
t_usize i;
|
t_usize i;
|
||||||
t_token token;
|
t_token token;
|
||||||
|
|
||||||
|
if (!raw || !output)
|
||||||
|
return (ERROR);
|
||||||
i = 0;
|
i = 0;
|
||||||
while (raw[i] != '\0')
|
while (raw[i] != '\0')
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/09/28 14:37:13 by maiboyer #+# #+# */
|
/* Created: 2024/09/28 14:37:13 by maiboyer #+# #+# */
|
||||||
/* Updated: 2024/09/28 14:57:17 by maiboyer ### ########.fr */
|
/* Updated: 2024/09/28 15:24:06 by rparodi ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue