refactor(lex_parser): 重命名libcore为scc_core并重构头文件包含

- 将依赖项从libcore重命名为scc_core
- 更新头文件包含路径从<libcore.h>到<scc_core.h>
- 保持原有功能不变

refactor(lexer): 重命名libcore为scc_core并添加词法流式解析功能

- 将依赖项从libcore重命名为scc_core
- 移除不再需要的scc_lexer_token结构体定义
- 重命名struct cc_lexer为struct scc_lexer
- 添加scc_lexer_stream_t流式解析器相关定义和实现
- 新增lexer_stream.c文件实现流式token缓冲功能

refactor(lexer_log): 重命名logger变量和头文件定义

- 将头文件保护宏从__SMCC_LEXER_LOG_H__改为__SCC_LEXER_LOG_H__
- 将logger变量从__smcc_lexer_log改为__scc_lexer_log
- 更新头文件包含从<libcore.h>到<scc_core.h>

refactor(lexer_token): 重新组织token头文件结构

- 将头文件保护宏从__SMCC_CC_TOKEN_H__改为__SCC_LEXER_TOKEN_H__
- 更新头文件包含从<libcore.h>到<scc_core.h>
- 将scc_lexer_token结构体定义移至该文件

refactor(lexer): 简化token匹配代码格式

- 移除LCC相关的注释内容
- 优化括号符号的token匹配代码格式,使用clang-format控制

refactor(pprocessor): 更新依赖项名称和头文件包含

- 将libcore重命名为scc_core
- 将libutils重命名为scc_utils
- 更新头文件包含路径

refactor(runtime): 重命名libcore为scc_core并重构目录结构

- 将libcore目录重命名为scc_core
- 将libutils目录重命名为scc_utils
- 更新所有相关的头文件包含路径
- 修改cbuild.toml中的包名称
- 更新core_vec.h中的宏定义以支持标准库模式
This commit is contained in:
zzy
2026-01-08 11:22:27 +08:00
parent 09f4ac8de0
commit b753ae0911
40 changed files with 345 additions and 150 deletions

View File

@@ -2,7 +2,7 @@
name = "scc_pprocesser"
dependencies = [
{ name = "libcore", path = "../../runtime/libcore" },
{ name = "libutils", path = "../../runtime/libutils" },
{ name = "scc_core", path = "../../runtime/scc_core" },
{ name = "scc_utils", path = "../../runtime/scc_utils" },
{ name = "lex_parser", path = "../lex_parser" },
]

View File

@@ -1,8 +1,8 @@
#ifndef __SCC_PP_MACRO_H__
#define __SCC_PP_MACRO_H__
#include <libcore.h>
#include <libutils.h>
#include <scc_core.h>
#include <scc_utils.h>
// 宏定义类型
typedef enum {

View File

@@ -1,8 +1,8 @@
#ifndef __SCC_PP_PARSE_H__
#define __SCC_PP_PARSE_H__
#include <libcore.h>
#include <pp_macro.h>
#include <scc_core.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,

View File

@@ -6,9 +6,9 @@
#ifndef __SCC_PP_H__
#define __SCC_PP_H__
#include <libcore.h>
#include <libutils.h>
#include <pp_macro.h>
#include <scc_core.h>
#include <scc_utils.h>
// 条件编译状态
typedef enum {
@@ -59,4 +59,4 @@ typedef struct pp_stream {
scc_probe_stream_t *tmp_stream;
} scc_pp_stream_t;
#endif /* __SMC_PP_H__ */
#endif /* __SCC_PP_H__ */

View File

@@ -1,8 +1,6 @@
#include <lex_parser.h>
#include <libutils.h>
#include <pp_macro.h>
#include <pp_parse.h>
static inline void scc_generate_cstr(scc_cstring_t *buff) {
scc_cstring_t out_buff = scc_cstring_create();
scc_cstring_append_ch(&out_buff, '\"');