Skip to content

Commit 54da2fe

Browse files
committed
Lua5.4手册,目录部分
1 parent d03a015 commit 54da2fe

2 files changed

Lines changed: 184 additions & 40 deletions

File tree

docs/.vuepress/config.js

Lines changed: 41 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -16,59 +16,28 @@ export default defineUserConfig({
1616
},
1717
{
1818
text: 'Redis',
19-
children: [
20-
{
21-
text: '教程',
22-
link: '/redis/basics/',
23-
},
24-
{
25-
text: '剖析',
26-
link: '/redis/source/',
27-
},
28-
{
29-
text: '注释',
30-
link: 'https://github.com/O256/redis',
31-
}
32-
],
19+
link: '/redis/basics/',
3320
},
3421
{
3522
text: 'Git',
36-
children: [
37-
{
38-
text: '教程',
39-
link: '/git/basics/',
40-
},
41-
{
42-
text: '剖析',
43-
link: '/git/source/',
44-
}
45-
],
23+
link: '/git/basics/',
4624
},
4725
{
4826
text: '优秀作文',
49-
children: [
50-
{
51-
text: '三年级',
52-
link: '/essay/grade3/content/plants.md',
53-
},
54-
{
55-
text: '四年级',
56-
link: '/essay/grade4/content/animals.md',
57-
},
58-
{
59-
text: '五年级',
60-
link: '/essay/grade5/content/animals.md',
61-
},
62-
],
27+
link: '/essay/grade3/content/plants.md',
6328
},
6429
{
6530
text: 'Markdown',
6631
link: '/markdown/cheatsheet.md',
6732
},
33+
{
34+
text: 'Lua',
35+
link: '/lua/reference.md',
36+
},
6837
],
6938

7039
sidebar: {
71-
'/essay/grade3/': [
40+
'/essay/': [
7241
{
7342
text: '三年级',
7443
link: '/essay/grade3/content/plants.md',
@@ -77,9 +46,9 @@ export default defineUserConfig({
7746
text: '优秀范文',
7847
link: '/essay/grade3/content/plants.md',
7948
children: [
49+
'/essay/grade3/content/plants.md',
8050
'/essay/grade3/content/animals.md',
8151
'/essay/grade3/content/characters.md',
82-
'/essay/grade3/content/plants.md',
8352
]
8453
},
8554
{
@@ -91,6 +60,14 @@ export default defineUserConfig({
9160
},
9261
],
9362
},
63+
{
64+
text: '四年级',
65+
link: '/essay/grade4/index.md',
66+
},
67+
{
68+
text: '五年级',
69+
link: '/essay/grade5/index.md',
70+
},
9471
],
9572
'/markdown/': [
9673
{
@@ -108,6 +85,30 @@ export default defineUserConfig({
10885
]
10986
},
11087
],
88+
'/redis/': [
89+
{
90+
text: 'Redis',
91+
link: '/redis/basics/',
92+
},
93+
],
94+
'/git/': [
95+
{
96+
text: 'Git',
97+
link: '/git/basics/',
98+
},
99+
],
100+
'/lua/': [
101+
{
102+
text: 'Lua',
103+
link: '/lua/reference.md',
104+
children: [
105+
{
106+
text: '参考手册',
107+
link: '/lua/reference.md',
108+
},
109+
],
110+
},
111+
],
111112
},
112113
}),
113114

docs/lua/reference.md

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
# Lua 5.4 参考手册
2+
3+
## 1. 简介
4+
5+
## 2. 基本概念
6+
7+
### 2.1 值和类型
8+
9+
### 2.2 环境变量
10+
11+
### 2.3 错误处理
12+
13+
### 2.4 元表和元方法
14+
15+
### 2.5 垃圾回收
16+
17+
#### 2.5.1 增量式回收
18+
19+
#### 2.5.2 迭代式回收
20+
21+
#### 2.5.3 元方法回收
22+
23+
#### 2.5.4 弱表回收
24+
25+
### 2.6 协程
26+
27+
## 3. 语言
28+
29+
### 3.1 约定
30+
31+
### 3.2 变量
32+
33+
### 3.3 语句
34+
35+
#### 3.3.1 语句块
36+
37+
#### 3.3.2 代码块
38+
39+
#### 3.3.3 赋值
40+
41+
#### 3.3.4 控制结构
42+
43+
#### 3.3.5 For 循环
44+
45+
#### 3.3.6 函数调用
46+
47+
#### 3.3.7 局部声明
48+
49+
#### 3.3.8 待回收变量
50+
51+
### 3.4 表达式
52+
53+
#### 3.4.1 算术运算符
54+
55+
#### 3.4.2 位运算
56+
57+
#### 3.4.3 类型转换
58+
59+
#### 3.4.4 关系运算符
60+
61+
#### 3.4.5 逻辑运算符
62+
63+
#### 3.4.6 连接运算符
64+
65+
#### 3.4.7 长度运算符
66+
67+
#### 3.4.8 运算符优先级
68+
69+
#### 3.4.9 表构造器
70+
71+
#### 3.4.10 函数调用
72+
73+
#### 3.4.11 函数定义
74+
75+
#### 3.4.12 语句列表、多返回值及其调整
76+
77+
### 3.5 作用范围
78+
79+
## 4. C接口
80+
81+
### 4.1 堆栈
82+
83+
#### 4.1.1 堆栈大小
84+
85+
#### 4.1.2 有效索引
86+
87+
#### 4.1.3 字符串指针
88+
89+
### 4.2 闭包
90+
91+
### 4.3 注册表
92+
93+
### 4.4 错误处理函数
94+
95+
#### 4.4.1 状态码
96+
97+
### 4.5 协同程序
98+
99+
### 4.6 函数和类型
100+
101+
### 4.7 调试接口
102+
103+
## 5. 库函数
104+
105+
### 5.1 函数和类型
106+
107+
## 6. 标准库
108+
109+
### 6.1 基础函数
110+
111+
### 6.2 协程操作
112+
113+
### 6.3 模块
114+
115+
### 6.4 字符串操作
116+
117+
#### 6.4.1 模式匹配
118+
119+
#### 6.4.2 格式化
120+
121+
### 6.5 UTF-8 支持
122+
123+
### 6.6 表操作
124+
125+
### 6.7 数学函数
126+
127+
### 6.8 输入输出
128+
129+
### 6.9 操作系统
130+
131+
### 6.10 调试库
132+
133+
## 7. 独立程序
134+
135+
## 8. 兼容性
136+
137+
### 8.1 语言不
138+
139+
### 8.2 库
140+
141+
### 8.3 API
142+
143+
## 9. 完整语法

0 commit comments

Comments
 (0)