Allow real statements inside of class

This commit is contained in:
leaf corcoran 2012-09-30 19:16:10 -07:00
parent 5e7520e491
commit 8cf92a3591
2 changed files with 47 additions and 47 deletions

View File

@ -501,7 +501,7 @@ local build_grammar = wrap_env(function()
Ct(ClassLine * (SpaceBreak^1 * ClassLine)^0) * PopIndent, Ct(ClassLine * (SpaceBreak^1 * ClassLine)^0) * PopIndent,
ClassLine = CheckIndent * (( ClassLine = CheckIndent * ((
KeyValueList / mark"props" + KeyValueList / mark"props" +
(Assign + Update) / mark"stm" + Statement / mark"stm" +
Exp / mark"stm" Exp / mark"stm"
) * sym","^-1), ) * sym","^-1),

View File

@ -540,7 +540,6 @@ local self = self + self / self
self = 343 self = 343
self.hello(2, 3, 4) self.hello(2, 3, 4)
local _ = hello[self].world local _ = hello[self].world
if something then
local Whacko local Whacko
Whacko = (function() Whacko = (function()
local hello local hello
@ -582,11 +581,12 @@ if something then
end end
hello = "world" hello = "world"
self.another = "day" self.another = "day"
if something then
print("yeah") print("yeah")
end
if _parent_0 and _parent_0.__inherited then if _parent_0 and _parent_0.__inherited then
_parent_0.__inherited(_parent_0, _class_0) _parent_0.__inherited(_parent_0, _class_0)
end end
return _class_0 return _class_0
end)() end)()
end
print("hello") print("hello")