Make parse_pat_ident
not recover bad name
This commit is contained in:
parent
abe34e9ab1
commit
44fd3b4d46
8 changed files with 15 additions and 274 deletions
|
@ -839,7 +839,7 @@ impl<'a> Parser<'a> {
|
|||
binding_annotation: BindingAnnotation,
|
||||
syntax_loc: Option<PatternLocation>,
|
||||
) -> PResult<'a, PatKind> {
|
||||
let ident = self.parse_ident()?;
|
||||
let ident = self.parse_ident_common(false)?;
|
||||
|
||||
if self.may_recover()
|
||||
&& !matches!(syntax_loc, Some(PatternLocation::FunctionParameter))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue