feat: require parentheses around operator and setter method parameters in Wren
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.
This commit is contained in:
+2
-2
@@ -34,9 +34,9 @@ class List is Sequence {
|
||||
return result
|
||||
}
|
||||
|
||||
+ that {
|
||||
+(other) {
|
||||
var result = this[0..-1]
|
||||
for (element in that) {
|
||||
for (element in other) {
|
||||
result.add(element)
|
||||
}
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user