渲染zh-Hant

The language corpus

Faber 語言語料庫是公開的語言字典:每個關鍵字、運算子群組或語言型別表面各有一個頂層目錄。它是 faber explain 的開發來源,也是多目標編譯矩陣的主要輸入。

統計#

  • 292 個 .fab 範例檔案
  • index.toml 中有 174 個註冊術語
  • 約 135 個關鍵字與概念目錄

目錄結構#

corpus/
  函式/           # function keyword exemplars
  類型/             # record type exemplars
  若/                # conditional branch exemplars
  遍歷/             # iteration exemplars
  列表/ 表格/     # collection type exemplars
  張量/ 稀疏/    # 張量 exemplars
  端點/                # capability call exemplars
  operatores/        # glyph / operator groups
  ...
  index.toml         # generated explain manifest

檔案格式#

每個 .fab 檔案都以描述該術語的 TOML 前置資料開頭:

+++
term = "functio"
kind = "keyword"
category = "function"
canonical = true
summary = "Declares a named function or method."
syntax = "functio <name>(<params>) [modifiers] [→ <type>] [⇥ <error-type>] <block>"
aliases = ["function"]
related = ["→", "⇥", "redde", "sponte"]
+++

函式 saluta() {
    註記 "Salve, Mundus!"
}

用法#

faber explain 函式       # show keyword reference
faber explain ≡             # show glyph reference
faber explain --search query # search across corpus
faber explain --list         # list all terms

分類#

術語依分類組織:function、control-flow、type、collection、transfer、annotation、iteration、destructuring、testing、命令行、concept、operator-group、existing-home。