将 lexer_stream 抽象为 core_stream,统一运行时核心组件的输入流模型。 移除了旧的 `lexer_stream.h` 定义,并将其功能完整迁移至 `core_stream.h` 中。 更新了内存流实现以适配新的 core_stream 接口,并修复部分资源释放问题。 同时调整日志模块包含方式,增强模块间解耦能力。 此变更影响词法分析器对输入流的操作方式,所有涉及 stream 的类型与函数均已替换为 core 前缀版本。 测试用例同步更新并验证通过。
22 lines
475 B
C
22 lines
475 B
C
#ifndef __SMCC_CORE_H__
|
|
#define __SMCC_CORE_H__
|
|
|
|
#include <core_mem.h>
|
|
#include <core_impl.h>
|
|
#include <core_macro.h>
|
|
|
|
#define __SMCC_LOG_NO_STD_IMPL__
|
|
#define log_snprintf smcc_snprintf
|
|
#define log_printf smcc_eprintf
|
|
#define log_exit smcc_exit
|
|
#include <log.h>
|
|
|
|
#define _SMCC_STR(str) #str
|
|
#define SMCC_STR(str) _SMCC_STR(str)
|
|
|
|
#define SMCC_ARRLEN(arr) (sizeof(arr) / sizeof(arr[0]))
|
|
#include <core_str.h>
|
|
#include <core_stream.h>
|
|
|
|
#endif // __SMCC_CORE_H__
|