From bac1d919252f851151f165f48ace2691fc79e1a7 Mon Sep 17 00:00:00 2001 From: jinzhongjia Date: Sun, 19 Nov 2023 19:45:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BE=A7=E8=BE=B9=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- learn/.vitepress/sidebar.ts | 370 +++++++++++++++++++----------------- learn/advanced/async.md | 2 +- 2 files changed, 196 insertions(+), 176 deletions(-) diff --git a/learn/.vitepress/sidebar.ts b/learn/.vitepress/sidebar.ts index 439f5c54..c8e8ffdc 100644 --- a/learn/.vitepress/sidebar.ts +++ b/learn/.vitepress/sidebar.ts @@ -1,182 +1,202 @@ import { DefaultTheme } from "vitepress"; export default [ - { - text: "前言", - link: "/prologue", - }, - { - text: "什么是 Zig ?", - link: "/what-is-zig", - }, + { + text: "前言", + link: "/prologue", + }, + { + text: "什么是 Zig ?", + link: "/what-is-zig", + }, - { - text: "环境配置", - items: [ - { - text: "安装 Zig 环境", - link: "/environment/install-environment", - }, - { - text: "编辑器选择", - link: "/environment/editor", - }, - { - text: "zig 命令", - link: "/environment/zig-command", - }, - ], - }, - { - text: "Hello World", - link: "/basic/hello-world", - }, - { - text: "基础学习", - items: [ - { - text: "变量声明", - link: "/basic/define-variable", - }, + { + text: "环境配置", + items: [ + { + text: "安装 Zig 环境", + link: "/environment/install-environment", + }, + { + text: "编辑器选择", + link: "/environment/editor", + }, + { + text: "zig 命令", + link: "/environment/zig-command", + }, + ], + }, + { + text: "Hello World", + link: "/basic/hello-world", + }, + { + text: "基础学习", + items: [ + { + text: "变量声明", + link: "/basic/define-variable", + }, - { - text: "基本类型", - collapsed: true, - items: [ - { - text: "数值类型", - link: "/basic/basic_type/number", - }, - { - text: "字符与布尔值", - link: "/basic/basic_type/char-and-boolean", - }, - { - text: "函数", - link: "/basic/basic_type/function", - }, - ], - }, - { - text: "高级类型", - collapsed: true, - items: [ - { - text: "数组", - link: "/basic/advanced_type/array", - }, - { - text: "指针", - link: "/basic/advanced_type/pointer", - }, - { - text: "切片", - link: "/basic/advanced_type/silce", - }, - { - text: "结构体", - link: "/basic/advanced_type/struct", - }, - { - text: "枚举", - link: "/basic/advanced_type/enum", - }, - ], - }, - { - text: "联合类型", - link: "/basic/union", - }, - { - text: "流程控制", - collapsed: true, - items: [ - { - text: "条件", - link: "/basic/process_control/decision", - }, - { - text: "循环", - link: "/basic/process_control/loop", - }, - { - text: "switch匹配", - link: "/basic/process_control/switch", - }, - ], - }, + { + text: "基本类型", + collapsed: true, + items: [ + { + text: "数值类型", + link: "/basic/basic_type/number", + }, + { + text: "字符与布尔值", + link: "/basic/basic_type/char-and-boolean", + }, + { + text: "函数", + link: "/basic/basic_type/function", + }, + ], + }, + { + text: "高级类型", + collapsed: true, + items: [ + { + text: "数组", + link: "/basic/advanced_type/array", + }, + { + text: "指针", + link: "/basic/advanced_type/pointer", + }, + { + text: "切片", + link: "/basic/advanced_type/silce", + }, + { + text: "结构体", + link: "/basic/advanced_type/struct", + }, + { + text: "枚举", + link: "/basic/advanced_type/enum", + }, + ], + }, + { + text: "联合类型", + link: "/basic/union", + }, + { + text: "流程控制", + collapsed: true, + items: [ + { + text: "条件", + link: "/basic/process_control/decision", + }, + { + text: "循环", + link: "/basic/process_control/loop", + }, + { + text: "switch匹配", + link: "/basic/process_control/switch", + }, + ], + }, - { - text: "可选类型", - link: "/basic/optional_type", - }, - { - text: "错误处理", - link: "/basic/error_handle", - }, - ], - }, - { - text: "进阶学习", - items: [ - { - text: "类型转换", - link: "/advanced/type_cast", - }, - { - text: "内存管理", - link: "/advanced/memory_manage", - }, - { - text: "异步", - link: "/advanced/async", - }, - { - text: "模块系统", - link: "/advanced/module-system", - }, - { - text: "编译期", - link: "/advanced/comptime", - }, - { - text: "汇编", - link: "/advanced/assembly", - }, - { - text: "与 C 交互", - link: "/advanced/interact-with-c", - }, - ], - }, - { - text: "工程化", - items: [ - { - text: "构建系统", - link: "/engineering/build-system", - }, - { - text: "单元测试", - link: "/engineering/unit-test", - }, - ], - }, - { - text: "附录", - items: [ - // { - // text: "后记", - // link: "/epilogue", - // }, - { - text: "社区", - link: "/appendix/community", - }, - { - text: "第三方库", - link: "/appendix/well-known-lib", - }, - ], - }, + { + text: "可选类型", + link: "/basic/optional_type", + }, + { + text: "错误处理", + link: "/basic/error_handle", + }, + ], + }, + { + text: "进阶学习", + items: [ + { + text: "类型转换", + link: "/advanced/type_cast", + }, + { + text: "内存管理", + link: "/advanced/memory_manage", + }, + { + text: "异步", + link: "/advanced/async", + }, + { + text: "模块系统", + link: "/advanced/module-system", + }, + { + text: "编译期", + link: "/advanced/comptime", + }, + { + text: "汇编", + link: "/advanced/assembly", + }, + { + text: "与 C 交互", + link: "/advanced/interact-with-c", + }, + ], + }, + { + text: "工程化", + items: [ + { + text: "构建系统", + link: "/engineering/build-system", + }, + { + text: "单元测试", + link: "/engineering/unit-test", + }, + ], + }, + { + text: "更多", + items: [ + { + text: "什么是“命名空间”", + }, + { + text: "零位类型", + }, + { + text: "原子操作", + }, + { + text: "未定义行为", + }, + { + text:"风格指南" + } + ], + }, + { + text: "附录", + items: [ + // { + // text: "后记", + // link: "/epilogue", + // }, + { + text: "社区", + link: "/appendix/community", + }, + { + text: "第三方库", + link: "/appendix/well-known-lib", + }, + ], + }, ] as DefaultTheme.Sidebar; diff --git a/learn/advanced/async.md b/learn/advanced/async.md index 02aac9f3..620bd753 100644 --- a/learn/advanced/async.md +++ b/learn/advanced/async.md @@ -4,4 +4,4 @@ outline: deep # 异步 -当前的异步处于冻结状态,在未来可用时将会更新此部分内容! \ No newline at end of file +当前的异步处于冻结状态,在未来可用时将会更新此部分内容!