on master help sign in
Modify documentation comment parsing
25ec644Edwin Brady
src/Core/CoreParser.hs−4
@@ -55,12 +55,10 @@ lexWS = do i <- getInput
55
55
56 simpleSpace = skipMany1 (satisfy isSpace)
56 simpleSpace = skipMany1 (satisfy isSpace)
57 oneLineComment = do try (do string ("--")
57 oneLineComment = do try (do string ("--")
58− skipMany simpleSpace
59 satisfy (\x -> x /= '|' && x /= '^'))
58 satisfy (\x -> x /= '|' && x /= '^'))
60 skipMany (satisfy (/= '\n'))
59 skipMany (satisfy (/= '\n'))
61 return ()
60 return ()
62 multiLineComment = do try (do string "{-"
61 multiLineComment = do try (do string "{-"
63− skipMany simpleSpace
64 satisfy (\x -> x /= '|' && x /= '^'))
62 satisfy (\x -> x /= '|' && x /= '^'))
65 inCommentMulti
63 inCommentMulti
66
64
@@ -136,7 +134,6 @@ mkName (n, ns) = NS (UN n) (reverse (parseNS ns))
136pDocComment :: Char -> CParser a String
134pDocComment :: Char -> CParser a String
137pDocComment c
135pDocComment c
138 = try (do string ("--")
136 = try (do string ("--")
139− option ' ' (lchar ' ')
140 char c
137 char c
141 skipMany simpleSpace
138 skipMany simpleSpace
142 i <- getInput
139 i <- getInput
@@ -145,7 +142,6 @@ pDocComment c
145 whiteSpace
142 whiteSpace
146 return doc)
143 return doc)
147 <|> try (do string ("{-")
144 <|> try (do string ("{-")
148− option ' ' (lchar ' ')
149 char c
145 char c
150 skipMany simpleSpace
146 skipMany simpleSpace
151 i <- getInput
147 i <- getInput