comparison lwasm/main.c @ 226:7c2c2239ec9c

Make unicorns grok errors and warnings. Added unicorn formatted error and warning output and also a framework to handle errors which know which character position in the line they occurred in.
author William Astle <lost@l-w.ca>
date Sun, 15 Jul 2012 21:19:43 -0600
parents 3864d96ee8c7
children 164487152dd9
comparison
equal deleted inserted replaced
225:823560a8c251 226:7c2c2239ec9c
289 { 289 {
290 // don't show errors during dependency scanning but 290 // don't show errors during dependency scanning but
291 // stop processing immediately 291 // stop processing immediately
292 break; 292 break;
293 } 293 }
294 lwasm_do_unicorns(&asmstate); 294 if (asmstate.flags & FLAG_UNICORNS)
295 lwasm_show_errors(&asmstate); 295 lwasm_do_unicorns(&asmstate);
296 else
297 lwasm_show_errors(&asmstate);
296 exit(1); 298 exit(1);
297 } 299 }
298 } 300 }
299 301
300 if (asmstate.flags & FLAG_DEPEND) 302 if (asmstate.flags & FLAG_DEPEND)