summaryrefslogtreecommitdiff
path: root/src/include/token.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/token.h')
-rw-r--r--src/include/token.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/include/token.h b/src/include/token.h
new file mode 100644
index 0000000..83c595b
--- /dev/null
+++ b/src/include/token.h
@@ -0,0 +1,22 @@
+#ifndef TOKEN_H
+#define TOKEN_H
+
+typedef struct {
+ enum {
+ TOKEN_ID,
+ TOKEN_LPAREN,
+ TOKEN_RPAREN,
+ TOKEN_BOOL,
+ TOKEN_INT,
+ TOKEN_FLOAT,
+ TOKEN_STRING,
+ TOKEN_QUOTE,
+ TOKEN_PERIOD,
+ } type;
+ char *value;
+ int row;
+ int col;
+} token_t;
+
+token_t *init_token(int type, char *value, int row, int col);
+#endif