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.
This commit is contained in:
Bob Nystrom
2013-12-20 15:05:31 +00:00
parent 7d12f64af4
commit 517844fbda
11 changed files with 199 additions and 82 deletions
+1
View File
@@ -20,3 +20,4 @@ class Derived is Base {
// TODO: Calling super outside of a class.
// TODO: Super calls inside nested functions in methods.
// TODO: Super where there is no inherited method.
// TODO: Super setter calls.