summaryrefslogtreecommitdiff
path: root/21sh/autotools/src/ast
diff options
context:
space:
mode:
Diffstat (limited to '21sh/autotools/src/ast')
-rw-r--r--21sh/autotools/src/ast/Makefile.am6
-rw-r--r--21sh/autotools/src/ast/ast.c11
-rw-r--r--21sh/autotools/src/ast/ast.h6
3 files changed, 23 insertions, 0 deletions
diff --git a/21sh/autotools/src/ast/Makefile.am b/21sh/autotools/src/ast/Makefile.am
new file mode 100644
index 0000000..d455958
--- /dev/null
+++ b/21sh/autotools/src/ast/Makefile.am
@@ -0,0 +1,6 @@
+lib_LIBRARIES = libast.a
+
+libast_a_SOURCES = ast.c ast.h
+libast_a_CPPFLAGS = -I$(top_srcdir)/src
+libast_a_CFLAGS = -std=c99 -Werror -Wall -Wextra -Wvla -pedantic
+noinst_LIBRARIES = libast.a
diff --git a/21sh/autotools/src/ast/ast.c b/21sh/autotools/src/ast/ast.c
new file mode 100644
index 0000000..084dbf9
--- /dev/null
+++ b/21sh/autotools/src/ast/ast.c
@@ -0,0 +1,11 @@
+#include "ast.h"
+
+#include <stdio.h>
+
+#include "parser/parser.h"
+
+void print_ast()
+{
+ printf("ast !!!\n");
+ print_parser();
+}
diff --git a/21sh/autotools/src/ast/ast.h b/21sh/autotools/src/ast/ast.h
new file mode 100644
index 0000000..83d52b3
--- /dev/null
+++ b/21sh/autotools/src/ast/ast.h
@@ -0,0 +1,6 @@
+#ifndef AST_H
+#define AST_H
+
+void print_ast();
+
+#endif /* ! AST_H */