@@ -20,8 +20,11 @@ num = fmap toLit (preNum <?> "number")
2020 ('.':) <$> many1 digit
2121
2222str :: IParser Literal
23−str = liftM Str . expecting "string" . betwixt '"' '"' . many $
24− backslashed <|> satisfy (/='"')
23+str = choice [ let quote = try (string "\"\"\"")
24+ in quote >> Str <$> manyTill (backslashed <|> anyChar) quote
25+ , liftM Str . expecting "string" . betwixt '"' '"' . many $
26+ backslashed <|> satisfy (/='"')
27+ ]
2528
2629chr :: IParser Literal
2730chr = Chr <$> betwixt '\'' '\'' (backslashed <|> satisfy (/='\''))