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: >