Skip to content

Commit

Permalink
Removed unnecesary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Razican committed Feb 5, 2022
1 parent 83fd796 commit 134fd5a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
1 change: 0 additions & 1 deletion boa/src/syntax/parser/cursor/buffered_lexer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ where
self.read_index, self.write_index,
"we reached the read index with the write index"
);

debug_assert!(
self.read_index < PEEK_BUF_SIZE,
"read index went out of bounds"
Expand Down
17 changes: 5 additions & 12 deletions boa/src/syntax/parser/expression/assignment/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,11 @@ where
.map(Node::ArrowFunctionDecl);
}
TokenKind::Punctuator(Punctuator::CloseParen) => {
// Need to check if the token after the close paren is an arrow, if so then this is an ArrowFunction
// otherwise it is an expression of the form (b).
#[allow(clippy::match_same_arms)]
match cursor.peek(3, interner) {
Ok(Some(t))
if t.kind()
== &TokenKind::Punctuator(
Punctuator::Arrow,
) =>
// Need to check if the token after the close paren is an
// arrow, if so then this is an ArrowFunction otherwise it
// is an expression of the form (b).
if let Some(t) = cursor.peek(3, interner)? {
if t.kind() == &TokenKind::Punctuator(Punctuator::Arrow)
{
return ArrowFunction::new(
self.allow_in,
Expand All @@ -171,9 +167,6 @@ where
.parse(cursor, interner)
.map(Node::ArrowFunctionDecl);
}
Err(ParseError::AbruptEnd) => {}
Err(e) => return Err(e),
_ => {}
}
}
_ => {}
Expand Down

0 comments on commit 134fd5a

Please sign in to comment.