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
+21
View File
@@ -0,0 +1,21 @@
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"
"$"
"$.$.asdf$\t"
"asd\$"
"asd$a<error>\x</error>"
"asd$a$asd$ <error>$xxx</error>"
"fosdfasdo${1 + bar + 100}}sdsdfgdsfsdf"
"foo${bar + map {foo}}sdfsdf"
"foo${bar + map { "foo" }}sdfsdf"
"foo${bar + map {
"foo$sdf${ buzz{}}" }}sdfsdf"
}