{"_id":"@danyiel-colin/tree-sitter-toon","_rev":"3-be309bd888d8483abc86d299df250eee","name":"@danyiel-colin/tree-sitter-toon","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"@danyiel-colin/tree-sitter-toon","version":"0.1.0","keywords":["incremental","parsing","tree-sitter","toon","data-format"],"author":{"name":"DanEscher98"},"license":"MIT","_id":"@danyiel-colin/tree-sitter-toon@0.1.0","maintainers":[{"name":"danyiel-colin","email":"danyiel5978@gmail.com"}],"homepage":"https://github.com/DanEscher98/tree-sitter-toon#readme","bugs":{"url":"https://github.com/DanEscher98/tree-sitter-toon/issues"},"dist":{"shasum":"bb28df23ccd282470816cf90122aac164e3ca778","tarball":"https://registry.npmjs.org/@danyiel-colin/tree-sitter-toon/-/tree-sitter-toon-0.1.0.tgz","fileCount":21,"integrity":"sha512-rCRNrMS9UOxrX2X7q5+E6K1GSvmOdEeeYSbnTl2lkg6BOelDBXUT4hdftvFBgCVKcs4WR3eAksO9hAeQOfmgHQ==","signatures":[{"sig":"MEQCIFav5A7m+C4UVuCD0aNvQP1OyIelZT+MFFaG0NgJ0YoWAiBn33jepfAGqaNussyUyRnMn1aMgd/Aw256DoHJwVuY+w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":157128},"main":"bindings/node","types":"bindings/node","gitHead":"5bf95e2b9691e831fdcd37bc00405510e9ee94a0","scripts":{"lint":"eslint grammar.js","test":"tree-sitter test","build":"tree-sitter generate","parse":"tree-sitter parse","start":"tree-sitter playground","install":"node-gyp-build","generate":"tree-sitter generate","prestart":"tree-sitter build --wasm","highlight":"tree-sitter highlight","test:node":"node --test bindings/node/*_test.js"},"_npmUser":{"name":"danyiel-colin","email":"danyiel5978@gmail.com"},"repository":{"url":"git+https://github.com/DanEscher98/tree-sitter-toon.git","type":"git"},"_npmVersion":"10.9.2","description":"Tree-sitter grammar for TOON (Token-Oriented Object Notation)","directories":{},"_nodeVersion":"23.10.0","dependencies":{"node-addon-api":"^8.2.2","node-gyp-build":"^4.8.2"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.14.0","prebuildify":"^6.0.1","tree-sitter-cli":"^0.24.0","eslint-config-treesitter":"^1.0.2"},"peerDependencies":{"tree-sitter":"^0.21.1"},"peerDependenciesMeta":{"tree-sitter":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/tree-sitter-toon_0.1.0_1764523607023_0.9270609577652225","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@danyiel-colin/tree-sitter-toon","version":"0.1.1","keywords":["incremental","parsing","tree-sitter","toon","data-format"],"author":{"name":"DanEscher98"},"license":"MIT","_id":"@danyiel-colin/tree-sitter-toon@0.1.1","maintainers":[{"name":"danyiel-colin","email":"danyiel5978@gmail.com"}],"homepage":"https://github.com/DanEscher98/tree-sitter-toon#readme","bugs":{"url":"https://github.com/DanEscher98/tree-sitter-toon/issues"},"dist":{"shasum":"9a21ab17de0e18f64e41e78e5adaab4068bab25c","tarball":"https://registry.npmjs.org/@danyiel-colin/tree-sitter-toon/-/tree-sitter-toon-0.1.1.tgz","fileCount":21,"integrity":"sha512-FHKPqQow3F2j1yV50DGQtXrfl/w+n/YynogefZvSgGIsVdt39fkRcgKlhy5/6RtW2R9ao5+dbCSUiVNCDdnMBA==","signatures":[{"sig":"MEUCIQDQ1H1ZxvyILMOgDfUlWr7nYtOkR6UCrW9kWQGu32+NbQIgTQEa2zGgRbUQUZfYzdPOHk4oKjytmE6FczG1K/32vMk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":157128},"main":"bindings/node","types":"bindings/node","gitHead":"73f4156327c9b24d4c032d47ce8fad9334f9cf7c","scripts":{"lint":"eslint grammar.js","test":"tree-sitter test","build":"tree-sitter generate","parse":"tree-sitter parse","start":"tree-sitter playground","install":"node-gyp-build","generate":"tree-sitter generate","prestart":"tree-sitter build --wasm","highlight":"tree-sitter highlight","test:node":"node --test bindings/node/*_test.js"},"_npmUser":{"name":"danyiel-colin","email":"danyiel5978@gmail.com"},"repository":{"url":"git+https://github.com/DanEscher98/tree-sitter-toon.git","type":"git"},"_npmVersion":"10.9.2","description":"Tree-sitter grammar for TOON (Token-Oriented Object Notation)","directories":{},"_nodeVersion":"23.10.0","dependencies":{"node-addon-api":"^8.2.2","node-gyp-build":"^4.8.2"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.14.0","prebuildify":"^6.0.1","tree-sitter-cli":"^0.24.0","eslint-config-treesitter":"^1.0.2"},"peerDependencies":{"tree-sitter":"^0.21.1"},"peerDependenciesMeta":{"tree-sitter":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/tree-sitter-toon_0.1.1_1764523959055_0.36365617690193286","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@danyiel-colin/tree-sitter-toon","version":"0.1.3","description":"Tree-sitter grammar for TOON (Token-Oriented Object Notation)","repository":{"type":"git","url":"git+https://github.com/DanEscher98/tree-sitter-toon.git"},"license":"MIT","author":{"name":"DanEscher98"},"main":"bindings/node","types":"bindings/node","keywords":["incremental","parsing","tree-sitter","toon","data-format"],"dependencies":{"node-addon-api":"^8.2.2","node-gyp-build":"^4.8.2"},"devDependencies":{"eslint":"^9.14.0","eslint-config-treesitter":"^1.0.2","prebuildify":"^6.0.1","tree-sitter-cli":"^0.25.10"},"peerDependencies":{"tree-sitter":"^0.21.1"},"peerDependenciesMeta":{"tree-sitter":{"optional":true}},"scripts":{"install":"node-gyp-build","generate":"tree-sitter generate","build":"tree-sitter generate","prestart":"tree-sitter build --wasm","start":"tree-sitter playground","test":"tree-sitter test","test:node":"node --test bindings/node/*_test.js","parse":"tree-sitter parse","highlight":"tree-sitter highlight","lint":"eslint grammar.js"},"_id":"@danyiel-colin/tree-sitter-toon@0.1.3","gitHead":"419ef59266239921588e73f3944199335f61be95","bugs":{"url":"https://github.com/DanEscher98/tree-sitter-toon/issues"},"homepage":"https://github.com/DanEscher98/tree-sitter-toon#readme","_nodeVersion":"20.19.5","_npmVersion":"10.8.2","dist":{"integrity":"sha512-2l6aoNTqwGn2JB2OlvvdmNH5pm8QNTXbdAJANWmsTqFJDEkRzTmCGFJNuSsOPQHO7kiScj/ZiO34e8F0JWCJXw==","shasum":"00283bda5d4b7ca9f6ed8fc399ed4ea96e9c8af6","tarball":"https://registry.npmjs.org/@danyiel-colin/tree-sitter-toon/-/tree-sitter-toon-0.1.3.tgz","fileCount":21,"unpackedSize":158078,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCxyMycPAIopSXOF1urWwxIpQky5mLpZ3RCgAX8uGiN1QIhAICX+VyJHcB5kfnSrpLuaWMNfg10NfaiH3/13Cz4/lNq"}]},"_npmUser":{"name":"danyiel-colin","email":"danyiel5978@gmail.com"},"directories":{},"maintainers":[{"name":"danyiel-colin","email":"danyiel5978@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tree-sitter-toon_0.1.3_1764525453824_0.1768924863792274"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-30T17:26:46.920Z","modified":"2025-11-30T17:57:34.248Z","0.1.0":"2025-11-30T17:26:47.221Z","0.1.1":"2025-11-30T17:32:39.269Z","0.1.3":"2025-11-30T17:57:34.059Z"},"bugs":{"url":"https://github.com/DanEscher98/tree-sitter-toon/issues"},"author":{"name":"DanEscher98"},"license":"MIT","homepage":"https://github.com/DanEscher98/tree-sitter-toon#readme","keywords":["incremental","parsing","tree-sitter","toon","data-format"],"repository":{"type":"git","url":"git+https://github.com/DanEscher98/tree-sitter-toon.git"},"description":"Tree-sitter grammar for TOON (Token-Oriented Object Notation)","maintainers":[{"name":"danyiel-colin","email":"danyiel5978@gmail.com"}],"readme":"# tree-sitter-toon\n\nTree-sitter grammar for [TOON](https://github.com/toon-format/spec) (Token-Oriented Object Notation).\n\n## Features\n\n- Full TOON spec compliance (v3.0)\n- External scanner for indentation-sensitive parsing\n- Support for all TOON constructs:\n  - Objects with nested structures\n  - Tabular arrays with field lists\n  - List arrays with mixed content\n  - All delimiter types (comma, tab, pipe)\n  - Dotted keys (`a.b.c: value`)\n  - Quoted keys and strings with escape sequences\n\n## Installation\n\n### Neovim (with nvim-treesitter)\n\n#### lazy.nvim\n\n```lua\n{\n  \"nvim-treesitter/nvim-treesitter\",\n  build = \":TSUpdate\",\n  config = function()\n    local parser_config = require(\"nvim-treesitter.parsers\").get_parser_configs()\n    parser_config.toon = {\n      install_info = {\n        url = \"https://github.com/DanEscher98/tree-sitter-toon\",\n        files = { \"src/parser.c\", \"src/scanner.c\" },\n        branch = \"main\",\n      },\n      filetype = \"toon\",\n    }\n\n    require(\"nvim-treesitter.configs\").setup({\n      ensure_installed = { \"toon\" },\n      highlight = { enable = true },\n    })\n  end,\n}\n```\n\n#### packer.nvim\n\n```lua\nuse {\n  \"nvim-treesitter/nvim-treesitter\",\n  run = \":TSUpdate\",\n  config = function()\n    local parser_config = require(\"nvim-treesitter.parsers\").get_parser_configs()\n    parser_config.toon = {\n      install_info = {\n        url = \"https://github.com/DanEscher98/tree-sitter-toon\",\n        files = { \"src/parser.c\", \"src/scanner.c\" },\n        branch = \"main\",\n      },\n      filetype = \"toon\",\n    }\n\n    require(\"nvim-treesitter.configs\").setup({\n      ensure_installed = { \"toon\" },\n      highlight = { enable = true },\n    })\n  end,\n}\n```\n\n#### vim-plug\n\n```vim\nPlug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}\n```\n\nThen in your init.lua:\n\n```lua\nlocal parser_config = require(\"nvim-treesitter.parsers\").get_parser_configs()\nparser_config.toon = {\n  install_info = {\n    url = \"https://github.com/DanEscher98/tree-sitter-toon\",\n    files = { \"src/parser.c\", \"src/scanner.c\" },\n    branch = \"main\",\n  },\n  filetype = \"toon\",\n}\n\nrequire(\"nvim-treesitter.configs\").setup({\n  ensure_installed = { \"toon\" },\n  highlight = { enable = true },\n})\n```\n\n### File Type Detection\n\nAdd to your Neovim config:\n\n```lua\nvim.filetype.add({\n  extension = {\n    toon = \"toon\",\n  },\n})\n```\n\n### Manual Installation (CLI)\n\n```bash\nnpm install\nnpm run generate\nnpm test\n```\n\n## Usage\n\n### Parsing a File\n\n```bash\nnpx tree-sitter parse example.toon\n```\n\n### Running Tests\n\n```bash\nnpm test\n```\n\n## Example\n\n```toon\n# Simple object\nname: Alice\nage: 30\nactive: true\n\n# Tabular array\nusers[3]{id,name,role}:\n  1,Alice,admin\n  2,Bob,user\n  3,Charlie,guest\n\n# Nested object\nconfig:\n  database:\n    host: localhost\n    port: 5432\n  features:\n    - logging\n    - metrics\n```\n\n## Query Files\n\nThe grammar includes query files for full nvim-treesitter integration:\n\n### highlights.scm\n\nSyntax highlighting with standard Neovim capture groups:\n\n| Node Type | Capture Group |\n|-----------|---------------|\n| `null`, `true`, `false` | `@constant.builtin`, `@boolean` |\n| `number`, `integer` | `@number` |\n| `quoted_string`, `unquoted_string` | `@string` |\n| `escape_sequence` | `@string.escape` |\n| `identifier` (in keys) | `@property` |\n| `:`, `,`, `\\|`, `.` | `@punctuation.delimiter` |\n| `[`, `]`, `{`, `}` | `@punctuation.bracket` |\n| `-` (list marker) | `@punctuation.special` |\n\n### folds.scm\n\nCode folding support for:\n- Nested objects (`pair` with `object` value)\n- Array declarations with content\n- Root arrays with content\n- List items with nested objects\n\n### indents.scm\n\nAuto-indentation for:\n- Nested objects\n- Array content blocks\n- List items with nested content\n\n### locals.scm\n\nScope and definition tracking for:\n- Objects as scopes\n- Keys as local definitions\n- Field names as definitions\n\n## License\n\nMIT\n","readmeFilename":"README.md"}