Mercurial > hg > index.cgi
diff lwasm/pass1.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 | b0d53e2f3f53 |
children | 3604d0ef06c6 |
line wrap: on
line diff
--- a/lwasm/pass1.c Sun Jun 10 14:55:27 2012 -0600 +++ b/lwasm/pass1.c Sun Jun 10 18:24:31 2012 -0600 @@ -413,7 +413,9 @@ } debug_message(as, 40, "Line address: %s", lw_expr_print(cl -> addr)); } - + if (as -> skipcond || as -> inmacro || cl -> ltext[0] == 1) + cl -> hideline = 1; + nextline: if (sym) lw_free(sym); @@ -421,6 +423,11 @@ lw_free(line); + if (cl -> hideline == 0) + { + printf("%s\n", cl -> ltext); + } + // if we've hit the "end" bit, finish out if (as -> endseen) return;