Newlines disabled inside () and [], enabled inside {}

This commit is contained in:
Andrey Breslav
2010-12-30 15:08:14 +03:00
parent fb13e1b14f
commit 7f69f1ffe2
16 changed files with 808 additions and 76 deletions
+62 -3
View File
@@ -66,13 +66,72 @@ fun a(
}
for (val x in foo) a
for (x in foo) a
for (val x : Int in foo) a
for (x : Int in foo) {}
for (x in foo) a
for (val x : Int in foo) a
for (x : Int in foo) {}
while (true) {}
do {
} while (false)
fun foo() {
for (a in b)
b
for (a in b) {}
for (a in b) {
b
}
for (a in b);
b
while (a in b)
b
while (a in b) {
b
}
while (a in b);
b
while (a) {}
if (a)
b
else
c
if (a) b else c
if (a) b
else c
if (a)
b;
else
c;
if (a) b
if (a)
b
if (a)
b;
if (a) else c
if (a)
else c
if (a)
;
else c
if (a)
else ;
do while (r)
do foo while (r)
do {;;;foo;bar;;;; } while (r)
}