summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.gitignore1
-rw-r--r--Makefile25
-rw-r--r--src/lexer.cpp3
3 files changed, 28 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index fbc5251..5855c26 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
1.*.swp 1.*.swp
2*.o 2*.o
3*.d
3*.exe 4*.exe
4/clic 5/clic
5/.build_cache 6/.build_cache
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..b6ff92e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,25 @@
1SRC := $(wildcard src/*.cpp)
2OBJECTS := $(patsubst %.cpp,%.o,${SRC})
3DEPS := $(patsubst %.cpp,%.d,${SRC})
4
5.PHONY: default all clean
6
7default: clic.exe
8
9all: clic.exe
10
11clean:
12 -rm clic.exe ${OBJECTS} ${DEPS}
13
14clic.exe: ${OBJECTS}
15 g++ -ggdb -o clic.exe ${OBJECTS} -L../libbu++ -lbu++ ${LDCONFIG}
16
17${OBJECTS}: %.o: %.cpp
18 g++ -ggdb -W -Wall -I../libbu++ $< -c -o $@
19
20${DEPS}: %.d: %.cpp
21 g++ -M -I../libbu++ $< > $@
22 sed -i -e 's,^\([^ ]*\)\( *: *\),src/\1 $@: ,' $@
23
24-include ${DEPS}
25
diff --git a/src/lexer.cpp b/src/lexer.cpp
index 7704343..f959e3b 100644
--- a/src/lexer.cpp
+++ b/src/lexer.cpp
@@ -159,7 +159,8 @@ Token Lexer::nextTokenNormal()
159 else 159 else
160 { 160 {
161 sBuf.clear(); 161 sBuf.clear();
162 Bu::println("Invalid character discovered!"); 162 throw Bu::ExceptionBase(
163 "Invalid character discovered!");
163 } 164 }
164 } 165 }
165 break; 166 break;