Changeset 21790
- Timestamp:
- 08/05/08 11:10:00 (4 months ago)
- Files:
-
- 1 modified
-
src/Pugs/Lexer.hs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Lexer.hs
r21673 r21790 299 299 -- "\08..." and "\09..." are treated as "\0" and then "8..." or "9...". 300 300 ('0':xs@(x:_)) | x == '8' || x == '9' -> return (0:map (toInteger . ord) xs) 301 _ -> error ("Error: Invalid escape sequence \\" ++ ds ++ "; write as decimal \\ d" ++ ds ++ " or octal \\o" ++ ds ++ " instead") -- return [read ds]301 _ -> error ("Error: Invalid escape sequence \\" ++ ds ++ "; write as decimal \\c" ++ ds ++ " or octal \\o" ++ ds ++ " instead") -- return [read ds] 302 302 , based 'o' 8 octDigit 303 303 , based 'x' 16 hexDigit 304 , based ' d' 10 digit304 , based 'c' 10 digit 305 305 ] 306 306 return $ map (toEnum . fromInteger) codes
