From 10a7247648686ba38849bcc43eb933410daf4b14 Mon Sep 17 00:00:00 2001 From: Eglinux Date: Fri, 7 Jul 2023 20:22:56 +0800 Subject: [PATCH] add: add lua. Signed-off-by: Eglinux --- README.md | 2 +- docs/lua/index.md | 55 +++++++++++++++++++++++++++++++++++++++++++++++ mkdocs.yml | 2 ++ 3 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 docs/lua/index.md diff --git a/README.md b/README.md index 955763f..17774e3 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ # eglinux -www.eglinux.com source code +www.eglinux.com source code \ No newline at end of file diff --git a/docs/lua/index.md b/docs/lua/index.md new file mode 100644 index 0000000..c110acd --- /dev/null +++ b/docs/lua/index.md @@ -0,0 +1,55 @@ +--- +title: Lua +description: 上善若水,水善利万物而不争! +icon: simple/lua +--- + +# Lua + +上善若水,水善利万物而不争! + +``` shell +╭─eg@mac ~ +╰─$ lua +Lua 5.4.6 Copyright (C) 1994-2023 Lua.org, PUC-Rio +> print("Hello, world") +Hello, world +> +``` + +Lua 保留字: + +``` lua +and break do else elseif +end false goto for function +if in local nil not +or repeat return then true +until while +``` + +Lua 基本类型: + +``` shell +╭─eg@mac ~ +╰─$ lua +Lua 5.4.6 Copyright (C) 1994-2023 Lua.org, PUC-Rio +> type(nil) +nil +> type(true) +boolean +> type(10.4 * 3) +number +> type("Hello world") +string +> type(io.stdin) +userdata +> type(print) +function +> type(type) +function +> type({}) +table +> type(type(X)) +string +> +``` \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 5bedb89..7a4a006 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -215,6 +215,8 @@ nav: - python/index.md - Qt: - qt/index.md + - Lua: + - lua/index.md copyright: >