mirror of
https://github.com/leafo/moonscript.git
synced 2024-11-22 02:44:23 +00:00
Added tests for the semicolon insertion
This commit is contained in:
parent
4ff4077a21
commit
0ac82e3af5
8
spec/inputs/ambiguous.moon
Normal file
8
spec/inputs/ambiguous.moon
Normal file
@ -0,0 +1,8 @@
|
||||
a = 'b'
|
||||
c = d
|
||||
(a b) c d
|
||||
import c from d
|
||||
(a b) c d
|
||||
(c d) a b
|
||||
a, b = c, d
|
||||
(d a) c
|
6
spec/inputs/ambiguous_tables.moon
Normal file
6
spec/inputs/ambiguous_tables.moon
Normal file
@ -0,0 +1,6 @@
|
||||
x = {
|
||||
hello
|
||||
(one)
|
||||
(two)
|
||||
three()
|
||||
}
|
9
spec/outputs/ambiguous.lua
Normal file
9
spec/outputs/ambiguous.lua
Normal file
@ -0,0 +1,9 @@
|
||||
local a = 'b'
|
||||
local c = d;
|
||||
(a(b))(c(d))
|
||||
c = d.c;
|
||||
(a(b))(c(d));
|
||||
(c(d))(a(b))
|
||||
local b
|
||||
a, b = c, d
|
||||
return (d(a))(c)
|
6
spec/outputs/ambiguous_tables.lua
Normal file
6
spec/outputs/ambiguous_tables.lua
Normal file
@ -0,0 +1,6 @@
|
||||
local x = {
|
||||
hello,
|
||||
(one),
|
||||
(two),
|
||||
three()
|
||||
}
|
Loading…
Reference in New Issue
Block a user