Allow BindingPattern
as CatchParameter
#1600
Labels
E-Medium
Medium difficulty problem
enhancement
New feature or request
good first issue
Good for newcomers
Hacktoberfest
Hacktoberfest 2021 - https://hacktoberfest.digitalocean.com
parser
Issues surrounding the parser
Milestone
ECMASCript feature
Currently we only allow
BindingIdentifier
s in theCatchParameter
of thetry...catch
statement.BindingPattern
s should be also allowed.ECMAScript specification
Example code
This code should work and give the expected result:
Good starting points would be the
catch
parsing in https://github.com/boa-dev/boa/blob/master/boa/src/syntax/parser/statement/try_stm/catch.rs and theBindingPattern
parsing in https://github.com/boa-dev/boa/blob/master/boa/src/syntax/parser/statement/mod.rsThe text was updated successfully, but these errors were encountered: