mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-11 22:28:45 +01:00
- Rename IO.write -> IO.print. - Make IO.write not print a newline. - Support \u Unicode escapes in strings.
32 lines
418 B
Plaintext
32 lines
418 B
Plaintext
// Single expression body.
|
|
(fn IO.print("ok")).call // expect: ok
|
|
|
|
// TODO: Precedence of fn body.
|
|
|
|
// Curly body.
|
|
fn {
|
|
IO.print("ok") // expect: ok
|
|
}.call
|
|
|
|
// No trailing newline.
|
|
fn {
|
|
IO.print("ok") }.call // expect: ok
|
|
|
|
// Multiple expressions.
|
|
fn {
|
|
IO.print("1") // expect: 1
|
|
IO.print("2") // expect: 2
|
|
}.call
|
|
|
|
// Extra newlines.
|
|
fn {
|
|
|
|
|
|
IO.print("1") // expect: 1
|
|
|
|
|
|
IO.print("2") // expect: 2
|
|
|
|
|
|
}.call
|