diff options
author | Marvin Borner | 2022-08-18 13:28:58 +0200 |
---|---|---|
committer | Marvin Borner | 2022-08-18 13:29:24 +0200 |
commit | 9148f5d2a82ac7784649bf8a75b4e9b6d87b6cea (patch) | |
tree | d9ac1ff0b06401a8206c1872378f23e93381048e /src/Parser.hs | |
parent | 266286d108b8304efc67d64f47c1ee9d8d4b17c9 (diff) |
Reduced redundant testing
Diffstat (limited to 'src/Parser.hs')
-rw-r--r-- | src/Parser.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Parser.hs b/src/Parser.hs index 1b3ac41..c23130d 100644 --- a/src/Parser.hs +++ b/src/Parser.hs @@ -101,7 +101,9 @@ parseString = do parseChar :: Parser Expression parseChar = do ch <- - between (char '\'') (char '\'') (satisfy (`notElem` "\"\\")) + between (char '\'') + (char '\'') + ((char '\\' *> specialEscape) <|> satisfy (`notElem` "\"\\")) <?> "quoted char" pure $ charToExpression ch |