aboutsummaryrefslogtreecommitdiff
path: root/tokens.h
diff options
context:
space:
mode:
Diffstat (limited to 'tokens.h')
-rw-r--r--tokens.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/tokens.h b/tokens.h
new file mode 100644
index 0000000..8b06454
--- /dev/null
+++ b/tokens.h
@@ -0,0 +1,24 @@
+#ifndef TOKENS_H
+#define TOKENS_H
+
+enum
+{
+ TOKEN_INT,
+ TOKEN_STR,
+ TOKEN_SYMBOL,
+ TOKEN_LPAREN,
+ TOKEN_RPAREN,
+ TOKEN_PERIOD,
+ TOKEN_QUOTE
+};
+
+struct token
+{
+ const char *s;
+ int len;
+ int type;
+};
+
+int get_next_token(const char *src, int *pos, struct token *token);
+
+#endif