type: Make an assert()ion independent of the last entry of an enum.
[cparser] / preprocessor.h
1 /*
2  * This file is part of cparser.
3  * Copyright (C) 2012 Matthias Braun <matze@braunis.de>
4  */
5 #ifndef PREPROCESSOR_H
6 #define PREPROCESSOR_H
7
8 #include "token_t.h"
9
10 void init_preprocessor(void);
11
12 void exit_preprocessor(void);
13
14 typedef struct searchpath_entry_t searchpath_entry_t;
15
16 /** Switch input to another file. The current token is not changed. */
17 void switch_pp_input(FILE *file, char const *filename, searchpath_entry_t *entry, bool is_system_header);
18
19 FILE *close_pp_input(void);
20
21 void next_preprocessing_token(void);
22
23 string_t make_string(char const *string);
24
25 extern bool    allow_dollar_in_symbol;
26 extern token_t pp_token;
27
28 void set_preprocessor_output(FILE *output);
29 void emit_pp_token(void);
30 void check_unclosed_conditionals(void);
31
32 typedef struct searchpath_t searchpath_t;
33 extern searchpath_t bracket_searchpath; /**< paths for < > includes */
34 extern searchpath_t quote_searchpath;   /**< paths for " " includes */
35 extern searchpath_t system_searchpath;  /**< system searchpath (appended to
36                                              quote searchpath) */
37 extern searchpath_t after_searchpath;   /**< searchpath for -idirafter (also system paths) */
38
39 void init_include_paths(void);
40 void append_include_path(searchpath_t *searchpath, const char *path);
41
42 #endif