feat: toujours les mêmes qui font les pipes. Plus de assert dans ASTs (pour des raisons évidentes de stabilité du code) et nouveaux types (AST_PIPE et AST_NEG), + modifs random dans le parser
This commit is contained in:
parent
07e7d83c60
commit
96626d9850
27 changed files with 238 additions and 86 deletions
17
src/utils/ast/ast_neg.h
Normal file
17
src/utils/ast/ast_neg.h
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#ifndef AST_NEG_H
|
||||
#define AST_NEG_H
|
||||
|
||||
#include "ast_base.h"
|
||||
|
||||
struct ast_neg
|
||||
{
|
||||
bool negation; // True negates the child's output
|
||||
struct ast* child;
|
||||
};
|
||||
|
||||
bool ast_is_neg(struct ast *node);
|
||||
struct ast_neg *ast_get_neg(struct ast *node);
|
||||
struct ast *ast_create_neg(bool negation, struct ast* child);
|
||||
void ast_free_neg(struct ast_neg* node);
|
||||
|
||||
#endif /* ! AST_NEG_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue