mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +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
|
@ -778,6 +778,9 @@ static void generate_array_binding_pattern_bytecode(Bytecode::Generator& generat
|
|||
auto target_reg = generator.allocate_register();
|
||||
generator.emit<Bytecode::Op::Store>(target_reg);
|
||||
generate_binding_pattern_bytecode(generator, pattern, target_reg);
|
||||
},
|
||||
[&](NonnullRefPtr<MemberExpression> const&) {
|
||||
TODO();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue