mirror of
https://github.com/leafo/moonscript.git
synced 2024-11-22 02:44:23 +00:00
Allow real statements inside of class
This commit is contained in:
parent
5e7520e491
commit
8cf92a3591
@ -501,7 +501,7 @@ local build_grammar = wrap_env(function()
|
||||
Ct(ClassLine * (SpaceBreak^1 * ClassLine)^0) * PopIndent,
|
||||
ClassLine = CheckIndent * ((
|
||||
KeyValueList / mark"props" +
|
||||
(Assign + Update) / mark"stm" +
|
||||
Statement / mark"stm" +
|
||||
Exp / mark"stm"
|
||||
) * sym","^-1),
|
||||
|
||||
|
@ -540,7 +540,6 @@ local self = self + self / self
|
||||
self = 343
|
||||
self.hello(2, 3, 4)
|
||||
local _ = hello[self].world
|
||||
if something then
|
||||
local Whacko
|
||||
Whacko = (function()
|
||||
local hello
|
||||
@ -582,11 +581,12 @@ if something then
|
||||
end
|
||||
hello = "world"
|
||||
self.another = "day"
|
||||
if something then
|
||||
print("yeah")
|
||||
end
|
||||
if _parent_0 and _parent_0.__inherited then
|
||||
_parent_0.__inherited(_parent_0, _class_0)
|
||||
end
|
||||
return _class_0
|
||||
end)()
|
||||
end
|
||||
print("hello")
|
Loading…
Reference in New Issue
Block a user