Commit bad74384 authored by Camil Staps's avatar Camil Staps 🐧

Careful with backslashes in Clean

parent 241917c1
......@@ -128,5 +128,5 @@ where
shorthandClass :: [Char] -> Maybe ([(Char,Char)], [Char])
shorthandClass ['\\':c:cs] = (\cc -> (cc,cs)) <$> lookup c shorthand_classes
shorthandClass ['.':cs] = Just ([('\0','\9'),('\11','\255')], cs)
shorthandClass ['.':cs] = Just ([('\x00','\x09'),('\x0b','\xff')], cs)
shorthandClass _ = Nothing
......@@ -13,9 +13,9 @@ escape_sequences :==
shorthand_classes :==
[ ('w', [('A','Z'),('a','z'),('0','9'),('_','_')])
, ('W', [('\0','/'),(':','@'),('[','^'),('`','`'),('{','\255')])
, ('W', [('\0','/'),(':','@'),('[','^'),('`','`'),('{','\xff')])
, ('d', [('0','9')])
, ('D', [('\0','/'),(':','\255')])
, ('s', [(' ',' '),('\t','\n'),('\f','\r')])
, ('S', [('\0','\8'),('\11','\11'),('\14','\31'),('!','\255')])
, ('D', [('\x00','/'),(':','\xff')])
, ('s', [(' ',' '),('\t','\n'),('\x0c','\x0d')])
, ('S', [('\x00','\x08'),('\x0b','\x0b'),('\x0e','\x1f'),('!','\xff')])
]
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