mirror of
https://github.com/wren-lang/wren.git
synced 2026-01-18 13:49:59 +01:00
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,12 +1,12 @@
|
||||
class Base {
|
||||
foo {
|
||||
IO.write("Base.foo")
|
||||
IO.print("Base.foo")
|
||||
}
|
||||
}
|
||||
|
||||
class Derived is Base {
|
||||
bar {
|
||||
IO.write("Derived.bar")
|
||||
IO.print("Derived.bar")
|
||||
super.foo
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
class Base {
|
||||
foo {
|
||||
IO.write("Base.foo")
|
||||
IO.print("Base.foo")
|
||||
}
|
||||
}
|
||||
|
||||
class Derived is Base {
|
||||
foo {
|
||||
IO.write("Derived.foo")
|
||||
IO.print("Derived.foo")
|
||||
super.foo
|
||||
}
|
||||
}
|
||||
|
||||
@ -13,4 +13,4 @@ class Derived is Base {
|
||||
}
|
||||
|
||||
var closure = (new Derived).getClosure
|
||||
IO.write(closure.call) // expect: Base
|
||||
IO.print(closure.call) // expect: Base
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
class A {
|
||||
foo {
|
||||
IO.write("A.foo")
|
||||
IO.print("A.foo")
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@ class B is A {}
|
||||
|
||||
class C is B {
|
||||
foo {
|
||||
IO.write("C.foo")
|
||||
IO.print("C.foo")
|
||||
super.foo
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user