From e4f8d1b3b075323968bb6dc334226dff33c0a2b0 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Tue, 3 Feb 2026 22:42:37 +0800 Subject: Updated doc. --- doc/docs/zh/doc/index.md | 18 +++++++++--------- doc/docs/zh/index.md | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'doc/docs/zh') diff --git a/doc/docs/zh/doc/index.md b/doc/docs/zh/doc/index.md index dff51a9..5250325 100755 --- a/doc/docs/zh/doc/index.md +++ b/doc/docs/zh/doc/index.md @@ -2858,7 +2858,7 @@ thing = { width: 123 } -thing_copy = \{k, v for k, v in pairs thing} +thing_copy = {k, v for k, v in pairs thing} ``` @@ -2869,7 +2869,7 @@ no_color = {k, v for k, v in pairs thing when k != "color"} ```yue -no_color = \{k, v for k, v in pairs thing when k != "color"} +no_color = {k, v for k, v in pairs thing when k != "color"} ``` @@ -2884,7 +2884,7 @@ sqrts = {i, math.sqrt i for i in *numbers} ```yue numbers = [1, 2, 3, 4] -sqrts = \{i, math.sqrt i for i in *numbers} +sqrts = {i, math.sqrt i for i in *numbers} ``` @@ -2901,7 +2901,7 @@ tbl = {unpack tuple for tuple in *tuples} ```yue tuples = [ ["hello", "world"], ["foo", "bar"]] -tbl = \{unpack tuple for tuple in *tuples} +tbl = {unpack tuple for tuple in *tuples} ``` @@ -3588,7 +3588,7 @@ switch item ```yue -item = \{} +item = {} {pos: {:x = 50, :y = 200}} = item -- 获取错误:尝试索引nil值(字段'pos') @@ -3748,7 +3748,7 @@ class Inventory ```yue class Inventory new: => - @items = \{} + @items = {} add_item: (name) => if @items[name] @@ -4463,7 +4463,7 @@ tbl = { ```yue -tbl = \{ +tbl = { key: do print "分配键值!" 1234 @@ -4501,7 +4501,7 @@ run_callback my_object\write ```yue -my_object = \{ +my_object = { value: 1000 write: => print "值为:", @value } @@ -4698,7 +4698,7 @@ to_lua: function(code: string, config?: Config): | --- | --- | | string \| nil | 编译后的 Lua 代码,如果编译失败则为 nil。 | | string \| nil | 错误消息,如果编译成功则为 nil。 | -| \{\{string, integer, integer}} \| nil | 代码中出现的全局变量(带有名称、行和列),如果编译器选项 `lint_global` 为 false 则为 nil。 | +| {{string, integer, integer}} \| nil | 代码中出现的全局变量(带有名称、行和列),如果编译器选项 `lint_global` 为 false 则为 nil。 | #### file_exist diff --git a/doc/docs/zh/index.md b/doc/docs/zh/index.md index 6d677e9..9068956 100644 --- a/doc/docs/zh/index.md +++ b/doc/docs/zh/index.md @@ -15,8 +15,8 @@ features: details: 更精简的语法,编译为可读 Lua,输出可预测、易集成。 - title: 现代语言特性 details: 管道、模式匹配、切片与解构,同时保留 Lua 互操作性。 - - title: 内置工具链 - details: 在线 Playground、语法高亮与同步更新的文档。 + - title: 快速迭代 + details: 虚心接受用户反馈,以帮助改进和加速语言的开发和演进! footer: MIT Licensed | Copyright © 2017-2026 Li Jin --- -- cgit v1.2.3-55-g6feb