How to parse comments with FParsec
问题 I'm attempting to parse lisp-style comments from an s-expression language with FParsec. I got a bit of help with parsing single-line comments in this previous thread - How to convert an FParsec parser to parse whitespace While that was resolved, I still need to parse multiline comments. Here's the current code - /// Read whitespace character as a string. let spaceAsStr = anyOf whitespaceChars |>> fun chr -> string chr /// Read a line comment. let lineComment = pchar lineCommentChar >>.