silt-lua 0.1.1

A pure rust Lua interpreter and virtual machine
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-- test local scope index is correctly evaluated in compiler
do
    function test(bool)
        local x = 1
        local b = 4
        if bool then
            local d = 5
            local e = 6
            local f = 7
            x = x + e
        end
        x = x + b
        return x
    end

    return test(true) + test(false) -- 11 + 5 = 16
end