aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/parser.h1
-rw-r--r--include/tokenizer.h6
2 files changed, 6 insertions, 1 deletions
diff --git a/include/parser.h b/include/parser.h
index 3523127..d130597 100644
--- a/include/parser.h
+++ b/include/parser.h
@@ -3,6 +3,7 @@
#include "tokenizer.h"
+/* Returns 0 on success */
int tsl_parse(const char *code, size_t code_size);
#endif /* TSL_PARSER_H */
diff --git a/include/tokenizer.h b/include/tokenizer.h
index a1d0932..8b511ed 100644
--- a/include/tokenizer.h
+++ b/include/tokenizer.h
@@ -13,10 +13,13 @@ typedef enum {
TSL_TOKEN_END_OF_FILE,
TSL_TOKEN_UNEXPECTED_SYMBOL,
TSL_TOKEN_IDENTIFIER,
+ TSL_TOKEN_STRING,
TSL_TOKEN_NUM,
TSL_TOKEN_BOOL,
TSL_TOKEN_NULL,
- TSL_TOKEN_EQUAL
+ TSL_TOKEN_EQUAL,
+ TSL_TOKEN_LBRACE,
+ TSL_TOKEN_RBRACE
} TslToken;
typedef struct {
@@ -25,6 +28,7 @@ typedef struct {
size_t code_index;
TslStringView identifier;
+ TslStringView string;
int bool_value;
int64_t number_value;
} TslTokenizer;