diff lwasm/pragma.c @ 81:428068681cbf

Added nolist pragma to suppress listing output of non-code generating lines
author Lost Wizard (lost@starbug3)
date Wed, 25 May 2011 19:13:33 -0600
parents 337301ddf74a
children 8fa52c3f2970
line wrap: on
line diff
--- a/lwasm/pragma.c	Wed May 18 20:09:33 2011 -0600
+++ b/lwasm/pragma.c	Wed May 25 19:13:33 2011 -0600
@@ -43,6 +43,7 @@
 	{ "importundefexport", PRAGMA_IMPORTUNDEFEXPORT },
 	{ "pcaspcr", PRAGMA_PCASPCR },
 	{ "shadow", PRAGMA_SHADOW },
+	{ "nolist", PRAGMA_NOLIST },
 	{ 0, 0 }
 };
 
@@ -55,6 +56,7 @@
 	{ "noimportundefexport", PRAGMA_IMPORTUNDEFEXPORT },
 	{ "nopcaspcr", PRAGMA_PCASPCR },
 	{ "noshadow", PRAGMA_SHADOW },
+	{ "list", PRAGMA_NOLIST },
 	{ 0, 0 }
 };
 
@@ -113,6 +115,8 @@
 	{
 		lwasm_register_error(as, l, "Unrecognized pragma string");
 	}
+	if (as -> pragmas & PRAGMA_NOLIST)
+		l -> pragmas |= PRAGMA_NOLIST;
 	lw_free(ps);
 }
 
@@ -130,5 +134,7 @@
 	
 	// *pragma must NEVER throw an error
 	parse_pragma_string(as, ps, 1);
+	if (as -> pragmas & PRAGMA_NOLIST)
+		l -> pragmas |= PRAGMA_NOLIST;
 	lw_free(ps);
 }