From 36718948be7904a2e5f6acb0d30ebb607f478a06 Mon Sep 17 00:00:00 2001 From: David Luhmer Date: Thu, 7 Apr 2022 18:31:29 +0200 Subject: [PATCH] rename reserved keyword `await` (#5413) --- lib/parse.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/parse.js b/lib/parse.js index 982d9d48..60710292 100644 --- a/lib/parse.js +++ b/lib/parse.js @@ -1194,10 +1194,10 @@ function parse($TEXT, options) { } function for_() { - var await = is("name", "await") && next(); + var await_token = is("name", "await") && next(); expect("("); var init = null; - if (await || !is("punc", ";")) { + if (await_token || !is("punc", ";")) { init = is("keyword", "const") ? (next(), const_(true)) : is("name", "let") && is_vardefs() @@ -1206,7 +1206,7 @@ function parse($TEXT, options) { ? (next(), var_(true)) : expression(true); var ctor; - if (await) { + if (await_token) { expect_token("name", "of"); ctor = AST_ForAwaitOf; } else if (is("operator", "in")) {