neyuki 0.4.0

A small Lua-like scripting language implemented in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
-- Ask questions on the terminal and read the answers.

local io = require("@neyuki/io")

local name = io.prompt("What is your name? ")
if (name == nil or name == "") then name = "stranger" end
io.write("Hello, ", name, "!\n")

local age = io.prompt("How old are you? ", "n")
if (age == nil) then
    io.stderr:write("that was not a number\n")
else
    io.write("In ten years you will be ", age + 10, ".\n")
end