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

Warn about 'while!' and 'while:'

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