add mulitple variable declaration, with null default. add call

This commit is contained in:
2025-06-05 04:04:41 +01:00
parent 7b76b0d888
commit 61d8bc61c3
14 changed files with 186 additions and 111 deletions

View File

@@ -13,11 +13,12 @@ void lexer(LexerState state) {
int token;
while ((token = yylex(scanner)) != 0) {
Token *token_struct =
create_token(token, yyget_lineno(scanner), state.current_column + 1,
create_token(token, state.current_line+1, state.current_column + 1,
yyget_text(scanner));
darray_push(state.tokens, token_struct);
free(token_struct);
if (token == TOKEN_NEW_LINE) {
state.current_line += 1;
state.current_column = 0;
} else {
state.current_column += yyget_leng(scanner);