From 7af3470a9162a5d6279d8dfe5e7b0dc3b5f3a347 Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Fri, 1 Jul 2016 22:06:50 -0700 Subject: [PATCH] Improve parser errors when reparsing array indices. --- ShellCheck/Parser.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ShellCheck/Parser.hs b/ShellCheck/Parser.hs index 9796084..c4170af 100644 --- a/ShellCheck/Parser.hs +++ b/ShellCheck/Parser.hs @@ -2723,8 +2723,8 @@ reparseIndices root = parsed name pos src = if isAssociative name - then subParse pos readIndexSpan src - else subParse pos (optional space >> readArithmeticContents) src + then subParse pos (called "associative array index" $ readIndexSpan) src + else subParse pos (called "arithmetic array index expression" $ optional space >> readArithmeticContents) src reattachHereDocs root map = doTransform f root