14 Macro macros[MAX_MACROS];
28 size_t output_capacity;
41char *preprocessor_process_file(
Preprocessor *pp,
const char *filename);
42char *preprocessor_process_string(
Preprocessor *pp,
const char *source,
const char *filename);
45bool preprocessor_define_macro(
Preprocessor *pp,
const char *name,
const char *body);
46bool preprocessor_define_function_macro(
Preprocessor *pp,
const char *name,
47 const char *params[],
int param_count,
const char *body);
48bool preprocessor_undefine_macro(
Preprocessor *pp,
const char *name);
50bool preprocessor_is_macro_defined(
Preprocessor *pp,
const char *name);
53char *preprocessor_expand_macros(
Preprocessor *pp,
const char *line);
55 const char *args[],
int arg_count);
58bool preprocessor_process_directive(
Preprocessor *pp,
const char *line);
59bool preprocessor_handle_define(
Preprocessor *pp,
const char *directive);
60bool preprocessor_handle_undef(
Preprocessor *pp,
const char *directive);
61bool preprocessor_handle_include(
Preprocessor *pp,
const char *directive);
62bool preprocessor_handle_if(
Preprocessor *pp,
const char *directive);
63bool preprocessor_handle_ifdef(
Preprocessor *pp,
const char *directive);
64bool preprocessor_handle_ifndef(
Preprocessor *pp,
const char *directive);
65bool preprocessor_handle_elif(
Preprocessor *pp,
const char *directive);
66bool preprocessor_handle_else(
Preprocessor *pp,
const char *directive);
67bool preprocessor_handle_endif(
Preprocessor *pp,
const char *directive);
68bool preprocessor_handle_error(
Preprocessor *pp,
const char *directive);
69bool preprocessor_handle_warning(
Preprocessor *pp,
const char *directive);
70bool preprocessor_handle_pragma(
Preprocessor *pp,
const char *directive);
71bool preprocessor_handle_line(
Preprocessor *pp,
const char *directive);
74bool preprocessor_evaluate_condition(
Preprocessor *pp,
const char *condition);
80char *preprocessor_read_file(
const char *filename);
81void preprocessor_append_output(
Preprocessor *pp,
const char *text);
82char *preprocessor_parse_macro_args(
const char *call,
char *args[],
int max_args);
83char *preprocessor_substitute_params(
const char *body,
const char *params[],
84 const char *args[],
int param_count);
85bool preprocessor_is_directive(
const char *line);
86char *preprocessor_get_directive_name(
const char *line);
87char *preprocessor_get_directive_args(
const char *line);
88void preprocessor_add_predefined_macros(
Preprocessor *pp);
91char *preprocessor_stringify(
const char *text);
92char *preprocessor_concatenate(
const char *left,
const char *right);
93char *preprocessor_trim_whitespace(
char *str);
96int preprocessor_error(
Preprocessor* pp,
const char* format, ...);
97int preprocessor_warning(
Preprocessor* pp,
const char* format, ...);
101void preprocessor_add_user_macros(
Preprocessor *pp,
const char *macro_definitions[],
int count);
102void preprocessor_add_environment_macros(
Preprocessor *pp);
106void free_macro(
Macro *macro);
Conditional state tracking.
Type definitions for KCC compiler with Objective-C support.
ConditionalType
Conditional compilation state.