core: Add initial token definitions

Signed-off-by: Ian Moffett <ian@mirocom.org>
This commit is contained in:
2026-02-14 00:10:46 -05:00
parent 743178e734
commit 33a1007556

28
inc/rifle/token.h Normal file
View File

@@ -0,0 +1,28 @@
#ifndef RIFLE_TOKEN_H
#define RIFLE_TOKEN_H 1
/*
* Represents valid token types
*/
typedef enum {
TT_NONE, /* <NONE> */
TT_PLUS, /* '+' */
TT_MINUS, /* '-' */
TT_STAR, /* '*' */
TT_SLASH, /* '/' */
} tt_t;
/*
* Represents a single lexical element found within
* the source input.
*
* @type: Token type
*/
struct token {
tt_t type;
union {
char c;
};
};
#endif /* !RIFLE_TOKEN_H */