lang: lex: update ivy_token to use ivy_char_cell
This commit is contained in:
@@ -114,13 +114,7 @@ enum ivy_symbol {
|
||||
struct ivy_token {
|
||||
enum ivy_token_type t_type;
|
||||
|
||||
struct {
|
||||
unsigned long p_row, p_col;
|
||||
} t_start;
|
||||
|
||||
struct {
|
||||
unsigned long p_row, p_col;
|
||||
} t_end;
|
||||
struct ivy_char_cell t_start, t_end;
|
||||
|
||||
b_queue_entry t_entry;
|
||||
|
||||
|
||||
@@ -481,10 +481,10 @@ static void set_token_end(struct ivy_lexer *lex)
|
||||
|
||||
static enum ivy_status push_token(struct ivy_lexer *lex, struct ivy_token *tok)
|
||||
{
|
||||
tok->t_start.p_row = lex->lex_token_start_row;
|
||||
tok->t_start.p_col = lex->lex_token_start_col;
|
||||
tok->t_end.p_row = lex->lex_token_end_row;
|
||||
tok->t_end.p_col = lex->lex_token_end_col;
|
||||
tok->t_start.c_row = lex->lex_token_start_row;
|
||||
tok->t_start.c_col = lex->lex_token_start_col;
|
||||
tok->t_end.c_row = lex->lex_token_end_row;
|
||||
tok->t_end.c_col = lex->lex_token_end_col;
|
||||
|
||||
b_queue_push_back(&lex->lex_queue, &tok->t_entry);
|
||||
lex->lex_prev_token = tok->t_type;
|
||||
|
||||
Reference in New Issue
Block a user