JET-142 Support string templates

This commit is contained in:
Andrey Breslav
2011-07-11 23:02:18 +04:00
parent 79066eefe1
commit 591740717a
29 changed files with 1565 additions and 657 deletions
+22
View File
@@ -0,0 +1,22 @@
fun demo() {
val abc = 1
val a = ""
val asd = 1
val bar = 5
fun map(f : fun () : Any?) : Int = 1
fun buzz(f : fun () : Any?) : Int = 1
val sdf = 1
val foo = 3;
"$abc"
"$abc\"
"$"
"$.$.asdf$\t"
"asd\$"
"asd$a"
"asd$a$asd$"
"fosdfasdo${1 + bar + 100}}sdsdfgdsfsdf"
"foo${bar + map {foo}}sdfsdf"
"foo${bar + map { "foo" }}sdfsdf"
"foo${bar + map {
"foo$sdf${ buzz{}}" }}sdfsdf"
}