summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabrice <fabrice@schaub-dev.xyz>2026-03-01 19:10:38 +0100
committerFabrice <fabrice@schaub-dev.xyz>2026-03-01 19:10:38 +0100
commitc638003e8aa684bae60e8b3736c6d9db8571e727 (patch)
treed33a696829fdccd8b9b870a0f8553c40f123b168
parent62ace5068979d4956abd2897e27eb5e078ac95dc (diff)
fix build
-rw-r--r--makefile2
-rw-r--r--src/common.cc2
-rw-r--r--src/token.cc8
3 files changed, 7 insertions, 5 deletions
diff --git a/makefile b/makefile
index d5c4fad..f06bcb1 100644
--- a/makefile
+++ b/makefile
@@ -40,3 +40,5 @@ $(VOIDC): $(VOIDC_O)
.PHONY: clean
clean:
$(RM) $(VOIDC_O) $(VOIDC_D) $(VOIDC)
+
+-include $(VOIDC_D)
diff --git a/src/common.cc b/src/common.cc
index 2099e24..aa734b3 100644
--- a/src/common.cc
+++ b/src/common.cc
@@ -25,7 +25,7 @@ struct Slice {
T* ptr;
usize length;
- slice(T* ptr, usize length) : ptr(ptr), length(length) {}
+ Slice(T* ptr, usize length) : ptr(ptr), length(length) {}
T* operator[](usize index) {
return ptr + index;
diff --git a/src/token.cc b/src/token.cc
index 8217138..1f6f6f0 100644
--- a/src/token.cc
+++ b/src/token.cc
@@ -8,15 +8,15 @@
X(invalid_char) \
X(invalid_literal)
-enum token_kind {
+enum Token_Kind {
#define X(name) token_kind_##name,
TOKEN_KINDS_NOLEX
#undef X
};
-struct token {
- token_kind kind;
- string text;
+struct Token {
+ Token_Kind kind;
+ String text;
};
#endif