From 4db486779d1de61261720506cf6cd5d12c392c78 Mon Sep 17 00:00:00 2001 From: IWANABETHATGUY Date: Sun, 4 Sep 2022 12:16:01 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20fmt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/rome_js_parser/src/syntax/expr.rs | 2 +- crates/rome_js_parser/src/syntax/typescript/types.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/rome_js_parser/src/syntax/expr.rs b/crates/rome_js_parser/src/syntax/expr.rs index ed24be88579d..a5647e0fdb8e 100644 --- a/crates/rome_js_parser/src/syntax/expr.rs +++ b/crates/rome_js_parser/src/syntax/expr.rs @@ -21,7 +21,7 @@ use crate::syntax::function::{ use crate::syntax::js_parse_error; use crate::syntax::js_parse_error::expected_simple_assignment_target; use crate::syntax::js_parse_error::{ - expected_expression, expected_identifier, invalid_assignment_error, + expected_expression, expected_identifier, invalid_assignment_error, private_names_only_allowed_on_left_side_of_in_expression, }; use crate::syntax::jsx::parse_jsx_tag_expression; diff --git a/crates/rome_js_parser/src/syntax/typescript/types.rs b/crates/rome_js_parser/src/syntax/typescript/types.rs index 015507123201..2be6a5c57f16 100644 --- a/crates/rome_js_parser/src/syntax/typescript/types.rs +++ b/crates/rome_js_parser/src/syntax/typescript/types.rs @@ -1291,7 +1291,8 @@ pub(crate) fn parse_ts_type_arguments_in_expression(p: &mut Parser) -> ParsedSyn #[inline] pub fn can_follow_type_arguments_in_expr(cur_kind: JsSyntaxKind) -> bool { - matches!(cur_kind, + matches!( + cur_kind, T!['('] | BACKTICK // These tokens can't follow in a call expression, nor can they start an