Files
tsl-devkit/docs/tsl/syntax/index.md
T
csh 3d83740f88 Squashed 'docs/standards/playbook/' changes from c3f8137..25d895d
25d895d 🐛 fix(gitea_workflow): clean up temp repos after job steps
2bc3b11 🐛 fix(gitea_workflow): clean up temporary repo dirs in workflows
98c3f30 📝 docs(agent_rules): allow plan execution on current branch
16c7230 📝 docs(prompts): define custom verify layering
8efc4dd 🐛 fix(skills): quote commit-message description
bc8498f 🐛 fix(ci): install tomli for gitea tests
55cda3b 🐛 fix(tests): report missing toml parser clearly
c0729c7 🐛 fix(playbook): import Optional for cli compatibility
63e24bf 📦 deps(skills): sync thirdparty skills
d2f9356 🐛 fix(ci): isolate gitea workflow repos
588b81d 🐛 fix(ci): inline gitea workflow bootstrap
e0b1c3a ♻️ refactor(skills): standardize first-party skill contracts
2c5050d ♻️ refactor(skills): rename repo skills source dir
f049dfb 📦 deps(skills): drop duplicate first-party superpowers skills
234b335  feat(workflow): add superpowers planning and execution state tracking
c1702a6 📝 docs(markdown): format tracked markdown and drop stale templates
2325409 📝 docs(markdown): clarify optional markdownlint usage
214c44e 🔧 chore(markdown): add markdownlint baseline and lint fixes
a22b324 📝 docs(templates): add execution and memory-bank prompt templates
223a797 📝 docs(templates): update README for Claude Code and current features
4ac8672 📝 docs: simplify README + platform-agnostic tools + auto-create local rules
2431c9d 📝 docs: add claude_md config and use cross-platform paths
d64b248 📝 docs: fix README.md inaccuracies and add Claude Code info
c8d6bf2 🐛 fix(playbook): use relative paths in CLAUDE.md when not at project root
6518f0f  feat(playbook): auto-create CLAUDE.md with path discovery
6ec9a45  feat(skills): add skill_link symlink support + platform-agnostic prompt
9f8b6b5 📝 docs: update README and config example for Claude Code support
79cff6c 📝 docs(skills): add Claude Code platform support
452c6f5  feat(playbook): auto-inject AGENTS.md into CLAUDE.md
e1dbf3c 🐛 fix(skills): remove dual-path from commit-message skill
f3a7259 🔧 chore(ci): use prepare_repo.sh in both workflows
da08212 🔧 chore(ci): extract prepare_repo.sh and clean up workflows
7ade85e 🗑️ remove(tsl): drop syntax_book/, data/ source and build script
f94dba0 ♻️ refactor(skills): update playbook.py and tests for thirdparty/ layout
b3df412 ♻️ refactor(skills): separate thirdparty skills into thirdparty/ subdirectory
64950e7 📦 deps(skills): sync thirdparty skills
a2e3cb0  feat(playbook): add no_backup deploy controls
8609d59 🐛 fix(docs): repair reference catalog source links
956da11 🐛 fix(playbook): publish hidden ci test fixes
3f67754 📦 deps(skills): sync thirdparty skills
08ca87b 📦 deps(skills): add karpathy thirdparty sync
96b705b 📝 docs(tsl): rebuild canonical syntax and routing manual
3ed5052 📦 deps(skills): sync thirdparty skills
60108dd 📦 deps(skills): sync thirdparty skills
da85d4e 🐛 fix(thirdparty): prune nested project snapshots
a2a697e 📦 deps(skills): sync thirdparty skills
9df610a 🐛 fix(thirdparty): exclude duplicated superpowers skills
33dd5bb 🐛 fix(thirdparty): preserve optional manifest fields
91b0ea7 🐛 fix(thirdparty): preserve manifest during snapshot update
2e26f98 🔧 chore(thirdparty): generalize skills sync pipeline
5b9c1e3 📦 deps(skills): sync superpowers
2f2d34a 📝 docs(readme): normalize subtree command spacing
62db7db 🐛 fix(ci): serialize superpowers update and sync
3463223 🐛 fix(ci): use literal superpowers sync paths
48f6de8 📦 deps(skills): sync superpowers
4b23529 🔧 chore(ci): merge superpowers update and sync workflow
a56d75b 📦 deps(skills): sync superpowers
84bcefa 🔧 chore(ci): use ci[bot] commit author name
00a07e5 📦 deps(skills): sync superpowers
7b84daf 🐛 fix(templates): enforce main loop progress tracking
51373d7 🔧 chore(ci): automate superpowers sync workflow
eaaa39c 🐛 fix(ci): prevent stale superpowers sync from restoring skills block
79755c6 📦 deps(skills): sync superpowers
836d878 📦 deps(skills): sync superpowers
8216c9f 📦 deps(skills): sync superpowers
9439505 🐛 fix(playbook): address reported repo issues

git-subtree-dir: docs/standards/playbook
git-subtree-split: 25d895d8b3f56624ccfe99ad7289e9eb49e0f316
2026-05-24 13:04:14 +08:00

15 KiB

Syntax Index

文档类型:检索页 是否可直接用于生成代码:否 是否含已验证可执行示例:否 是否含已验证反例:否 遇到不确定时跳转到:02_quickstart.md(优先)、03_core_model.md07_expressions_and_operators.md09_objects_and_classes.md12_pitfalls.md

这里是 TSL 语法手册入口。只处理“语言怎么写”,不处理金融业务语义。

元数据读法

  • 页头里的 是否可直接用于生成代码 是页面级粗判断;真正落代码时,优先看每个代码块自己的 代码块身份
  • 是否可直接用于生成代码 有三种值:仅部分;其中 仅部分 表示这一页同时含有可直接参考的代码块,以及依赖多文件、查找路径或运行时环境的代码块。
  • 是否含已验证可执行示例 只表示这一页存在已跑通的正向代码示例。
  • 是否含已验证反例 只表示这一页存在已经确认不能照写的负例。
  • 代码块身份 固定只用四种值:已验证可执行示例已验证输出片段反例 / 不可照写配置片段 / 概念骨架
  • 如果代码块后面还有用途或限制说明,会单独写成 代码块说明,不继续混进 代码块身份
  • 如果页头里的 遇到不确定时跳转到 给出多个目标,默认第一项是优先入口,后面的目标用于分流或补证。

这本手册怎么读

  • 默认先走“按任务跳转”,不要先顺序读完整套。
  • 只有刻意系统学习时,才按下面的“推荐读法”顺序进入。
  • 当前这套正式语法手册不再只覆盖主线入门,而是负责完整吸收旧 8 个语言章节。

如果你马上要写 TSL

  1. 02_quickstart.md(先看语言核心事实速查和最短骨架)
  2. 03_core_model.md
  3. 06_functions_and_calls.md
  4. 12_pitfalls.md
  5. 涉及较新写法时,按主题跳到对应专题页

推荐读法

  1. 01_introduction.md
  2. 02_quickstart.md
  3. 03_core_model.md
  4. 04_values_and_literals.md
  5. 05_variables_and_constants.md
  6. 06_functions_and_calls.md
  7. 07_expressions_and_operators.md
  8. 08_control_flow.md
  9. 09_objects_and_classes.md
  10. 10_units_and_scope.md
  11. 11_runtime_context_and_with.md
  12. 12_pitfalls.md
  13. 13_matrix_and_collections.md
  14. 14_resultset_and_filters.md
  15. 15_ts_sql.md
  16. 16_debug_and_profiler.md 这条顺序对应“先建立整体读法,再写值、变量、函数、表达式、流程,随后进入类、unit、运行时边界,再按需进入进阶专题”。

编号说明:主线 01-16,深水 18-32,无 17 号正文页;历史 17 号位保留为空。

深水专题

以下专题默认不要预读。只有主线页不够、或者任务已经明确命中对应场景时,再进入。

专题 什么时候进入
18_lexical_structure_and_compile_options.md 只有涉及注释规则、条件编译、编译选项或词法边界时才读
19_types_and_conversions.md 只有涉及显式类型、转换规则或类型兼容问题时才读
20_strings_and_text.md 只有涉及字符串处理、编码或文本细节时才读
21_external_calls_and_threads.md 只有涉及 external、DLL、线程或外部调用时才读
22_namespace_libpath_and_unit_runtime.md 只有涉及 namespaceLibpath、unit 运行时或查找路径时才读
23_object_runtime_and_introspection.md 只有涉及对象运行时、自省或反射能力时才读
24_builtin_runtime_objects.md 只有涉及内置运行时对象时才读
25_set_operations.md 只有涉及集合运算专题时才读
26_matrix_deep_dive.md 只有涉及矩阵运算且 13_matrix_and_collections.md 不够用时才读
27_fmarray.md 只有涉及 FMArray 专题时才读
28_ts_sql_core.md 只有开始写 TS-SQL 核心语法时才读
29_ts_sql_advanced.md 只有 TS-SQL 基础页不够、问题进入进阶能力时才读
30_runtime_services_and_global_cache.md 只有涉及网格计算、运行时服务或全局缓存时才读
31_complex_and_weakref.md 只有涉及复数或弱引用时才读
32_object_overloads_and_iteration.md 只有涉及对象算符重载或遍历重载时才读

这组页面承担旧 8 章里没有被主线正文完整吃掉的深水内容,目标是让新 session 只靠 docs/tsl/syntax/ 就能覆盖旧语法章节,但默认首跳仍应先走主线页。

按任务跳转

当前任务 先读哪里
先建立整体读法 01_introduction.md
写最短骨架 02_quickstart.md
判断顶层模型 / 文件模型 03_core_model.md
写值、数组、字符串 04_values_and_literals.md
写变量、常量、显式声明 05_variables_and_constants.md
function / procedure、参数修饰、默认参数、命名参数、变参、external 06_functions_and_calls.md
写赋值、比较、if 表达式 07_expressions_and_operators.md
?. 等较新表达式 07_expressions_and_operators.md
写条件、循环、异常控制 08_control_flow.md
写类、继承、property、静态字段 09_objects_and_classes.md
unit / uses 10_units_and_scope.md
写运行时环境参数、SysParams[...]#Func() with array(...) 11_runtime_context_and_with.md
先避开高频误写 12_pitfalls.md
写数组扩展、键表、矩阵样数据 13_matrix_and_collections.md
写结果集过滤专题 14_resultset_and_filters.md
写 TS-SQL 专题 15_ts_sql.md
看调试与 profiler 专题 16_debug_and_profiler.md
看词法、注释、编译选项 18_lexical_structure_and_compile_options.md
看类型与转换 19_types_and_conversions.md
看字符串与编码专题 20_strings_and_text.md
external、DLL 与多线程 21_external_calls_and_threads.md
namespace、单元运行时、Libpath、查找路径 22_namespace_libpath_and_unit_runtime.md
看对象运行时和反射 23_object_runtime_and_introspection.md
看运行时内置对象 24_builtin_runtime_objects.md
看集合运算 25_set_operations.md
看矩阵深水专题 26_matrix_deep_dive.md
FMArray 27_fmarray.md
看 TS-SQL 基础 28_ts_sql_core.md
看 TS-SQL 进阶 29_ts_sql_advanced.md
看网格计算与全局缓存 30_runtime_services_and_global_cache.md
看复数与弱引用 31_complex_and_weakref.md
看对象算符与遍历重载 32_object_overloads_and_iteration.md
看较新表达式或表达式边界 07_expressions_and_operators.md
看较新对象能力或类边界 09_objects_and_classes.md
看资料冲突 / 解释器差异 先留在当前页,对照上面的主线与深水进入条件后,再按主题进入相应页面
看高频误写 / 反例 / 负向边界 12_pitfalls.md
看正式语法手册当前覆盖范围与成熟度 coverage_map.md

旧 8 章在正式手册中的落点

  • 01_language_basics.md:主线落在 01 03 04 05 07 11 13,深水落在 18 19 20
  • 02_control_flow.md:主线落在 08,调试与性能补充落在 16
  • 03_functions.md:主线落在 06,系统交互补充落在 21
  • 04_modules_and_namespace.md:主线落在 10,单元运行时与查找路径补充落在 22
  • 05_object_model.md:主线落在 09,运行时 / 内置对象 / 重载补充落在 23 24 32
  • 06_extended_syntax.md:主线入口在 13 14 15,深水落在 25 26 27 28 29
  • 07_debug_and_profiler.md:入口在 16,服务层运行时补充落在 30
  • 08_new_generation.md:表达式与对象主线落在 07 09,复数 / 弱引用 / 对象重载落在 31 32

切换到别的层