Pushed
This commit is contained in:
parent
fecf204227
commit
dc3f8cfba9
4 changed files with 71 additions and 19 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/06/11 14:23:40 by maiboyer #+# #+# */
|
||||
/* Updated: 2024/06/20 18:22:03 by maiboyer ### ########.fr */
|
||||
/* Updated: 2024/07/01 21:36:48 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -43,6 +43,7 @@ enum e_ast_node_kind
|
|||
AST_VARIABLE_ASSIGNMENT = S_AST_NONE | 0x000E,
|
||||
AST_EXTGLOB = S_AST_NONE | 0x001A,
|
||||
AST_REGEX = S_AST_NONE | 0x001B,
|
||||
AST_NUMBER = S_AST_NONE | 0x001C,
|
||||
|
||||
AST_FILE_REDIRECTION = S_AST_REDIRECT | 0x000F,
|
||||
AST_HEREDOC_REDIRECTION = S_AST_REDIRECT | 0x0010,
|
||||
|
|
@ -62,32 +63,33 @@ enum e_ast_node_kind
|
|||
|
||||
union u_ast_node_data {
|
||||
t_ast_arithmetic_expansion arithmetic_expansion;
|
||||
t_ast_case_item case_item;
|
||||
t_ast_case case_;
|
||||
t_ast_command_substitution command_substitution;
|
||||
t_ast_case_item case_item;
|
||||
t_ast_command command;
|
||||
t_ast_command_substitution command_substitution;
|
||||
t_ast_compound_statement compound_statement;
|
||||
t_ast_elif elif;
|
||||
t_ast_else else_;
|
||||
t_ast_empty empty;
|
||||
t_ast_expansion expansion;
|
||||
t_ast_extglob extglob;
|
||||
t_ast_file_redirection file_redirection;
|
||||
t_ast_for for_;
|
||||
t_ast_function_definition function_definition;
|
||||
t_ast_heredoc_redirection heredoc_redirection;
|
||||
t_ast_if if_;
|
||||
t_ast_list list;
|
||||
t_ast_number number;
|
||||
t_ast_pipeline pipeline;
|
||||
t_ast_program program;
|
||||
t_ast_raw_string raw_string;
|
||||
t_ast_regex regex;
|
||||
t_ast_string string;
|
||||
t_ast_subshell subshell;
|
||||
t_ast_until until;
|
||||
t_ast_variable_assignment variable_assignment;
|
||||
t_ast_while while_;
|
||||
t_ast_word word;
|
||||
t_ast_extglob extglob;
|
||||
t_ast_regex regex;
|
||||
};
|
||||
|
||||
struct s_ast_node
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/06/11 14:24:24 by maiboyer #+# #+# */
|
||||
/* Updated: 2024/06/20 14:22:36 by maiboyer ### ########.fr */
|
||||
/* Updated: 2024/07/01 21:35:22 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -25,10 +25,10 @@ typedef union u_ast_node_data t_ast_node_data;
|
|||
typedef struct s_ast_node *t_ast_node;
|
||||
|
||||
typedef struct s_ast_arithmetic_expansion t_ast_arithmetic_expansion;
|
||||
typedef struct s_ast_case_item t_ast_case_item;
|
||||
typedef struct s_ast_case t_ast_case;
|
||||
typedef struct s_ast_command_substitution t_ast_command_substitution;
|
||||
typedef struct s_ast_case_item t_ast_case_item;
|
||||
typedef struct s_ast_command t_ast_command;
|
||||
typedef struct s_ast_command_substitution t_ast_command_substitution;
|
||||
typedef struct s_ast_compound_statement t_ast_compound_statement;
|
||||
typedef struct s_ast_elif t_ast_elif;
|
||||
typedef struct s_ast_else t_ast_else;
|
||||
|
|
@ -41,16 +41,17 @@ typedef struct s_ast_function_definition t_ast_function_definition;
|
|||
typedef struct s_ast_heredoc_redirection t_ast_heredoc_redirection;
|
||||
typedef struct s_ast_if t_ast_if;
|
||||
typedef struct s_ast_list t_ast_list;
|
||||
typedef struct s_ast_number t_ast_number;
|
||||
typedef struct s_ast_pipeline t_ast_pipeline;
|
||||
typedef struct s_ast_program t_ast_program;
|
||||
typedef struct s_ast_raw_string t_ast_raw_string;
|
||||
typedef struct s_ast_regex t_ast_regex;
|
||||
typedef struct s_ast_string t_ast_string;
|
||||
typedef struct s_ast_subshell t_ast_subshell;
|
||||
typedef struct s_ast_until t_ast_until;
|
||||
typedef struct s_ast_variable_assignment t_ast_variable_assignment;
|
||||
typedef struct s_ast_while t_ast_while;
|
||||
typedef struct s_ast_word t_ast_word;
|
||||
typedef struct s_ast_regex t_ast_regex;
|
||||
|
||||
/*
|
||||
t_ast_arithmetic_expansion arithmetic_expansion;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/06/14 17:46:58 by maiboyer #+# #+# */
|
||||
/* Updated: 2024/06/29 14:44:04 by maiboyer ### ########.fr */
|
||||
/* Updated: 2024/07/01 21:34:57 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -322,7 +322,7 @@ struct s_ast_file_redirection
|
|||
{
|
||||
t_ast_node output;
|
||||
t_ast_redirection_kind op;
|
||||
t_str input;
|
||||
t_ast_node input;
|
||||
};
|
||||
|
||||
/// File Redirection
|
||||
|
|
@ -396,4 +396,13 @@ struct s_ast_regex
|
|||
t_str pattern;
|
||||
};
|
||||
|
||||
/// Regex
|
||||
/// ```shell
|
||||
/// ~pattern
|
||||
/// ```
|
||||
struct s_ast_number
|
||||
{
|
||||
t_i64 number;
|
||||
};
|
||||
|
||||
#endif /* AST_RAW_STRUCTS_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue