提交 6d257bfa 编写于 作者: V Vidar Holen

Warn about 'while!' and 'while:'

上级 d8717c70
...@@ -2582,11 +2582,14 @@ tryParseWordToken keyword t = try $ do ...@@ -2582,11 +2582,14 @@ tryParseWordToken keyword t = try $ do
str <- anycaseString keyword str <- anycaseString keyword
optional $ do optional $ do
try . lookAhead $ char '[' c <- try . lookAhead $ anyChar
parseProblem ErrorC 1069 "You need a space before the [." let warning code = parseProblem ErrorC code $ "You need a space before the " ++ [c] ++ "."
optional $ do case c of
try . lookAhead $ char '#' '[' -> warning 1069
parseProblem ErrorC 1099 "You need a space before the #." '#' -> warning 1099
'!' -> warning 1129
':' -> warning 1130
_ -> return ()
lookAhead keywordSeparator lookAhead keywordSeparator
when (str /= keyword) $ when (str /= keyword) $
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册