rilua 0.1.21

Lua 5.1.1 implemented in Rust, targeting the World of Warcraft addon variant.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
-- A short script that exercises basic Lua features.

local greeting = "Hello from rilua!"
print(greeting)

local function factorial(n)
    if n <= 1 then return 1 end
    return n * factorial(n - 1)
end

for i = 1, 5 do
    print(string.format("  %d! = %d", i, factorial(i)))
end