Commit 24698ebd authored by bbr's avatar bbr
Browse files

characters are now shown as in pakcs for ease of reading

parent aa4c6fc0
......@@ -121,7 +121,15 @@ instance Show C_Char where
where
showl [] = showChar '"'
showl (C_Char '"':cs) = showString "\\\"" . showl cs
showl (C_Char c:cs) = showLitChar c . showl cs
showl (C_Char c:cs)
| oc <= 7 = showString "\\00" . shows oc . showl cs
| oc <= 10 = showLitChar c . showl cs
| oc <= 12 = showString "\\0" . shows oc . showl cs
| oc <= 13 = showLitChar c . showl cs
| oc <= 31 = showString "\\0" . shows oc . showl cs
| oc <= 126 = showLitChar c . showl cs
| otherwise = showString "\\" . shows oc . showl cs
where oc = ord c
showl (SearchChar f1 f2 f3 f4:cs) = showLitChar (scToChar f1 f2 f3 f4) . showl cs
showl (C_CharFreeVar r:cs) = showString ('_':show r) . showl cs
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment