An Overview of YueScript failed to run
Open
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 613
- Forks
- 45
- PR merge metrics
- No merged PRs in 30d
Description
The sample code from https://yuescript.org/doc/#an-overview-of-yuescript:
-- import syntax
import "yue" as :p, :to_lua
-- object literals
inventory =
equipment:
* "sword"
* "shield"
items:
* name: "potion"
count: 10
* name: "bread"
count: 3
-- pipe operator
[1, 2, 3]
|> map (x) -> x * 2
|> filter (x) -> x > 4
|> reduce 0, (a, b) -> a + b
|> print
-- metatable manipulation
apple =
size: 15
<index>:
color: 0x00ffff
with apple
p .size, .color, .<index> if .<>?
-- js-like export syntax
export 🌛 = "月之脚本"
yue -e test.yue
test.yue:16: attempt to call a nil value (global 'map')
Stack Traceback
===============
(1) global C function 'xpcall'
(2) '=(yuescript)':110
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the “An Overview of YueScript” sample at the linked documentation page and reproduce it from test.yue using yue -e test.yue. Determine why the pipe example reaches a nil global map; done means the documented sample runs without that error, or the documentation reflects the supported behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- compilers, documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100