🐛 fix(tsl_syntax): repair lookup engine and reconcile reference facts

lookup.py: exempt code-anchored ASCII identifiers from the mixed
zh/en gate so exact hits are no longer dropped; dedup parent/child
sections in results; validate write-prelude anchors in --check.

references: correct interpreter-verified facts (case-as-expression,
control-flow semicolons, __line__/__stack_frame, tslObjects order,
destroy timing, ErrDefine, truncated outputs), fix headings, scope
qualifiers and reversed quotes; strip dead preamble metadata from all
24 pages.

packaging: exclude __pycache__/*.pyc from playbook and bundle copies;
update build test file-count assertion to match.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
csh
2026-07-13 09:16:57 +08:00
co-authored by Claude Fable 5
parent 923bce91b0
commit b597edfc70
29 changed files with 356 additions and 256 deletions
@@ -1,10 +1,5 @@
# TSL 值与字面量
文档类型:语法主线
是否可直接用于生成代码:是
是否含可直接照写示例:是
是否含不可照写反例:是
这一篇整理基本类型、字面量、数组、字符串、字符串编码边界与基础值模型,避免把值规则分散在函数或金融示例里。
## 本篇职责
@@ -470,8 +465,7 @@ writeLn(result);
说明:
- `%d` 是整数占位符
- `%s` 是字符串占位符
- 示例里的 `%d` / `%s` 分别对应整数、字符串占位;只为读懂本例
- `format` 的完整占位符规范使用 `tsl-api-reference` skill 按名查询。
### `formatdatetime` 日期格式化
@@ -494,9 +488,7 @@ writeLn(result);
说明:
- `yyyy` 表示四位年
- `mm` 表示两位月份
- `dd` 表示两位日期
- 示例里的 `yyyy-mm-dd` 对应四位年、两位月、两位日;只为读懂本例
- `formatdatetime` 的完整格式说明使用 `tsl-api-reference` skill 按名查询。
## 默认生成模板