diff --git a/lang/include/ivy/lang/lex.h b/lang/include/ivy/lang/lex.h index 2f8cca3..60224d4 100644 --- a/lang/include/ivy/lang/lex.h +++ b/lang/include/ivy/lang/lex.h @@ -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; diff --git a/lang/lex.c b/lang/lex.c index a5b4d77..718a509 100644 --- a/lang/lex.c +++ b/lang/lex.c @@ -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;