{"id":13837997,"url":"https://github.com/ocaml-doc/odoc-parser","last_synced_at":"2026-01-16T16:51:38.711Z","repository":{"id":38186319,"uuid":"379744647","full_name":"ocaml-doc/odoc-parser","owner":"ocaml-doc","description":"An OCaml library for parsing documentation comments written in 'odoc markup', a superset of 'ocamldoc markup'.","archived":false,"fork":false,"pushed_at":"2023-10-19T08:19:56.000Z","size":959,"stargazers_count":15,"open_issues_count":3,"forks_count":14,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-11-21T00:32:54.983Z","etag":null,"topics":["ocaml","parser"],"latest_commit_sha":null,"homepage":"","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ocaml-doc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-23T22:35:29.000Z","updated_at":"2024-11-04T23:44:43.000Z","dependencies_parsed_at":"2024-01-13T17:12:07.736Z","dependency_job_id":"269ca363-3304-4aed-b09e-1dedf9012b2e","html_url":"https://github.com/ocaml-doc/odoc-parser","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ocaml-doc/odoc-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocaml-doc%2Fodoc-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocaml-doc%2Fodoc-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocaml-doc%2Fodoc-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocaml-doc%2Fodoc-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ocaml-doc","download_url":"https://codeload.github.com/ocaml-doc/odoc-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ocaml-doc%2Fodoc-parser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264639844,"owners_count":23642313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ocaml","parser"],"created_at":"2024-08-04T15:01:33.004Z","updated_at":"2026-01-16T16:51:38.695Z","avatar_url":"https://github.com/ocaml-doc.png","language":"OCaml","readme":"# odoc-parser \n\nOdoc-parser is a parser for odoc markup, which is an extension of the original markup\nlanguage parsed by [ocamldoc](https://ocaml.org/releases/4.12/htmlman/ocamldoc.html).\n\nOCaml code can contain specially formatted comments that are used to document the\ninterfaces of modules. These comments are delimited by `(**` and `*)`. This parser\nis intended to be used to parse the contents of these comments.\n\nThe parser is part of the [odoc](https://github.com/ocaml/odoc/) project.\n\nPlease see [CONTRIBUTING.md](CONTRIBUTING.md) for details of the development process.\n\n## Example usage:\n\n```ocaml\n# #require \"odoc-parser\";;\n# let location = {Lexing.pos_fname = \"\"; pos_lnum = 1; pos_bol = 0; pos_cnum = 0};;\nval location : Lexing.position =\n  {Lexing.pos_fname = \"\"; pos_lnum = 1; pos_bol = 0; pos_cnum = 0}\n# let p = Odoc_parser.parse_comment ~location ~text:\"{b Bold!}[unfinished\";;\nval p : Odoc_parser.t = \u003cabstr\u003e\n# let w = Odoc_parser.warnings p;;\nval w : Odoc_parser.Warning.t list =\n  [{Odoc_parser.Warning.location =\n     {Odoc_parser.Loc.file = \"\";\n      start = {Odoc_parser.Loc.line = 1; column = 20};\n      end_ = {Odoc_parser.Loc.line = 1; column = 20}};\n    message = \"End of text is not allowed in '[...]' (code).\"}]\n# Odoc_parser.ast p;;\n- : Odoc_parser.Ast.t =\n[{Odoc_parser__.Loc.location =\n   {Odoc_parser__.Loc.file = \"\";\n    start = {Odoc_parser__.Loc.line = 1; column = 0};\n    end_ = {Odoc_parser__.Loc.line = 1; column = 20}};\n  value =\n   `Paragraph\n     [{Odoc_parser__.Loc.location =\n        {Odoc_parser__.Loc.file = \"\";\n         start = {Odoc_parser__.Loc.line = 1; column = 0};\n         end_ = {Odoc_parser__.Loc.line = 1; column = 9}};\n       value =\n        `Styled\n          (`Bold,\n           [{Odoc_parser__.Loc.location =\n              {Odoc_parser__.Loc.file = \"\";\n               start = {Odoc_parser__.Loc.line = 1; column = 3};\n               end_ = {Odoc_parser__.Loc.line = 1; column = 8}};\n             value = `Word \"Bold!\"}])};\n      {Odoc_parser__.Loc.location =\n        {Odoc_parser__.Loc.file = \"\";\n         start = {Odoc_parser__.Loc.line = 1; column = 9};\n         end_ = {Odoc_parser__.Loc.line = 1; column = 20}};\n       value = `Code_span \"unfinished\"}]}]\n```\n\n","funding_links":[],"categories":["OCaml"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focaml-doc%2Fodoc-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Focaml-doc%2Fodoc-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Focaml-doc%2Fodoc-parser/lists"}