comparison lwasm/pass1.c @ 375:71f507f404f1

Add "testmode" pragma Add a pragma to allow testing more easily. Thanks to Erik G <erik@6809.org> for the patch.
author William Astle <lost@l-w.ca>
date Mon, 13 Jul 2015 20:35:16 -0600
parents 8e25147c2aa8
children 80d615a6642c
comparison
equal deleted inserted replaced
374:8e25147c2aa8 375:71f507f404f1
261 nomacro = 1; 261 nomacro = 1;
262 tok += 2; 262 tok += 2;
263 } 263 }
264 if (*tok) 264 if (*tok)
265 { 265 {
266 if (CURPRAGMA(cl, PRAGMA_TESTMODE))
267 {
268 /* in test mode, terminate the line here so we don't affect the parsers */
269 /* (cl -> ltext retains the full, unmodified string) */
270 char *t = strstr(p1, ";.");
271 if (t) *t = 0;
272 }
273
266 // look up operation code 274 // look up operation code
267 lw_free(sym); 275 lw_free(sym);
268 sym = lw_strndup(tok, p1 - tok); 276 sym = lw_strndup(tok, p1 - tok);
269 for (; *p1 && isspace(*p1); p1++) 277 for (; *p1 && isspace(*p1); p1++)
270 /* do nothing */ ; 278 /* do nothing */ ;