"IO" -> "System".
Get rid of the separate opt-in IO class and replace it with a core System class. - Remove wren_io.c, wren_io.h, and io.wren. - Remove the flags that disable it. - Remove the overloads for print() with different arity. (It was an experiment, but I don't think it's that useful.) - Remove IO.read(). That will reappear using libuv in the CLI at some point. - Remove IO.time. Doesn't seem to have been used. - Update all of the tests, docs, etc. I'm sorry for all the breakage this causes, but I think "System" is a better name for this class (it makes it natural to add things like "System.gc()") and frees up "IO" for referring to the CLI's IO module.
This commit is contained in:
@@ -11,6 +11,6 @@ class Foo {
|
||||
}
|
||||
|
||||
var foo = Foo.new()
|
||||
IO.print(foo.closeOverGet.call()) // expect: Foo field
|
||||
System.print(foo.closeOverGet.call()) // expect: Foo field
|
||||
foo.closeOverSet.call()
|
||||
IO.print(foo.closeOverGet.call()) // expect: new value
|
||||
System.print(foo.closeOverGet.call()) // expect: new value
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class Foo {
|
||||
construct new() {}
|
||||
write { IO.print(_field) }
|
||||
write { System.print(_field) }
|
||||
}
|
||||
|
||||
Foo.new().write // expect: null
|
||||
|
||||
@@ -10,11 +10,11 @@ class Foo {
|
||||
}
|
||||
|
||||
write {
|
||||
IO.print(_a)
|
||||
IO.print(_b)
|
||||
IO.print(_c)
|
||||
IO.print(_d)
|
||||
IO.print(_e)
|
||||
System.print(_a)
|
||||
System.print(_b)
|
||||
System.print(_c)
|
||||
System.print(_d)
|
||||
System.print(_e)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,19 +3,19 @@ class Outer {
|
||||
|
||||
method {
|
||||
_field = "outer"
|
||||
IO.print(_field) // expect: outer
|
||||
System.print(_field) // expect: outer
|
||||
|
||||
class Inner {
|
||||
construct new() {}
|
||||
|
||||
method {
|
||||
_field = "inner"
|
||||
IO.print(_field) // expect: inner
|
||||
System.print(_field) // expect: inner
|
||||
}
|
||||
}
|
||||
|
||||
Inner.new().method
|
||||
IO.print(_field) // expect: outer
|
||||
System.print(_field) // expect: outer
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ class Node {
|
||||
_left.write()
|
||||
}
|
||||
|
||||
IO.print(_value)
|
||||
System.print(_value)
|
||||
|
||||
if (_right is Node) {
|
||||
_right.write()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class Foo {
|
||||
construct new() {}
|
||||
write { IO.print(_field) } // Compile a use of the field...
|
||||
write { System.print(_field) } // Compile a use of the field...
|
||||
init { _field = "value" } // ...before an assignment to it.
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user