refactor: extract IO class into separate module with wrenLoadIOLibrary and wren_io.c
Replace monolithic corelib.wren with per-class builtin/*.wren files and generate_builtins.py script. Move IO class definition and its native writeString_ method from wren_core.c to new wren_io.c, adding wrenGetArgumentString and wrenDefineStaticMethod to the public API. Update Makefile target from corelib to builtin and remove generate_corelib.py.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
class List {
|
||||
toString {
|
||||
var result = "["
|
||||
for (i in 0...this.count) {
|
||||
if (i > 0) result = result + ", "
|
||||
result = result + this[i].toString
|
||||
}
|
||||
result = result + "]"
|
||||
return result
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user