aboutsummaryrefslogtreecommitdiff
path: root/src/parse
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-03-31 21:41:33 +0200
committerCharles <sircharlesaze@gmail.com>2020-03-31 21:41:33 +0200
commitb15ab562d74b5111ac7c9bd6e0ec185435902472 (patch)
tree664a55a24d7e36a5f56bf1ce7b0ea96751e0cda0 /src/parse
parent808d1499f5708ad4eda3612416e62efe6fdff021 (diff)
downloadminishell-b15ab562d74b5111ac7c9bd6e0ec185435902472.tar.gz
minishell-b15ab562d74b5111ac7c9bd6e0ec185435902472.tar.bz2
minishell-b15ab562d74b5111ac7c9bd6e0ec185435902472.zip
Removing ms_ prefix, Removing junk
Diffstat (limited to 'src/parse')
-rw-r--r--src/parse/ast.c63
-rw-r--r--src/parse/lexer.c2
-rw-r--r--src/parse/parse.c6
3 files changed, 4 insertions, 67 deletions
diff --git a/src/parse/ast.c b/src/parse/ast.c
deleted file mode 100644
index 44a36cd..0000000
--- a/src/parse/ast.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
-** \file ast.c
-** \brief AST manipulation
-*/
-
-#include "ms_parse.h"
-
-/**
-** \brief Create a new AST node with default values
-** \param tag Tag of the node
-** \return The allocated node
-*/
-
-/* t_ast *ms_ast_new(t_ast_tag tag) */
-/* { */
-/* t_ast *ast; */
-/* */
-/* if ((ast = (t_ast*)malloc(sizeof(t_ast))) == NULL) */
-/* return (NULL); */
-/* ast->tag = tag; */
-/* ast->content = NULL; */
-/* ast->children_num = 0; */
-/* ast->children = NULL; */
-/* return (ast); */
-/* } */
-
-/**
-** \brief Destroy an allocated AST
-** \warning Assumes that `content`, `children` and the node itself have been malloc'd
-** \param ast AST to destroy
-*/
-
-/* void ms_ast_destroy(t_ast *ast) */
-/* { */
-/* int i; */
-/* */
-/* if (ast == NULL) */
-/* return ; */
-/* i = -1; */
-/* while (++i < ast->children_num) */
-/* ms_ast_destroy(ast->children[i]); */
-/* free(ast->children); */
-/* free(ast->content); */
-/* free(ast); */
-/* } */
-
-/**
-** \brief Iterate over an AST node's childs
-** \param f Function applied to each child, take `arg` has his first argument.
-** \param arg Pointer that will be passed to `f`, to keep information between iterations
-*/
-
-/* void ms_ast_iter( */
-/* t_ast *ast, */
-/* void (*f)(void *f_arg, t_ast *children), */
-/* void *arg) */
-/* { */
-/* int i; */
-/* */
-/* i = -1; */
-/* while (++i < ast->children_num) */
-/* f(arg, ast->children[i]); */
-/* } */
diff --git a/src/parse/lexer.c b/src/parse/lexer.c
index d8f1254..57ecdf7 100644
--- a/src/parse/lexer.c
+++ b/src/parse/lexer.c
@@ -5,7 +5,7 @@
#include "minishell.h"
-char **ms_lexer(char *input)
+char **lexer(char *input)
{
char **out_lex;
diff --git a/src/parse/parse.c b/src/parse/parse.c
index 41b82c2..c99f0fe 100644
--- a/src/parse/parse.c
+++ b/src/parse/parse.c
@@ -3,12 +3,12 @@
** \brief Parser
*/
-#include "minishell.h"
+#include "parse.h"
-t_ast *ms_parse(char *input)
+t_ast *parse(char *input)
{
/* char **out_lex; */
-/* if (!(out_lex = ms_lexer(input))) */
+/* if (!(out_lex = lexer(input))) */
/* return (NULL); */
(void)input;