Init repo

This commit is contained in:
Abdelrahman Said 2025-06-01 01:06:19 +01:00
commit 1845618e8d
5 changed files with 36 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
cclox
clox

19
Makefile Normal file
View File

@ -0,0 +1,19 @@
CC = clang
CXX = clang++
CFLAGS = -Wall -Wextra -Werror -pedantic -g
CCLOX_SRC = cclox_src/*.cc
CCLOX_OUT = cclox
CLOX_SRC = clox_src/*.c
CLOX_OUT = clox
.PHONY: all cclox clox
all: cclox clox
cclox: ${CCLOX_SRC}
${CXX} ${CFLAGS} ${CCLOX_SRC} -o ${CCLOX_OUT}
clox: ${CLOX_SRC}
${CC} ${CFLAGS} ${CLOX_SRC} -o ${CLOX_OUT}

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# Crafting Interpreters
Following along with Robert Nystrom's [Crafting Interpreters](https://craftinginterpreters.com/contents.html)

6
cclox_src/main.cc Normal file
View File

@ -0,0 +1,6 @@
#include <cstdio>
int main() {
printf("Hello from cclox\n");
return 0;
}

6
clox_src/main.c Normal file
View File

@ -0,0 +1,6 @@
#include <stdio.h>
int main(void) {
printf("Hello from clox\n");
return 0;
}