diff --git a/makefile b/makefile index 43ff86b..d31bfd0 100644 --- a/makefile +++ b/makefile @@ -7,6 +7,9 @@ ## C compiler CC=tcc # much faster compilation than gcc +COMPILER_FLAGS=-g3 -Wall -Wextra -Wconversion -Wdouble-promotion -Wno-unused-parameter -Wno-unused-function -Wno-sign-conversion -fsanitize=undefined -fsanitize-trap +## ^ from +## ## Debugging options DEBUG=-g#-g @@ -31,7 +34,7 @@ STYLE_BLUEPRINT=webkit FORMATTER=clang-format -i -style=$(STYLE_BLUEPRINT) build: $(SRC) - $(CC) -Wall $(INCS) $(SRC) $(MPC) -o mumble $(LIBS) + $(CC) $(COMPILER_FLAGS) $(INCS) $(SRC) $(MPC) -o mumble $(LIBS) format: $(SRC) $(FORMATTER) $(SRC) diff --git a/mumble b/mumble index 0bb786f..7e0ed09 100755 Binary files a/mumble and b/mumble differ diff --git a/notes/savepoint.txt b/notes/savepoint.txt index 788b7f3..d82f295 100644 --- a/notes/savepoint.txt +++ b/notes/savepoint.txt @@ -1 +1,2 @@ https://buildyourownlisp.com/chapter7_evaluation#trees +https://buildyourownlisp.com/chapter9_s_expressions diff --git a/src/mumble.c b/src/mumble.c index 102d010..607f3f2 100644 --- a/src/mumble.c +++ b/src/mumble.c @@ -14,7 +14,7 @@ typedef struct { int err; } lispval; -enum { LISPVAL_NUM, LISPVAL_ERR }; +enum { LISPVAL_NUM, LISPVAL_ERR, LISPVAL_SYM, LISPVAL_SEXPR }; enum { LISPERR_DIV_ZERO, LISPERR_BAD_OP, LISPERR_BAD_NUM }; lispval lispval_num(long x){