diff 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
line wrap: on
line diff
--- a/lwasm/pragma.c	Mon Jun 22 18:38:30 2015 -0600
+++ b/lwasm/pragma.c	Mon Jun 22 18:49:38 2015 -0600
@@ -117,7 +117,7 @@
 
 	if (parse_pragma_string(as, ps, 0) == 0)
 	{
-		lwasm_register_error(as, l, "Unrecognized pragma string");
+		lwasm_register_error(as, l, E_PRAGMA_UNRECOGNIZED);
 	}
 	if (as -> pragmas & PRAGMA_NOLIST)
 		l -> pragmas |= PRAGMA_NOLIST;