Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
feat: pass error kind via parameter (#1788)
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Nov 19, 2021
1 parent 397e567 commit 50412b3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion crates/rslint_parser/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ impl<'t> Parser<'t> {
true
}


/// Starts a new node in the syntax tree. All nodes and tokens
/// consumed between the `start` and the corresponding `Marker::complete`
/// belong to the same node.
Expand Down
2 changes: 2 additions & 0 deletions crates/rslint_parser/src/syntax/pat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ pub fn array_binding_pattern(
ParseRecoverer::new(
token_set![T![await], T![ident], T![yield], T![:], T![=], T![']']],
ERROR,
ERROR,
)
.recover(p);
}
Expand Down Expand Up @@ -241,6 +242,7 @@ fn object_binding_prop(p: &mut Parser, parameters: bool) -> Option<CompletedMark
ParseRecoverer::new(
token_set![T![await], T![ident], T![yield], T![:], T![=], T!['}']],
ERROR,
ERROR,
)
.recover(p);
return None;
Expand Down
3 changes: 3 additions & 0 deletions crates/rslint_parser/src/syntax/typescript.rs
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,7 @@ pub fn ts_enum(p: &mut Parser) -> CompletedMarker {
token_set![T!['}'], T![ident], T![yield], T![await], T![=], T![,]],
ERROR,
err,
ERROR,
)
.recover(p);
true
Expand Down Expand Up @@ -1031,6 +1032,7 @@ pub fn ts_non_array_type(p: &mut Parser) -> Option<CompletedMarker> {
]),
ERROR,
err,
ERROR,
)
.recover(p);
None
Expand Down Expand Up @@ -1129,6 +1131,7 @@ fn type_param(p: &mut Parser) -> Option<CompletedMarker> {
token_set![T![ident], T![yield], T![await], T![>], T![=]],
ERROR,
err,
ERROR,
)
.recover(p);
None
Expand Down

0 comments on commit 50412b3

Please sign in to comment.