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

Commit

Permalink
fix: update logic
Browse files Browse the repository at this point in the history
  • Loading branch information
nissy-dev committed Aug 6, 2023
1 parent 70ac09f commit f4c46bd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion crates/rome_js_parser/src/syntax/stmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,13 @@ pub(crate) fn parse_statement(p: &mut JsParser, context: StatementContext) -> Pa
T![var] => parse_variable_statement(p, context),
T![const] => parse_variable_statement(p, context),
T![using] if is_nth_at_using_declaration(p, 0) => parse_variable_statement(p, context),
T![await] if is_nth_at_using_declaration(p, 0) => parse_variable_statement(p, context),
T![await] => {
if is_nth_at_using_declaration(p, 0) {
parse_variable_statement(p, context)
} else {
parse_expression_statement(p)
}
}
T![for] => parse_for_statement(p),
T![do] => parse_do_statement(p),
T![switch] => parse_switch_statement(p),
Expand Down

0 comments on commit f4c46bd

Please sign in to comment.