update: fixed expansion stuff
This commit is contained in:
parent
01c8e7cf2c
commit
3287b6a2a7
10 changed files with 133 additions and 16 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/10/02 18:43:41 by maiboyer #+# #+# */
|
||||
/* Updated: 2024/10/04 19:01:40 by rparodi ### ########.fr */
|
||||
/* Updated: 2024/10/05 13:10:56 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -40,8 +40,10 @@ t_error ts_double_lcarret(t_vec_token input, t_vec_token *output);
|
|||
t_error ts_double_pipe(t_vec_token input, t_vec_token *output);
|
||||
t_error ts_double_rcarret(t_vec_token input, t_vec_token *output);
|
||||
t_error ts_double_string_pass(t_vec_token input, t_vec_token *output);
|
||||
t_error ts_fold_no_quote(t_vec_token input, t_vec_token *output);
|
||||
t_error ts_fold_whitespace(t_vec_token input, t_vec_token *output);
|
||||
t_error ts_do_fuck_all(t_vec_token input, t_vec_token *output);
|
||||
t_error ts_fold_expension(t_vec_token input, t_vec_token *output);
|
||||
|
||||
|
||||
#endif /* PASSES_H */
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/09/26 17:59:23 by maiboyer #+# #+# */
|
||||
/* Updated: 2024/10/03 22:30:42 by maiboyer ### ########.fr */
|
||||
/* Updated: 2024/10/05 13:11:34 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -37,6 +37,7 @@ enum e_token
|
|||
TOK_SEMICOLON, // semicolor == ;
|
||||
TOK_SQUOTE, // single quote string
|
||||
TOK_WHITESPACE, // whitespace outside of quoted strings
|
||||
TOK_NALPHANUM, // a non alphanumeric character, used in the expansion folding, then folded back into NQUOTE
|
||||
TOK_WORD, // a meta token, which contains subtokens
|
||||
};
|
||||
|
||||
|
|
@ -53,9 +54,11 @@ t_token token_new_meta(enum e_token type);
|
|||
// This create a "simple" token consisting of a string
|
||||
t_token token_new(enum e_token type);
|
||||
t_token token_new_none(void);
|
||||
void token_free(t_token tok);
|
||||
bool token_is_meta(t_token tok);
|
||||
t_token token_clone(t_token *tok);
|
||||
void token_free(t_token tok);
|
||||
|
||||
bool token_is_meta(t_token tok);
|
||||
bool token_is_noquote(enum e_token tok);
|
||||
|
||||
/* PARSING */
|
||||
t_error tokenize(t_const_str s, t_vec_token *out);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue