From 95ebe1cd075adfc35ca959b36477868cdf5a805d Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Sun, 15 Dec 2013 14:39:47 -0800 Subject: [PATCH] Fixed parser error for '..; done| ..' --- ShellCheck/Parser.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ShellCheck/Parser.hs b/ShellCheck/Parser.hs index 8c9d9f2..b63de51 100644 --- a/ShellCheck/Parser.hs +++ b/ShellCheck/Parser.hs @@ -1214,6 +1214,7 @@ readSimpleCommand = called "simple command" $ do prop_readPipeline = isOk readPipeline "! cat /etc/issue | grep -i ubuntu" prop_readPipeline2 = isWarning readPipeline "!cat /etc/issue | grep -i ubuntu" +prop_readPipeline3 = isOk readPipeline "for f; do :; done|cat" readPipeline = do unexpecting "keyword/token" readKeyword do @@ -1705,7 +1706,7 @@ g_Semi = do tryToken ";" T_Semi keywordSeparator = - eof <|> disregard whitespace <|> (disregard $ oneOf ";()[<>&") + eof <|> disregard whitespace <|> (disregard $ oneOf ";()[<>&|") readKeyword = choice [ g_Then, g_Else, g_Elif, g_Fi, g_Do, g_Done, g_Esac, g_Rbrace, g_Rparen, g_DSEMI ]