Permalink
Browse files

double quote char is parsed

  • Loading branch information...
1 parent 5dee95a commit 05879a6f633a8a9a3ce9da41f34bf077a09e7ea9 @kalotay committed Feb 10, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 simple_parser.hs
View
@@ -17,7 +17,11 @@ data LispVal = Atom String
parseString :: Parser LispVal
parseString = do { char '"';
- x <- many (noneOf "\"");
+ x <- many (noneOf "\"" <|> do { char '\\'
+ ; x <- char '"'
+ ; return x
+ }
+ );
char '"';
return $ String x;
}

0 comments on commit 05879a6

Please sign in to comment.