summaryrefslogtreecommitdiff
path: root/c/token.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/token.c')
-rw-r--r--c/token.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/c/token.c b/c/token.c
index 85e8e43..6acfe3a 100644
--- a/c/token.c
+++ b/c/token.c
@@ -1,5 +1,8 @@
#include <assert.h>
#include <string.h>
+#include <stddef.h>
+#include <stdint.h>
+#include "types.h"
#include "token.h"
static char *tokennames[] = {
@@ -8,11 +11,11 @@ static char *tokennames[] = {
[Treturn] = "return",
[Tident] = "identifier",
[Tconstant] = "constant",
- [Tlparen] = "lparen",
- [Trparen] = "rparen",
- [Tlbrace] = "lbrace",
- [Trbrace] = "rbrace",
- [Tsemicolon] = "semicolon",
+ [Tlparen] = "(",
+ [Trparen] = ")",
+ [Tlbrace] = "{",
+ [Trbrace] = "}",
+ [Tsemicolon] = ";",
};
static_assert(sizeof(tokennames) / sizeof(char *) == Ntok, "token name map out of sync with tokens");