aboutsummaryrefslogtreecommitdiffstats
path: root/src/bytecode/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bytecode/main.c')
-rwxr-xr-xsrc/bytecode/main.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/bytecode/main.c b/src/bytecode/main.c
index 7cb0a2a..7f2042e 100755
--- a/src/bytecode/main.c
+++ b/src/bytecode/main.c
@@ -126,15 +126,7 @@ run_file(char *file_name) {
126 126
127 // Check if there were any errors. 127 // Check if there were any errors.
128 if (errors_n != 0 && !supress_errors) { 128 if (errors_n != 0 && !supress_errors) {
129 for (size_t i = 0; i < errors_n; i++) { 129 report_errors(file_name);
130 Error err = errors[i];
131 fprintf(stderr, "%s", file_name);
132 if (err.line != 0) {
133 fprintf(stderr, ":%ld:%ld", err.line, err.col);
134 }
135 fprintf(stderr, ": %s\n", error_msgs[err.value]);
136 }
137 errors_n = 0;
138 } 130 }
139 131
140 free(source); 132 free(source);
@@ -164,15 +156,7 @@ run_stdin(void) {
164 156
165 // Check if there were any errors. 157 // Check if there were any errors.
166 if (errors_n != 0 && !supress_errors) { 158 if (errors_n != 0 && !supress_errors) {
167 for (size_t i = 0; i < errors_n; i++) { 159 report_errors("stdin");
168 Error err = errors[i];
169 fprintf(stderr, "stdin");
170 if (err.line != 0) {
171 fprintf(stderr, ":%ld:%ld", err.line, err.col);
172 }
173 fprintf(stderr, ": %s\n", error_msgs[err.value]);
174 }
175 errors_n = 0;
176 } 160 }
177 161
178 array_free(source); 162 array_free(source);