Retoor software development Projects Research SearchXNG
Register Sign In

7 lines
113 B
Plaintext
Raw Normal View History

feat: implement setter syntax and assignment in named method calls Add support for setter methods in the compiler by detecting '=' after a method name in namedCall, compiling the assigned value, and emitting the setter instruction. Includes new test cases for instance setters, static setters, assignment associativity, grouping, operator precedence errors, setter result values, and same-name getter/setter methods. Also updates the super call test with a TODO for super setter calls.
2013-12-20 16:05:31 +01:00
class Foo {
bar = value { return "result" }
}
var foo = new Foo
refactor: convert IO from singleton instance to static class with metaclass native methods Replace the global `io` singleton object with a static `IO` class, moving the `write` native from the instance to the metaclass. Update all benchmark, example, and test files to use `IO.write()` instead of `io.write()`.
2013-12-22 04:25:09 +01:00
IO.write(foo.bar = "value") // expect: result
Reference in New Issue Copy Permalink
b72a42eedd
wren/test/setter/result.wren
Response time: 37ms
Mail Licenses API