diff options
| author | Li Jin <dragon-fly@qq.com> | 2020-01-25 17:52:36 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2020-01-25 17:52:36 +0800 |
| commit | 27717564cb1ab72c88c10a8392b6795ddea7a0ef (patch) | |
| tree | 3a6d48b516e3fefb81cc140a7bd3bed86bf339e3 | |
| parent | ed317e62eb1cf98fde4461fc90c6cb1045ebc7e8 (diff) | |
| download | yuescript-27717564cb1ab72c88c10a8392b6795ddea7a0ef.tar.gz yuescript-27717564cb1ab72c88c10a8392b6795ddea7a0ef.tar.bz2 yuescript-27717564cb1ab72c88c10a8392b6795ddea7a0ef.zip | |
update readme.
| -rw-r--r-- | README.md | 24 |
1 files changed, 12 insertions, 12 deletions
| @@ -47,18 +47,7 @@ if print and (x ~= nil) then | |||
| 47 | end | 47 | end |
| 48 | ``` | 48 | ``` |
| 49 | 49 | ||
| 50 | * Can do slash call with Lua keywords. Generate codes from: | 50 | * Add more features for `import` keyword. Will compile codes from: |
| 51 | ```Moonscript | ||
| 52 | c.repeat.if\then("xyz")\else res | ||
| 53 | ``` | ||
| 54 |   to: | ||
| 55 | ```Lua | ||
| 56 | local _call_3 = c["repeat"]["if"] | ||
| 57 | local _call_4 = _call_3["then"](_call_3, "xyz") | ||
| 58 | _call_4["else"](_call_4, res) | ||
| 59 | ``` | ||
| 60 | |||
| 61 | * Add more usage for `import` keyword. Will compile codes from: | ||
| 62 | ```Moonscript | 51 | ```Moonscript |
| 63 | import 'module' | 52 | import 'module' |
| 64 | import "module.part" | 53 | import "module.part" |
| @@ -79,6 +68,17 @@ do | |||
| 79 | end | 68 | end |
| 80 | ``` | 69 | ``` |
| 81 | 70 | ||
| 71 | * Can do slash call with Lua keywords. Generate codes from: | ||
| 72 | ```Moonscript | ||
| 73 | c.repeat.if\then("xyz")\else res | ||
| 74 | ``` | ||
| 75 |   to: | ||
| 76 | ```Lua | ||
| 77 | local _call_3 = c["repeat"]["if"] | ||
| 78 | local _call_4 = _call_3["then"](_call_3, "xyz") | ||
| 79 | _call_4["else"](_call_4, res) | ||
| 80 | ``` | ||
| 81 | |||
| 82 | * Add feature of `reusing variable` which helps generate reduced Lua codes. For example, MoonPlus will generate codes from: | 82 | * Add feature of `reusing variable` which helps generate reduced Lua codes. For example, MoonPlus will generate codes from: |
| 83 | ```Moonscript | 83 | ```Moonscript |
| 84 | with leaf | 84 | with leaf |
