basic tests
This commit is contained in:
parent
2a04b62f45
commit
4ae6c97904
25 changed files with 158 additions and 25 deletions
10
makefile
10
makefile
|
|
@ -5,7 +5,7 @@ FLEX = flex
|
|||
|
||||
TARGET = build/py2rb
|
||||
|
||||
$(TARGET): build/parser.o build/lexer.o build/main.o
|
||||
$(TARGET): build/parser.o build/lexer.o build/main.o
|
||||
$(CXX) $^ -o $@
|
||||
|
||||
build/parser.cpp build/parser.hpp: src/parser.y | build
|
||||
|
|
@ -17,11 +17,13 @@ build/lexer.cpp build/lexer.hpp: src/lexer.l build/parser.hpp src/scanner.hpp sr
|
|||
build/%.o: build/%.cpp
|
||||
$(CXX) -c $(ARGS) $< -o $@
|
||||
|
||||
build/%.o: src/%.cpp | build
|
||||
$(CXX) -c $(ARGS) $< -o $@
|
||||
build/main.o: src/main.cpp build src/codegen.hpp
|
||||
$(CXX) -c $(ARGS) src/main.cpp -o build/main.o
|
||||
|
||||
src/ast.hpp: src/ast/base.hpp src/ast/expressions.hpp src/ast/literals.hpp src/ast/operators.hpp src/ast/statements.hpp src/ast/string_utils.hpp
|
||||
|
||||
src/codegen.hpp : src/ast.hpp
|
||||
|
||||
build:
|
||||
mkdir -p build
|
||||
|
||||
|
|
@ -34,4 +36,4 @@ run: $(TARGET)
|
|||
test: $(TARGET)
|
||||
test/tester.sh
|
||||
|
||||
.PHONY: clean run test
|
||||
.PHONY: clean run test
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue