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