From f935612178764e8912e1f77ceeeee8ef7c96758f Mon Sep 17 00:00:00 2001 From: melpon Date: Sun, 13 Mar 2022 04:46:13 +0900 Subject: [PATCH] Rename blockKeywords blockKeywords is defined twice. When using a script converted with esbuild, the first blockKeywords is deleted due to issue https://github.com/evanw/esbuild/issues/2098. To address this issue, rename the first blockKeywords definition to blockKeywordsStr. --- mode/d.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mode/d.js b/mode/d.js index bec260b..cb4de29 100644 --- a/mode/d.js +++ b/mode/d.js @@ -4,7 +4,7 @@ function words(str) { return obj; } -var blockKeywords = "body catch class do else enum for foreach foreach_reverse if in interface mixin " + +var blockKeywordsStr = "body catch class do else enum for foreach foreach_reverse if in interface mixin " + "out scope struct switch try union unittest version while with"; const parserConfig = { @@ -13,8 +13,8 @@ const parserConfig = { "import inout invariant is lazy macro module new nothrow override package pragma private " + "protected public pure ref return shared short static super synchronized template this " + "throw typedef typeid typeof volatile __FILE__ __LINE__ __gshared __traits __vector __parameters " + - blockKeywords), - blockKeywords: words(blockKeywords), + blockKeywordsStr), + blockKeywords: words(blockKeywordsStr), builtin: words("bool byte char creal dchar double float idouble ifloat int ireal long real short ubyte " + "ucent uint ulong ushort wchar wstring void size_t sizediff_t"), atoms: words("exit failure success true false null"),