{"id":34924492,"url":"https://github.com/shnarazk/tree-sitter-tonel","last_synced_at":"2026-04-13T12:01:24.529Z","repository":{"id":329662442,"uuid":"1120336245","full_name":"shnarazk/tree-sitter-tonel","owner":"shnarazk","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-21T02:36:07.000Z","size":73,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-29T23:55:13.281Z","etag":null,"topics":["pharo","smalltalk","tree-sitter"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shnarazk.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-21T01:39:21.000Z","updated_at":"2025-12-21T05:29:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/shnarazk/tree-sitter-tonel","commit_stats":null,"previous_names":["shnarazk/tree-sitter-tonel"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shnarazk/tree-sitter-tonel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shnarazk%2Ftree-sitter-tonel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shnarazk%2Ftree-sitter-tonel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shnarazk%2Ftree-sitter-tonel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shnarazk%2Ftree-sitter-tonel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shnarazk","download_url":"https://codeload.github.com/shnarazk/tree-sitter-tonel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shnarazk%2Ftree-sitter-tonel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31751705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["pharo","smalltalk","tree-sitter"],"created_at":"2025-12-26T14:17:49.775Z","updated_at":"2026-04-13T12:01:24.523Z","avatar_url":"https://github.com/shnarazk.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tree-sitter-tonel\n\n[![npm](https://img.shields.io/npm/v/tree-sitter-tonel.svg)](https://www.npmjs.com/package/tree-sitter-tonel)\n\nTonel grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter).\n\nTonel is a file format for storing Pharo/Smalltalk source code in a VCS-friendly way. It's designed to be human-readable and easy to diff. This parser supports the full Tonel specification as described at [pharo-vcs/tonel](https://github.com/pharo-vcs/tonel).\n\n## Features\n\n- Parse Tonel class definitions with STON metadata\n- Support for trait and extension definitions\n- Parse method definitions with metadata\n- Support for class-side and instance-side methods\n- Full Smalltalk expression syntax support\n- Syntax highlighting queries included\n\n## Installation\n\n### npm\n\n```bash\nnpm install tree-sitter-tonel\n```\n\n### Cargo\n\nAdd this to your `Cargo.toml`:\n\n```toml\n[dependencies]\ntree-sitter-tonel = \"0.1.0\"\n```\n\n## Usage\n\n### Node.js\n\n```javascript\nconst Parser = require('tree-sitter');\nconst Tonel = require('tree-sitter-tonel');\n\nconst parser = new Parser();\nparser.setLanguage(Tonel);\n\nconst sourceCode = `\nClass {\n    #name : #MyClass,\n    #superclass : #Object,\n    #category : #'MyPackage'\n}\n\n{ #category : #accessing }\nMyClass \u003e\u003e myMethod [\n    ^ 42\n]\n`;\n\nconst tree = parser.parse(sourceCode);\nconsole.log(tree.rootNode.toString());\n```\n\n### Rust\n\n```rust\nuse tree_sitter::Parser;\n\nfn main() {\n    let mut parser = Parser::new();\n    parser.set_language(\u0026tree_sitter_tonel::language()).unwrap();\n    \n    let source_code = r#\"\n    Class {\n        #name : #MyClass,\n        #superclass : #Object\n    }\n    \"#;\n    \n    let tree = parser.parse(source_code, None).unwrap();\n    println!(\"{}\", tree.root_node().to_sexp());\n}\n```\n\n## Editor Integration\n\nThis grammar is designed to work with:\n\n- [Zed](https://zed.dev/) - Modern code editor with tree-sitter support\n- [Helix](https://helix-editor.com/) - Post-modern modal text editor\n- [Neovim](https://neovim.io/) - Hyperextensible Vim-based text editor\n- Any editor with tree-sitter support\n\n## Syntax\n\nTonel files consist of:\n\n### Class Definitions\n\n```smalltalk\nClass {\n    #name : #Point,\n    #superclass : #Object,\n    #instVars : [\n        'x',\n        'y'\n    ],\n    #category : #'Kernel-BasicObjects'\n}\n```\n\n### Method Definitions\n\nInstance methods:\n```smalltalk\n{ #category : #accessing }\nPoint \u003e\u003e x [\n    ^ x\n]\n```\n\nClass methods:\n```smalltalk\n{ #category : #'instance creation' }\nPoint class \u003e\u003e x: xValue y: yValue [\n    ^ self new x: xValue; y: yValue\n]\n```\n\n### Traits and Extensions\n\n```smalltalk\nTrait {\n    #name : #TComparable,\n    #category : #'Kernel-Traits'\n}\n\nExtension { #name : #Object }\n```\n\n## Development\n\n### Building\n\n```bash\nnpm install\nnpx tree-sitter generate\n```\n\n### Testing\n\n```bash\nnpm test\n```\n\n### Parsing Examples\n\n```bash\nnpx tree-sitter parse examples/Point.tonel\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## References\n\n- [Tonel Specification](https://github.com/pharo-vcs/tonel)\n- [Pharo](https://pharo.org/)\n- [Tree-sitter Documentation](https://tree-sitter.github.io/)\n\n## License\n\nThis project is licensed under the Mozilla Public License 2.0 - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshnarazk%2Ftree-sitter-tonel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshnarazk%2Ftree-sitter-tonel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshnarazk%2Ftree-sitter-tonel/lists"}