feat: add user-defined subscript operators with bracket parameter lists
Refactor parameter list parsing to support bracket-delimited parameters for subscript operators. Extract finishParameterList from parameterList to handle the common closing logic, and add TOKEN_RIGHT_BRACKET case for error messages. Add comprehensive test suite for subscript getters and setters with 1-3 parameters in test/method/subscript_operators.wren.
This commit is contained in:
@@ -21,5 +21,3 @@
|
||||
list[-3] = 7
|
||||
IO.print(list) // expect: [7, 6, 5]
|
||||
}
|
||||
|
||||
// TODO: Not in this dir, but need tests for subscript setter grammar.
|
||||
|
||||
Reference in New Issue
Block a user