Revert "Added warning for fi }, and not for ) }"
This reverts commit ea4176691d
.
I must have had some crack for breakfast.
This commit is contained in:
parent
ea4176691d
commit
24f91ae711
|
@ -1199,24 +1199,11 @@ readPattern = (readNormalWord `thenSkip` spacing) `sepBy1` (char '|' `thenSkip`
|
||||||
|
|
||||||
readCompoundCommand = do
|
readCompoundCommand = do
|
||||||
id <- getNextId
|
id <- getNextId
|
||||||
-- This is all Bash specific. fi } fails, but ) } works.
|
cmd <- choice [ readBraceGroup, readArithmeticExpression, readSubshell, readCondition, readWhileClause, readUntilClause, readIfClause, readForClause, readCaseClause, readFunctionDefinition]
|
||||||
cmd <- do
|
|
||||||
x <- needsSeparator
|
|
||||||
return (True, x)
|
|
||||||
<|> do
|
|
||||||
x <- noSeparator
|
|
||||||
return (False, x)
|
|
||||||
spacing
|
spacing
|
||||||
redirs <- many readIoRedirect
|
redirs <- many readIoRedirect
|
||||||
when (fst cmd) $ optional $ do
|
return $ T_Redirecting id redirs $ cmd
|
||||||
try . lookAhead $ (spacing >> g_Rbrace)
|
|
||||||
parseProblem WarningC "Bash requires semicolon or linefeed before the } here."
|
|
||||||
|
|
||||||
return $ T_Redirecting id redirs $ snd cmd
|
|
||||||
|
|
||||||
where
|
|
||||||
needsSeparator = choice [ readArithmeticExpression, readCondition, readWhileClause, readUntilClause, readIfClause, readForClause, readCaseClause]
|
|
||||||
noSeparator = choice [ readBraceGroup, readSubshell, readFunctionDefinition]
|
|
||||||
|
|
||||||
readCompoundList = readTerm
|
readCompoundList = readTerm
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue