Turned REM into \ in the parser, as that was the easiest place to do it

This commit is contained in:
Neil Brown 2009-04-07 15:43:56 +00:00
parent 095e3e1680
commit e648a87fd1

View File

@ -897,7 +897,11 @@ isAssocOperator _ = False
udOperator :: (String -> Bool) -> OccParser A.Name
udOperator isOp = do m <- md
n <- genToken test
return $ A.Name m n
return $ A.Name m $
-- Turn REM into \ now, to save effort later:
if (n == "REM")
then "\\"
else n
where
test (Token _ (TokReserved name))
= if isOp name then Just name else Nothing