- Replace `scc_cstring_from_cstr(scc_cstring_as_cstr(...))` with `scc_cstring_copy()` in lexer to fix memory leaks - Extract macro expansion logic into separate `expand_macro.c` file - Remove `expand_stack` parameter from `scc_pp_expand_macro()` function - Add new parsing functions for macro replacement lists and arguments - Add string utility functions for whitespace trimming and string joining - Update memory stream documentation for clarity
19 lines
712 B
C
19 lines
712 B
C
#ifndef __SCC_PP_PARSE_H__
|
|
#define __SCC_PP_PARSE_H__
|
|
|
|
#include <libcore.h>
|
|
#include <pp_macro.h>
|
|
void scc_pp_parse_directive(scc_probe_stream_t *stream, scc_pos_t *pos,
|
|
scc_pp_macro_table_t *macros);
|
|
cbool scc_pp_parse_macro_replace_list(scc_probe_stream_t *stream,
|
|
scc_pp_macro_list_t *list);
|
|
cbool scc_pp_parse_macro_arguments(scc_probe_stream_t *stream,
|
|
scc_pp_macro_list_t *args);
|
|
|
|
// expand
|
|
cbool scc_pp_expand_macro(scc_probe_stream_t *stream,
|
|
scc_pp_macro_table_t *macros,
|
|
scc_probe_stream_t **out_stream, int depth);
|
|
|
|
#endif /* __SCC_PP_PARSE_H__ */
|