diff lwasm/macro.c @ 219:afd50d6b4113

Add --preprocess option Add --preprocess option which expands macros, resolves conditions, and resolves include files if possible. If an include file is not available, it the include directive is retained.
author William Astle <lost@l-w.ca>
date Sun, 10 Jun 2012 18:24:31 -0600
parents e2728091b75a
children 03f7192fcd20
line wrap: on
line diff
--- a/lwasm/macro.c	Sun Jun 10 14:55:27 2012 -0600
+++ b/lwasm/macro.c	Sun Jun 10 18:24:31 2012 -0600
@@ -39,7 +39,7 @@
 	char tc;
 		
 	l -> len = 0;
-	
+	l -> hideline = 1;
 	if (as -> skipcond)
 	{
 		as -> skipmacro = 1;
@@ -90,6 +90,7 @@
 
 PARSEFUNC(pseudo_parse_endm)
 {
+	l -> hideline = 1;
 	l -> len = 0;
 
 	if (as -> skipcond)
@@ -332,5 +333,6 @@
 	}
 
 	// indicate a macro was expanded
+	l -> hideline = 1;
 	return 0;	
 }