diff options
Diffstat (limited to 'c/token.c')
-rw-r--r-- | c/token.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -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"); |