Skip to content

Commit

Permalink
add: add lua.
Browse files Browse the repository at this point in the history
Signed-off-by: Eglinux <eg@mac.local>
  • Loading branch information
Eglinux committed Jul 7, 2023
1 parent b26ea9d commit 10a7247
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# eglinux
www.eglinux.com source code
www.eglinux.com source code
55 changes: 55 additions & 0 deletions docs/lua/index.md
Original file line number Diff line number Diff line change
@@ -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
>
```
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ nav:
- python/index.md
- Qt:
- qt/index.md
- Lua:
- lua/index.md


copyright: >
Expand Down

0 comments on commit 10a7247

Please sign in to comment.