comparison lwcc/preproc.c @ 304:d85d173ba120 ccdev

Checkpoint lwcc development - preprocessor is runnable but nonfunctional The preprocessor is currently runnable but doesn't actually do anything useful. This is just a checkpoint.
author William Astle <lost@l-w.ca>
date Tue, 17 Sep 2013 19:33:41 -0600
parents 6f7fe78bb868
children 54f213c8fb81
comparison
equal deleted inserted replaced
303:659e0e4ce50c 304:d85d173ba120
46 if (ct -> ttype == TOK_EOF) 46 if (ct -> ttype == TOK_EOF)
47 return ct; 47 return ct;
48 if (ct -> ttype == TOK_EOL) 48 if (ct -> ttype == TOK_EOL)
49 pp -> ppeolseen = 1; 49 pp -> ppeolseen = 1;
50 50
51 if (ct -> ttype == TOK_HASH && pp -> eolseen == 1) 51 if (ct -> ttype == TOK_HASH && pp -> ppeolseen == 1)
52 { 52 {
53 // preprocessor directive 53 // preprocessor directive
54 process_directive(pp); 54 process_directive(pp);
55 } 55 }
56 // if we're in a false section, don't return the token; keep scanning 56 // if we're in a false section, don't return the token; keep scanning
1468 lw_free(arglist); 1468 lw_free(arglist);
1469 lw_free(exparglist); 1469 lw_free(exparglist);
1470 1470
1471 return 1; 1471 return 1;
1472 } 1472 }
1473
1474 struct token *preproc_next(struct preproc_info *pp)
1475 {
1476 struct token *t;
1477
1478 t = preproc_next_processed_token(pp);
1479 pp -> curtok = NULL;
1480 return t;
1481 }