diff options
Diffstat (limited to 'c/token.h')
-rw-r--r-- | c/token.h | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -23,6 +23,20 @@ enum tokentype { Ntok, }; +struct location { + usize lineno; + usize column; +}; + +struct token { + /* location */ + struct location loc; + /* token type */ + enum tokentype type; + /* string value, if any */ + char *str; +}; + char* tokname(enum tokentype); enum tokentype findkeyword(char *name); |