carp-reader
parses Carp source code.
(load "git@github.com:carpentry-org/carp-reader@0.5.1")
(match (Reader.parse "(defn hello [] (println \"hi\"))")
(Result.Success forms)
(for [i 0 (Array.length &forms)]
(IO.println &(Form.str (Located.form (Box.peek (Array.unsafe-nth &forms i))))))
(Result.Error e)
(IO.errorln &(Parser.format-error &e)))
Modules
Formis the AST sumtype and its pretty-printer.Readerprovides strict parsing and lossless editing documents.ReaderDocumentreports complete, incomplete, or invalid input.ReaderNoderetains source positions and written syntax.