Rename the IO.write method to IO.print, which now prints without a trailing newline, and add a new IO.print method that appends a newline after output. Update all benchmark, example, and test files to use IO.print instead of IO.write. Additionally, implement Unicode escape sequence parsing in the compiler's string tokenizer, supporting \uXXXX and \u{...} syntax with proper UTF-8 encoding for code points up to U+10FFFF.
17 lines
307 B
Plaintext
17 lines
307 B
Plaintext
class Foo {
|
|
new { _field = "Foo field" }
|
|
|
|
closeOverGet {
|
|
return fn { return _field }
|
|
}
|
|
|
|
closeOverSet {
|
|
return fn { _field = "new value" }
|
|
}
|
|
}
|
|
|
|
var foo = new Foo
|
|
IO.print(foo.closeOverGet.call) // expect: Foo field
|
|
foo.closeOverSet.call
|
|
IO.print(foo.closeOverGet.call) // expect: new value
|