on master help sign in
fix parsing of escaped quotes inside of strings
commitd2e1c8c51768ddacc8985c0ba1a2b1f0df26af6b authorHannes Mehnert <hannes@mehnert.org> dateWed 8 May 2013, 10:05 (13 years ago) parent4118b79
1 file changed+3−2
src/Idris/IdeSlave.hs+3−2
src/Idris/IdeSlave.hs+3−2
@@ -77,11 +77,12 @@ atomC = do string "True"; return (BoolAtom True)
7777 <|> do string "False"; return (BoolAtom False)
7878 <|> do xs <- many (noneOf " \n\t\r\"()"); return (SymbolAtom xs)
7979
80−quotedChar = noneOf "\""
80+quotedChar = try (string "\\\\" >> return '\\')
8181 <|> try (string "\\\"" >> return '"')
82+ <|> noneOf "\""
8283
8384parseSExp :: String -> Either ParseError SExp
84−parseSExp input = parse pSExp "(unknown)" input
85+parseSExp = parse pSExp "(unknown)"
8586
8687data IdeSlaveCommand = REPLCompletions String
8788 | Interpret String