Enforce syntactic requirement for parentheses in operator method signatures (e.g., `+(other)` instead of `+ other`) and setter definitions (e.g., `bar=(value)` instead of `bar = value`). Update the compiler's `infixSignature`, `mixedSignature`, and `namedSignature` functions to consume explicit `(` and `)` tokens around parameter names. Migrate all built-in core library operator definitions and test fixtures to the new parenthesized syntax.
21 lines
290 B
Plaintext
21 lines
290 B
Plaintext
class Foo {
|
|
bar=(value) {
|
|
IO.print("setter")
|
|
return value
|
|
}
|
|
|
|
test {
|
|
bar = "value" // expect: setter
|
|
|
|
{
|
|
bar = "value" // expect: setter
|
|
var bar = "local"
|
|
bar = "value" // no expectation
|
|
}
|
|
|
|
bar = "value" // expect: setter
|
|
}
|
|
}
|
|
|
|
(new Foo).test
|