-
Notifications
You must be signed in to change notification settings - Fork 0
Lexer
Josias kasongo edited this page Jul 11, 2022
·
5 revisions
typedef struct s_lex_token {
t_lex_type type;
char *value;
t_redirection_type r_type;
int fd;
} t_lex_token;
Currently available types::
e_lex_literal,
e_lex_pipe,
e_lex_keyword,
e_lex_redirection,
e_lex_quote_error,
e_lex_redirection_error,
e_lex_pipe_error,
Quote error, are no more made by my actual code but in a normal shell we need them.
In the child process of the heredoc, a Lexer is also used but without considering redirects or pipes. (everything is read as text_token) there is just a replacement for quotes and variables