From 9ca93786af90636bbace0631d87f1a565ba8f25e Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 15 Apr 2024 04:56:14 +0630 Subject: Updated main.cpp for changes to lexer --- asm/main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'asm') diff --git a/asm/main.cpp b/asm/main.cpp index be26426..c2414b8 100644 --- a/asm/main.cpp +++ b/asm/main.cpp @@ -36,8 +36,6 @@ void usage(const char *program_name, FILE *fp) int main(int argc, const char *argv[]) { - usage(argv[1], stdout); - return 0; if (argc == 1 || argc > 3) { usage(argv[0], stderr); @@ -50,7 +48,7 @@ int main(int argc, const char *argv[]) string source_str; string_view original; string_view src; - vector tokens; + vector tokens; lerr_t lerr; if (file_source.has_value()) @@ -95,5 +93,8 @@ int main(int argc, const char *argv[]) } end: + for (auto token : tokens) + delete token; + return ret; } -- cgit v1.2.3-13-gbd6f