Skip to content

Commit

Permalink
allow spaces in identifiers between quotes #64
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosh committed Oct 12, 2018
1 parent d7b7298 commit 2b6e22b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Language/Parser/Parser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ identifier :: Parser String
identifier = (lexeme . try) (p' >>= check)
where
p = lowerId <|> upperId <|> specialId
p' = p <|> between (char '"') (char '"') p
p' = p <|> between (char '"') (char '"') (unwords <$> some (lexeme p))
check x =
if x `elem` reservedWords
then fail $ "keyword" ++ show x ++ "cannot be used as an identifier"
Expand Down

0 comments on commit 2b6e22b

Please sign in to comment.