mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibJS: Allow member expressions in binding patterns
Also allows literal string and numbers as property names in object binding patterns.
This commit is contained in:
parent
9cb5700398
commit
bfc1b4ba61
Notes:
sideshowbarker
2024-07-18 03:18:19 +09:00
Author: https://github.com/davidot
Commit: bfc1b4ba61
Pull-request: https://github.com/SerenityOS/serenity/pull/10181
Reviewed-by: https://github.com/Dexesttp
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/linusg
6 changed files with 177 additions and 77 deletions
|
@ -1331,6 +1331,8 @@ void BindingPattern::dump(int indent) const
|
|||
entry.alias.get<NonnullRefPtr<Identifier>>()->dump(indent + 3);
|
||||
} else if (entry.alias.has<NonnullRefPtr<BindingPattern>>()) {
|
||||
entry.alias.get<NonnullRefPtr<BindingPattern>>()->dump(indent + 3);
|
||||
} else if (entry.alias.has<NonnullRefPtr<MemberExpression>>()) {
|
||||
entry.alias.get<NonnullRefPtr<MemberExpression>>()->dump(indent + 3);
|
||||
} else {
|
||||
print_indent(indent + 3);
|
||||
outln("<empty>");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue