{"id":13513439,"url":"https://github.com/stsewd/tree-sitter-rst","last_synced_at":"2025-04-12T23:31:08.424Z","repository":{"id":37954696,"uuid":"268685948","full_name":"stsewd/tree-sitter-rst","owner":"stsewd","description":"reStructuredText grammar for tree-sitter","archived":false,"fork":false,"pushed_at":"2024-04-04T03:12:24.000Z","size":1745,"stargazers_count":49,"open_issues_count":16,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-05-21T11:25:32.334Z","etag":null,"topics":["grammar","restructuredtext","rst","tree-sitter","tree-sitter-parser"],"latest_commit_sha":null,"homepage":"https://stsewd.dev/tree-sitter-rst/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stsewd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":"stsewd","ko_fi":"stsewd","custom":["https://paypal.me/stsewd","https://www.buymeacoffee.com/stsewd"]}},"created_at":"2020-06-02T02:51:23.000Z","updated_at":"2024-06-04T09:12:06.149Z","dependencies_parsed_at":"2023-12-29T03:31:00.378Z","dependency_job_id":"5543fc58-9903-4fe5-9c90-350ea81a6b79","html_url":"https://github.com/stsewd/tree-sitter-rst","commit_stats":{"total_commits":237,"total_committers":4,"mean_commits":59.25,"dds":"0.021097046413502074","last_synced_commit":"25e6328872ac3a764ba8b926aea12719741103f1"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stsewd%2Ftree-sitter-rst","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stsewd%2Ftree-sitter-rst/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stsewd%2Ftree-sitter-rst/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stsewd%2Ftree-sitter-rst/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stsewd","download_url":"https://codeload.github.com/stsewd/tree-sitter-rst/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647257,"owners_count":21139081,"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":["grammar","restructuredtext","rst","tree-sitter","tree-sitter-parser"],"created_at":"2024-08-01T05:00:25.198Z","updated_at":"2025-04-12T23:31:08.418Z","avatar_url":"https://github.com/stsewd.png","language":"C","funding_links":["https://github.com/sponsors/stsewd","https://ko-fi.com/stsewd","https://paypal.me/stsewd","https://www.buymeacoffee.com/stsewd"],"categories":["Software","C"],"sub_categories":["Otros"],"readme":"# tree-sitter-rst\n\n[![CI](https://github.com/stsewd/tree-sitter-rst/workflows/CI/badge.svg)](https://github.com/stsewd/tree-sitter-rst/actions?query=workflow%3ACI+branch%3Amaster)\n[![PyPI - Version](https://img.shields.io/pypi/v/tree-sitter-rst)](https://pypi.org/project/tree-sitter-rst/)\n[![NPM Version](https://img.shields.io/npm/v/tree-sitter-rst)](https://www.npmjs.com/package/tree-sitter-rst)\n[![Crates.io Version](https://img.shields.io/crates/v/tree-sitter-rst)](https://crates.io/crates/tree-sitter-rst)\n\nreStructuredText grammar for [tree-sitter](https://tree-sitter.github.io/tree-sitter/).\nBased on the specification from  \u003chttps://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html\u003e.\n\nCheck the playground at \u003chttps://stsewd.dev/tree-sitter-rst/\u003e.\n\n**Note: this grammar is still under development, a lot of things may change!**\n\n## TODO\n\n- Allow lists with blank lines between items\n- Refactor parse citation and footer reference\n- Nested line blocks\n- Option lists\n- Add some nodes to inline?\n- Check if there is a way to re-implement some nodes to JS instead of C?\n- A definition list with classifiers can't be separated by a blank line.\n- tests, tests, and more tests!\n\n## Design notes\n\n- Nodes that contain body elements inside (like lists or directives),\n  are inside a node named `body`.\n- In RST sections are a big node that contains body elements,\n  here they are just a node containing the title.\n  This is to avoid guessing the level of subtitles.\n- In RST standalone hyperlinks are `reference` nodes,\n  here they are `standalone_hyperlink` nodes.\n  This is to avoid confusion with inline references nodes\n  (that are a `reference` node).\n- Literal blocks are part of the paragraph they precede, not a separate node,\n  except for the expanded form of literal blocks.\n- In rst directives only have \"body\" node,\n  here the body is parsed as arguments/options/content.\n\n## Design decisions\n\n- Implement tables?\n- Validate length of adornments in sections?\n\n  The spec doesn't mention this, but this paragraph does.\n\n  \u003e The underline/overline must be at least as long as the title text.\n\n  https://docutils.sourceforge.io/docs/user/rst/quickstart.html\n\n\n## Projects using this grammar\n\n- [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter)\n- [helix](https://github.com/helix-editor/helix)\n- [zed-rst](https://github.com/elmarco/zed-rst)\n- Yours?\n\n## Contributing\n\nCheck the [CONTRIBUTING.md](CONTRIBUTING.md) file\n\n## Other grammars\n\n- [tree-sitter-comment](https://github.com/stsewd/tree-sitter-comment): grammar for comment tags like `TODO`, `FIXME(user)`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstsewd%2Ftree-sitter-rst","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstsewd%2Ftree-sitter-rst","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstsewd%2Ftree-sitter-rst/lists"}