Merge branch 'lexer' into dev

This commit is contained in:
Matteo Flebus 2026-01-19 18:52:44 +01:00
commit 6b539d1eac

View file

@ -291,6 +291,13 @@ struct token *peek_token(void)
break;
}
}
else if (stream[i] == EOF)
{
fprintf(stderr, "Lexing error: unmatched quote\n");
// error handling
return NULL;
}
i++;
}
@ -332,6 +339,13 @@ struct token *pop_token(void)
break;
}
}
else if (stream[i] == EOF)
{
fprintf(stderr, "Lexing error: unmatched quote\n");
// error handling
return NULL;
}
i++;
}