diff 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
line wrap: on
line diff
--- a/lwcc/preproc.c	Tue Sep 17 19:32:14 2013 -0600
+++ b/lwcc/preproc.c	Tue Sep 17 19:33:41 2013 -0600
@@ -48,7 +48,7 @@
 	if (ct -> ttype == TOK_EOL)
 		pp -> ppeolseen = 1;
 		
-	if (ct -> ttype == TOK_HASH && pp -> eolseen == 1)
+	if (ct -> ttype == TOK_HASH && pp -> ppeolseen == 1)
 	{
 		// preprocessor directive 
 		process_directive(pp);
@@ -1470,3 +1470,12 @@
 	
 	return 1;
 }
+
+struct token *preproc_next(struct preproc_info *pp)
+{
+	struct token *t;
+	
+	t = preproc_next_processed_token(pp);
+	pp -> curtok = NULL;
+	return t;
+}