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
+3 -3
View File
@@ -3,10 +3,10 @@ class Foo {
}
// Calls toString on argument.
IO.write(new Foo) // expect: Foo.toString
IO.print(new Foo) // expect: Foo.toString
// Returns argument.
var result = IO.write(123) // expect: 123
IO.write(result == 123) // expect: true
var result = IO.print(123) // expect: 123
IO.print(result == 123) // expect: true
// TODO: What if toString on argument doesn't return a string?