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:
Bob Nystrom
2014-01-05 12:27:12 -08:00
parent 870f3b8b93
commit b979272305
159 changed files with 1690 additions and 1599 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
IO.write(fn {
IO.print(fn {
if (false) "no" else return "ok"
}.call) // expect: ok
+1 -1
View File
@@ -1,3 +1,3 @@
IO.write(fn {
IO.print(fn {
if (true) return "ok"
}.call) // expect: ok
+1 -1
View File
@@ -1,3 +1,3 @@
IO.write(fn {
IO.print(fn {
while (true) return "ok"
}.call) // expect: ok
+1 -1
View File
@@ -1 +1 @@
var a = "ok"; IO.write(a) // expect: ok
var a = "ok"; IO.print(a) // expect: ok
+2 -2
View File
@@ -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