moonscript/tests/inputs/local.moon

84 lines
688 B
Plaintext

do
local a
local a,b,c
b,g = 23232
do
x = 1212
something = ->
local x
x = 1212
do
local *
y = 2323
z = 2323
do
local *
print "Nothing Here!"
do
local ^
x = 3434
y = 3434
X = 3434
Y = "yeah"
do
local ^
x,y = "a", "b"
do
local *
x,y = "a", "b"
do
local *
if something
x = 2323
do
local *
do
x = "one"
x = 100
do
x = "two"
do
local *
k = if what
10
x = 100
{:a,:b, :c} = y
do
local *
a = 100
print "hi"
b = 200
local *
c = 100
print "hi"
d = 200
d = 2323
do
local *
-- this generates a nil value in the body
for a in *{} do a
g = 2323 -- test if anything leaked