From 6815debb9955066358fa0eeeed404e53fdff65e6 Mon Sep 17 00:00:00 2001 From: Maxim Date: Thu, 7 Jul 2022 07:23:32 +0200 Subject: [PATCH] Refactor code style "async" token lookahead See https://github.com/rescript-lang/syntax/pull/600#discussion_r914861732 --- src/res_core.ml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/res_core.ml b/src/res_core.ml index d25dc86f..b6fded4d 100644 --- a/src/res_core.ml +++ b/src/res_core.ml @@ -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;