stage1 重构词法分析

This commit is contained in:
zzy
2026-08-16 23:23:56 +08:00
parent d3c63dab5c
commit 4d9509c167
8 changed files with 426 additions and 2151 deletions

View File

@@ -77,6 +77,8 @@ static inline usize map_hash_str(const char *s) {
for (usize(idx) = 0; (idx) < (map).cap; ++(idx)) \
if ((map).data[(idx)].state == __MAP_SLOT_OCCUPIED)
#define unsafe_map_at(map, idx) ((map).data[(idx)])
/**
* 插入(若键已存在则更新值)
* 注意:扩容使用 realloc失败会 abort可自行修改错误处理