Changeset 15425 for src/Pugs/Lexer.hs

Show
Ignore:
Timestamp:
03/03/07 16:37:34 (21 months ago)
Author:
audreyt
Message:

* Massive Haddoc-compatibility fix to make all modules

haddockable.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Lexer.hs

    r15327 r15425  
    1 {-# OPTIONS_GHC -fglasgow-exts -fvia-C -optc-w #-} 
     1{-# OPTIONS_GHC -fglasgow-exts -fvia-C -optc-w -cpp #-} 
    22 
    33{-| 
     
    6767balancedDelim c = case c of 
    6868    '\x0028' -> '\x0029'; '\x003C' -> '\x003E'; '\x005B' -> '\x005D'; 
     69#ifndef HADDOCK 
    6970    '\x007B' -> '\x007D'; '\x00AB' -> '\x00BB'; '\x0F3A' -> '\x0F3B'; 
    7071    '\x0F3C' -> '\x0F3D'; '\x169B' -> '\x169C'; '\x2039' -> '\x203A'; 
     
    128129    '\xFF1C' -> '\xFF1E'; '\xFF3B' -> '\xFF3D'; '\xFF5B' -> '\xFF5D'; 
    129130    '\xFF5F' -> '\xFF60'; '\xFF62' -> '\xFF63'; other    -> other 
     131#endif 
    130132 
    131133-- balanced: parses an open/close delimited expression of any non-alphanumeric character 
     
    295297            -- "\08..." and "\09..." are treated as "\0" and then "8..." or "9...". 
    296298            ('0':xs@(x:_)) | x == '8' || x == '9' -> return (0:map (toInteger . ord) xs) 
    297             _   -> error ("Error: Invalid escape sequence \\" ++ ds ++ "; write as decimal \\d" ++ ds ++ " or octal \\o" ++ ds ++ " instead") -- $ return [read ds] 
     299            _   -> error ("Error: Invalid escape sequence \\" ++ ds ++ "; write as decimal \\d" ++ ds ++ " or octal \\o" ++ ds ++ " instead") -- return [read ds] 
    298300        , based 'o'  8 octDigit 
    299301        , based 'x' 16 hexDigit