+enum line_info_type {
+ PREPROC_LINE, /* Line starts with # */
+ CODE_LINE, /* Code (ie. not pure comment). */
+ DOC_LINE, /* Line with kernel-doc-style comment. */
+ COMMENT_LINE, /* (pure) comment line */
+};
+
+/* So far, only do simple #ifdef/#ifndef/#if defined/#if !defined tests,
+ * and #if <SYMBOL>/#if !<SYMBOL> */
+struct pp_conditions {
+ /* We're inside another ifdef? */
+ struct pp_conditions *parent;
+
+ enum {
+ PP_COND_IF,
+ PP_COND_IFDEF,
+ PP_COND_UNKNOWN,
+ } type;
+
+ bool inverse;
+ const char *symbol;
+};
+
+/* Preprocessor information about each line. */
+struct line_info {
+ enum line_info_type type;
+
+ /* Is this actually a continuation of line above? (which ends in \) */
+ bool continued;
+
+ /* Conditions for this line to be compiled. */
+ struct pp_conditions *cond;
+};
+