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
@@ -9,4 +9,4 @@ class Foo {
}
var closure = (new Foo).getClosure
IO.write(closure.call) // expect: Foo
IO.print(closure.call) // expect: Foo
+3 -3
View File
@@ -1,13 +1,13 @@
class Outer {
method {
IO.write(this.toString) // expect: Outer
IO.print(this.toString) // expect: Outer
fn {
IO.write(this.toString) // expect: Outer
IO.print(this.toString) // expect: Outer
class Inner {
method {
IO.write(this.toString) // expect: Inner
IO.print(this.toString) // expect: Inner
}
toString { return "Inner" }
}
+1 -1
View File
@@ -13,4 +13,4 @@ class Foo {
}
var closure = (new Foo).getClosure
IO.write(closure.call.call.call) // expect: Foo
IO.print(closure.call.call.call) // expect: Foo
+1 -1
View File
@@ -3,4 +3,4 @@ class Foo {
baz { return "baz" }
}
IO.write((new Foo).bar.baz) // expect: baz
IO.print((new Foo).bar.baz) // expect: baz