1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:18:11 +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:
davidot 2021-09-18 01:11:32 +02:00 committed by Linus Groh
parent 9cb5700398
commit bfc1b4ba61
6 changed files with 177 additions and 77 deletions

View file

@ -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();
});
};