lang: lex: start implementing strings and interpolation
This commit is contained in:
@@ -46,6 +46,8 @@ enum ivy_keyword {
|
||||
enum ivy_symbol {
|
||||
IVY_SYM_NONE = 0,
|
||||
IVY_SYM_DOT,
|
||||
IVY_SYM_SQUOTE,
|
||||
IVY_SYM_DQUOTE,
|
||||
IVY_SYM_LEFT_BRACE,
|
||||
IVY_SYM_RIGHT_BRACE,
|
||||
IVY_SYM_LEFT_BRACKET,
|
||||
@@ -103,12 +105,14 @@ struct ivy_token {
|
||||
|
||||
struct ivy_lexer_symbol_node;
|
||||
|
||||
|
||||
struct ivy_lexer {
|
||||
struct ivy_line_source *lex_source;
|
||||
enum ivy_status lex_status;
|
||||
struct ivy_token *lex_queue;
|
||||
struct ivy_lexer_symbol_node *lex_sym_tree;
|
||||
enum ivy_token_type lex_prev_token;
|
||||
unsigned int lex_state;
|
||||
|
||||
char *lex_linebuf;
|
||||
size_t lex_linebuf_len;
|
||||
@@ -124,8 +128,8 @@ IVY_API struct ivy_token *ivy_lexer_read(struct ivy_lexer *lex);
|
||||
|
||||
IVY_API void ivy_token_destroy(struct ivy_token *tok);
|
||||
|
||||
extern const char *ivy_lex_token_type_to_string(enum ivy_token_type type);
|
||||
extern const char *ivy_keyword_to_string(enum ivy_keyword keyword);
|
||||
extern const char *ivy_symbol_to_string(enum ivy_symbol sym);
|
||||
IVY_API const char *ivy_lex_token_type_to_string(enum ivy_token_type type);
|
||||
IVY_API const char *ivy_keyword_to_string(enum ivy_keyword keyword);
|
||||
IVY_API const char *ivy_symbol_to_string(enum ivy_symbol sym);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user