diff directive.h @ 154:a2c2fe8dbea3

Wrap up the current and next line position when invoking directives. (in preparation for implementing #line)
author David A. Holland
date Fri, 12 Jun 2015 00:56:12 -0400
parents 76c114899f63
children f14f5352956c
line wrap: on
line diff
--- a/directive.h	Fri Jun 12 00:35:46 2015 -0400
+++ b/directive.h	Fri Jun 12 00:56:12 2015 -0400
@@ -29,11 +29,21 @@
 
 #include <stddef.h>
 
-struct place;
+#include "place.h"
+
+/*
+ * Relevant places while we're processing a line:
+ *   the place in the current line
+ *   the beginning of the next line
+ */
+struct lineplace {
+	struct place current;
+	struct place nextline;
+};
 
 void directive_init(void);
 void directive_cleanup(void);
 
-void directive_gotline(struct place *p, char *line, size_t len);
+void directive_gotline(struct lineplace *lp, char *line, size_t len);
 void directive_goteof(struct place *p);