Mention correct operator when warning about spaces around += (#944)

This commit is contained in:
Vidar Holen 2017-07-03 10:44:09 -07:00
parent 8f31ae913b
commit a10b924570
1 changed files with 5 additions and 1 deletions

View File

@ -2443,7 +2443,11 @@ readAssignmentWordExt lenient = try $ do
return $ T_Assignment id op variable indices value
else do
when (hasLeftSpace || hasRightSpace) $
parseNoteAt pos ErrorC 1068 "Don't put spaces around the = in assignments."
parseNoteAt pos ErrorC 1068 $
"Don't put spaces around the "
++ if op == Append
then "+= when appending."
else "= in assignments."
value <- readArray <|> readNormalWord
spacing
return $ T_Assignment id op variable indices value