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

Commit

Permalink
Refactor code style "async" token lookahead
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim committed Jul 7, 2022
1 parent 877145c commit 6815deb
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/res_core.ml
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,9 @@ let rec goToClosing closingToken state =
(* Madness *)
let isEs6ArrowExpression ~inTernary p =
Parser.lookahead p (fun state ->
let () =
match state.Parser.token with
| Lident "async" -> Parser.next state
| _ -> ()
in
(match state.Parser.token with
| Lident "async" -> Parser.next state
| _ -> ());
match state.Parser.token with
| Lident _ | Underscore -> (
Parser.next state;
Expand Down

0 comments on commit 6815deb

Please sign in to comment.