?
u
/
See the proposal repository for background material and discussion.
Draft Note: Portions of this proposal are intended to align with Pattern Matching. Where appropriate, functionality shared with Pattern Matching will be called out with a Draft Note.
Specification Name | [[Description]] | Value and Purpose |
---|---|---|
@@customMatcher |
"Symbol.customMatcher"
|
A method that performs custom pattern matching and destructuring semantics. Called by the semantics of the pattern-matching and destructuring features. |
Draft Note: @@customMatcher is also part of the Pattern Matching proposal.
The
It is defined piecewise over the following productions:
The
var
statements and formal parameter lists of some
It is defined piecewise over the following productions:
Draft Note: receiver is part of the Pattern Matching proposal but does not have consensus in the Pattern Matching champion group yet.
The abstract operation InvokeCustomMatcherOrThrow takes arguments matcher (an
"list"
, receiver »).Draft Note: The InvokeCustomMatcherOrThrow abstract operation is derived from InvokeCustomMatcher in the Pattern Matching proposal.
Draft Note: The value "list"
is related to two different modes ("boolean"
and "list"
) supported by custom matchers in the Pattern Matching proposal and is provided here to satisfy cross-cutting concerns between the two proposals.
Draft Note: The receiver parameter is not a consensus in the Pattern Matching champion group yet. This design is to keep the this
value when calling the custom matchers. Not everyone in the champion group agrees we need to keep the this
value.
Draft Note: This proposal currently uses iterators for destructuring, but may choose to use Array objects explicitly in the future due to performance concerns related to iterators.
The
When
It is defined piecewise over the following productions:
When processing an instance of the production
the interpretation of
A
assignmentOpText | opText |
---|---|
**= | ** |
*= | * |
/= | / |
%= | % |
+= | + |
-= | - |
<<= | << |
>>= | >> |
>>>= | >>> |
&= | & |
^= | ^ |
|= | | |
When this expression occurs within
In certain circumstances when processing an instance of the production
the interpretation of
The
Draft Note: receiver is part of the Pattern Matching proposal but does not have consensus in the Pattern Matching champion group yet.
The
Left to right evaluation order is maintained by evaluating a
The
Draft Note: The
When processing an instance of the production
the interpretation of
© 2024 Ron Buckton, Ecma International
All Software contained in this document ("Software") is protected by copyright and is being made available under the "BSD License", included below. This Software may be subject to third party rights (rights from parties other than Ecma International), including patent rights, and no licenses under such third party rights are granted under this license even if the third party concerned is a member of Ecma International. SEE THE ECMA CODE OF CONDUCT IN PATENT MATTERS AVAILABLE AT https://ecma-international.org/memento/codeofconduct.htm FOR INFORMATION REGARDING THE LICENSING OF PATENT CLAIMS THAT ARE REQUIRED TO IMPLEMENT ECMA INTERNATIONAL STANDARDS.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE ECMA INTERNATIONAL "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ECMA INTERNATIONAL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.