Start getting block scope working.

This commit is contained in:
Bob Nystrom
2013-11-18 09:19:03 -08:00
parent 4d23d58bf1
commit e614e092ed
8 changed files with 127 additions and 14 deletions
+9
View File
@@ -0,0 +1,9 @@
// Create a local scope for the 'then' expression.
var a = "out"
if (true) var a = "in"
io.write(a) // expect: out
// Create a local scope for the 'else' expression.
var b = "out"
if (false) "dummy" else var b = "in"
io.write(b) // expect: out