Implement new parsing rules for labels

See changes in expressions.grm
This commit is contained in:
Denis Zharkov
2015-04-27 12:34:12 +03:00
parent 0d76634f6b
commit 507eefcaa5
20 changed files with 1048 additions and 109 deletions
+25
View File
@@ -0,0 +1,25 @@
fun foo() {
x1.filter b@ {
return 1
}
c@ {
return 2
}
loop1@ for (i in 1..100) {
return 4
}
loop2@ for (i in 1..100) {
return@loop2 4
return@loop2 5
}
label1@ val x = 1
1 + label3@ 3 + 4
l1@ foo bar l2@ baz // binary expression
return (a@ 1)
}