We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6b1b846 commit beac8edCopy full SHA for beac8ed
1 file changed
ngc/Reader.fs
@@ -36,6 +36,7 @@ type SExp =
36
| List of SExp list
37
38
let ws parser = parser .>> spaces
39
+let commented parser = ws parser .>> (opt ((skipChar ';') .>> (skipRestOfLine true)))
40
let list,listRef = createParserForwardedToRef()
41
42
let numberOptions =
@@ -77,7 +78,7 @@ let symbol = (many1Chars (letter <|> digit <|> symChars)) |>> Symbol
77
78
let atom = (pnumber <|> string <|> symbol) |>> Atom
79
80
let listElement = choice [atom;list]
-let sexp = ws (pstring "(") >>. many (ws listElement) .>> ws (pstring ")") |>> List
81
+let sexp = commented (pstring "(") >>. many (commented listElement) .>> commented (pstring ")") |>> List
82
let parser = many1 (choice [atom;sexp])
83
do listRef := sexp
84
0 commit comments