comparison lwasm/pass6.c @ 370:8764142b3192

Convert internal error/warning handling framework to a new unified system Replace the ad hoc error and warning handling with a new system that codifies the errors with specific codes. This makes it possible in the future for error numbers to be used for testing and other purposes. It also makes sure the error strings themselves are consistent. Thanks to Erik G <erik@6809.org> for the patch.
author William Astle <lost@l-w.ca>
date Mon, 22 Jun 2015 18:49:38 -0600
parents 02804b7c051c
children 58cafa61ab40
comparison
equal deleted inserted replaced
369:682524a1f32f 370:8764142b3192
81 for (le = cl -> exprs; le; le = le -> next) 81 for (le = cl -> exprs; le; le = le -> next)
82 { 82 {
83 lwasm_reduce_expr(as, le -> expr); 83 lwasm_reduce_expr(as, le -> expr);
84 if (!exprok(as, le -> expr)) 84 if (!exprok(as, le -> expr))
85 { 85 {
86 lwasm_register_error(as, cl, "Invalid expression: %s", lw_expr_print(le -> expr)); 86 lwasm_register_error2(as, cl, E_EXPRESSION_BAD, "%s", lw_expr_print(le -> expr));
87 } 87 }
88 } 88 }
89 } 89 }
90 } 90 }