{"id":15680461,"url":"https://github.com/the-mikedavis/tree-sitter-erlang","last_synced_at":"2025-05-07T20:10:12.907Z","repository":{"id":41229118,"uuid":"458051931","full_name":"the-mikedavis/tree-sitter-erlang","owner":"the-mikedavis","description":"An Erlang grammar for tree-sitter","archived":false,"fork":false,"pushed_at":"2025-02-06T01:09:18.000Z","size":5807,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-31T13:37:00.620Z","etag":null,"topics":["erlang","lexer","parser","tree-sitter"],"latest_commit_sha":null,"homepage":"https://the-mikedavis.github.io/tree-sitter-erlang/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/the-mikedavis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2022-02-11T05:01:38.000Z","updated_at":"2025-02-06T01:09:21.000Z","dependencies_parsed_at":"2024-02-18T16:31:31.620Z","dependency_job_id":"021ad83c-f347-4590-867a-607a11305ddc","html_url":"https://github.com/the-mikedavis/tree-sitter-erlang","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-mikedavis%2Ftree-sitter-erlang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-mikedavis%2Ftree-sitter-erlang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-mikedavis%2Ftree-sitter-erlang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-mikedavis%2Ftree-sitter-erlang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/the-mikedavis","download_url":"https://codeload.github.com/the-mikedavis/tree-sitter-erlang/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252949279,"owners_count":21830152,"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":["erlang","lexer","parser","tree-sitter"],"created_at":"2024-10-03T16:42:07.455Z","updated_at":"2025-05-07T20:10:12.855Z","avatar_url":"https://github.com/the-mikedavis.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tree-sitter-erlang\n\n[![CI](https://github.com/the-mikedavis/tree-sitter-erlang/actions/workflows/ci.yml/badge.svg)](https://github.com/the-mikedavis/tree-sitter-erlang/actions/workflows/ci.yml)\n\nAn Erlang grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter).\n\nSee the [docs](./docs/README.md) for design and development information.\n\n\u003cimg src=\"./docs/example.png\" width=\"700\"/\u003e\n\n\u003csup\u003e_Above: an [excerpt](https://github.com/rabbitmq/khepri/blob/9fbf7ec827bbf38c81a5bc69a128eec4bde3cdf9/src/khepri_fun.erl#L1142-L1155) from [rabbitmq/khepri](https://github.com/rabbitmq/khepri) using this grammar in the [Helix](https://github.com/helix-editor/helix) editor._\u003c/sup\u003e\n\n## Caveat\n\nFrom the\n[docs](https://github.com/erlang/otp/blob/9e381125bbd93dfa2f17d4954b54aead749bf012/system/doc/reference_manual/macros.xml#L127-L128)\non macros:\n\n\u003e It is good programming practice, but not mandatory, to ensure\n\u003e that a macro definition is a valid Erlang syntactic form.\n\nThis grammar attempts to parse within `define` attributes with best-effort\nbut some macro definitions and their resulting macros may produce `(ERROR)`\nnodes.\n\n## Status\n\nIt's pretty complete despite the above caveat. It has a 99.58% pass rate\nagainst the .erl/.hrl files in the OTP codebase[^1]. Try it out on the online\n[playground](https://the-mikedavis.github.io/tree-sitter-erlang/).\n\n[^1]: The remaining files that exhibit errors are either not truly Erlang\n      or use preprocessor directives with blatantly invalid syntax. This\n      can be measured with\n      `tree-sitter parse --quiet --stat path/to/otp/**.{erl,hrl}`.\n\n## License\n\nThis project is licensed under the Apache-2.0 license. Any files under\nthe `queries/` directory are licensed under the BSD 0-clause license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-mikedavis%2Ftree-sitter-erlang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthe-mikedavis%2Ftree-sitter-erlang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-mikedavis%2Ftree-sitter-erlang/lists"}