mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-11 22:28:45 +01:00
Still need to do:
- Tagged templates so users can control interpolation.
- Optional format strings.
But basic string interpolation is working now:
System.print("Hi, %(name)! You are %(birth - today) years old.")
26 lines
361 B
Plaintext
26 lines
361 B
Plaintext
var i = 0
|
|
while (true) {
|
|
System.print("outer %(i)")
|
|
if (i > 1) break
|
|
|
|
var j = 0
|
|
while (true) {
|
|
System.print("inner %(j)")
|
|
if (j > 1) break
|
|
|
|
j = j + 1
|
|
}
|
|
|
|
i = i + 1
|
|
}
|
|
|
|
// expect: outer 0
|
|
// expect: inner 0
|
|
// expect: inner 1
|
|
// expect: inner 2
|
|
// expect: outer 1
|
|
// expect: inner 0
|
|
// expect: inner 1
|
|
// expect: inner 2
|
|
// expect: outer 2
|