Clean up text handling a bit:
- Rename IO.write -> IO.print. - Make IO.write not print a newline. - Support \u Unicode escapes in strings.
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
IO.write(fn {
|
||||
IO.print(fn {
|
||||
if (false) "no" else return "ok"
|
||||
}.call) // expect: ok
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
IO.write(fn {
|
||||
IO.print(fn {
|
||||
if (true) return "ok"
|
||||
}.call) // expect: ok
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
IO.write(fn {
|
||||
IO.print(fn {
|
||||
while (true) return "ok"
|
||||
}.call) // expect: ok
|
||||
|
||||
@@ -1 +1 @@
|
||||
var a = "ok"; IO.write(a) // expect: ok
|
||||
var a = "ok"; IO.print(a) // expect: ok
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
class Foo {
|
||||
method {
|
||||
return "ok"
|
||||
IO.write("bad")
|
||||
IO.print("bad")
|
||||
}
|
||||
}
|
||||
|
||||
IO.write((new Foo).method) // expect: ok
|
||||
IO.print((new Foo).method) // expect: ok
|
||||
|
||||
Reference in New Issue
Block a user