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:
@@ -9,4 +9,4 @@ class Foo {
|
||||
}
|
||||
|
||||
var closure = (new Foo).getClosure
|
||||
IO.write(closure.call) // expect: Foo
|
||||
IO.print(closure.call) // expect: Foo
|
||||
|
||||
@@ -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" }
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user