- Change `scc_macro_table_t` to `scc_pp_macro_table_t` for consistency - Rename `scc_pp_macro_create` to `scc_pp_macro_new` for naming convention - Remove unused `scc_pp_compress_whitespace` function - Update macro table function names: `scc_pp_find_macro` → `scc_pp_macro_table_get`, `scc_pp_remove_macro` → `scc_pp_macro_table_remove` - Add new `scc_pp_macro_table_set` function for setting macros - Update all function signatures to use new type name - Remove commented-out whitespace compression code from implementation
31 lines
1.2 KiB
C
31 lines
1.2 KiB
C
#ifndef __SCC_PP_TOKEN_H__
|
|
#define __SCC_PP_TOKEN_H__
|
|
|
|
/* clang-format off */
|
|
/// https://cppreference.cn/w/c/preprocessor
|
|
#define SCC_PP_INST_TOKEN \
|
|
X(define , SCC_PP_STD, SCC_PP_TOK_DEFINE ) \
|
|
X(elif , SCC_PP_STD, SCC_PP_TOK_UNDEF ) \
|
|
X(elifdef , SCC_PP_STD, SCC_PP_TOK_INCLUDE ) \
|
|
X(elifndef , SCC_PP_STD, SCC_PP_TOK_IF ) \
|
|
X(else , SCC_PP_STD, SCC_PP_TOK_IFDEF ) \
|
|
X(embed , SCC_PP_STD, SCC_PP_TOK_IFNDEF ) \
|
|
X(endif , SCC_PP_STD, SCC_PP_TOK_ELSE ) \
|
|
X(error , SCC_PP_STD, SCC_PP_TOK_ELIF ) \
|
|
X(if , SCC_PP_STD, SCC_PP_TOK_ELIFDEF ) \
|
|
X(ifdef , SCC_PP_C23, SCC_PP_TOK_ELIFNDEF ) \
|
|
X(ifndef , SCC_PP_STD, SCC_PP_TOK_ENDIF ) \
|
|
X(include , SCC_PP_STD, SCC_PP_TOK_LINE ) \
|
|
X(line , SCC_PP_C23, SCC_PP_TOK_EMBED ) \
|
|
X(pragma , SCC_PP_STD, SCC_PP_TOK_ERROR ) \
|
|
X(undef , SCC_PP_C23, SCC_PP_TOK_WARNING ) \
|
|
X(warning , SCC_PP_STD, SCC_PP_TOK_PRAMA ) \
|
|
// END
|
|
/* clang-format on */
|
|
|
|
#define X(name, type, tok) tok,
|
|
typedef enum scc_pp_token { SCC_PP_INST_TOKEN } scc_pp_token_t;
|
|
#undef X
|
|
|
|
#endif /* __SCC_PP_TOKEN_H__ */
|