From 3bc44f85de340c8da88d74b561b75716162d84d0 Mon Sep 17 00:00:00 2001 From: Johnny Richard Date: Sat, 29 Apr 2023 20:49:51 +0200 Subject: ast: Remove ast visitor pattern to simplify the code I decided to remove the visitor pattern due to the lack of Object Oriented Programming support for C. Now if you want to navigate through the AST, you should do it with switch case and recursion. The code looks way simpler without visitor pattern. I have added a CFLAG -Werror which validates if the switch statement covers all branches for a given enum at compile time. Signed-off-by: Johnny Richard --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ba12408..d416dfc 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ TARGET := pipac SRC_DIR := src BUILD_DIR := build -CFLAGS := -Wall -Wextra -pedantic -std=c11 -ggdb +CFLAGS := -Werror -Wall -Wextra -pedantic -std=c11 -ggdb SRCS := $(wildcard $(SRC_DIR)/*.c) HEADERS := $(wildcard $(SRC_DIR)/*.h) -- cgit v1.2.3