comparison lwasm/pragma.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 c6d2a1f54e0c
children 71f507f404f1
comparison
equal deleted inserted replaced
369:682524a1f32f 370:8764142b3192
115 115
116 l -> len = 0; 116 l -> len = 0;
117 117
118 if (parse_pragma_string(as, ps, 0) == 0) 118 if (parse_pragma_string(as, ps, 0) == 0)
119 { 119 {
120 lwasm_register_error(as, l, "Unrecognized pragma string"); 120 lwasm_register_error(as, l, E_PRAGMA_UNRECOGNIZED);
121 } 121 }
122 if (as -> pragmas & PRAGMA_NOLIST) 122 if (as -> pragmas & PRAGMA_NOLIST)
123 l -> pragmas |= PRAGMA_NOLIST; 123 l -> pragmas |= PRAGMA_NOLIST;
124 lw_free(ps); 124 lw_free(ps);
125 } 125 }