moonscript/spec/inputs/local.moon

95 lines
786 B
Plaintext
Raw Permalink Normal View History

do
local a
local a,b,c
b,g = 23232
do
x = 1212
something = ->
local x
x = 1212
2013-01-12 18:33:12 +00:00
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
2016-09-25 19:08:10 +00:00
do
local ^
lowercase = 5
Uppercase = 3
class One
Five = 6
class Two
class No
do
local *
-- this generates a nil value in the body
for a in *{} do a
g = 2323 -- test if anything leaked