Files
scc/runtime/libcore/include/libcore.h
zzy 871d031ceb feat(lex_parser): 初始化词法解析器模块
新增词法解析器库 `smcc_lex_parser`,包含基础的词法规则解析功能:
- 支持字符、字符串、数字、标识符的解析
- 支持跳过注释、空白符、行尾等辅助函数
- 提供对应的单元测试用例,覆盖各类合法与非法输入情况

该模块依赖 `libcore`,并被 `smcc_lex` 模块引用以支持更上层的词法分析逻辑。
2025-11-23 22:53:46 +08:00

30 lines
582 B
C

#ifndef __SMCC_CORE_H__
#define __SMCC_CORE_H__
#include <core_impl.h>
#include <core_macro.h>
#include <core_mem.h>
#define __SMCC_LOG_NO_STD_IMPL__
#ifndef log_snprintf
#define log_snprintf smcc_snprintf
#endif
#ifndef log_printf
#define log_printf smcc_eprintf
#endif
#ifndef log_exit
#define log_exit smcc_exit
#endif
#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_pos.h>
#include <core_str.h>
#include <core_stream.h>
#include <core_vec.h>
#endif // __SMCC_CORE_H__