scmdoc

Automatically generate documentation from comments in R7RS Scheme code

git clone https://git.8pit.net/scmdoc.git

 1module Util where
 2
 3import SchemeDoc.Parser.R7RS
 4import SchemeDoc.Types
 5import qualified Text.ParserCombinators.Parsec as P
 6
 7parseErrors :: P.Parser a -> String -> String
 8parseErrors p input =
 9    case P.parse p "" input of
10        Left err ->
11            last $ lines $ show err
12        Right _ -> ""
13
14parse :: String -> Either P.ParseError [Sexp]
15parse = P.parse scheme ""