Skip to main content

nvmrc grammar for tree-sitter

Project description

tree-sitter-nvmrc

Checks and Tests REUSE status

nvmrc grammar for tree-sitter.

Parses .nvmrc files (the node-version files that nvm and compatible tools read). The grammar is permissive: it splits each line into an optional key/value on the first =, keeps # comments and surrounding whitespace as extras, and leaves validation (e.g. rejecting bad version ranges) to downstream consumers.

See test/corpus/ for the full set of examples that define the grammar's behavior.

References

  • nvm: The reference implementation. nvm_process_nvmrc in nvm.sh defines the parse: split into key/value on the first =, keeping the remainder of the line verbatim as the value.
  • nvmrc: An alternative npm parser that instead splits the value into parts.

The grammar keeps enough structure to describe both interpretations.

Development

Edit grammar.js, then regenerate and test:

tree-sitter generate
tree-sitter test

The parser under src/ is generated from grammar.js. Regenerate and commit it alongside any grammar change.

License

MIT

Bundled third-party MIT material is acknowledged in THIRD-PARTY-NOTICES.txt.

This repository is REUSE-compliant; new files need an SPDX header or a .license sidecar.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tree_sitter_nvmrc-0.1.1.tar.gz (14.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tree_sitter_nvmrc-0.1.1-cp310-abi3-win_arm64.whl (12.0 kB view details)

Uploaded CPython 3.10+Windows ARM64

tree_sitter_nvmrc-0.1.1-cp310-abi3-win_amd64.whl (12.3 kB view details)

Uploaded CPython 3.10+Windows x86-64

tree_sitter_nvmrc-0.1.1-cp310-abi3-musllinux_1_2_x86_64.whl (16.3 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

tree_sitter_nvmrc-0.1.1-cp310-abi3-musllinux_1_2_aarch64.whl (16.7 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

tree_sitter_nvmrc-0.1.1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (17.1 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

tree_sitter_nvmrc-0.1.1-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (16.2 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ x86-64manylinux: glibc 2.5+ x86-64

tree_sitter_nvmrc-0.1.1-cp310-abi3-macosx_11_0_arm64.whl (10.6 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

tree_sitter_nvmrc-0.1.1-cp310-abi3-macosx_10_9_x86_64.whl (10.1 kB view details)

Uploaded CPython 3.10+macOS 10.9+ x86-64

File details

Details for the file tree_sitter_nvmrc-0.1.1.tar.gz.

File metadata

  • Download URL: tree_sitter_nvmrc-0.1.1.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tree_sitter_nvmrc-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5644a7206e3baf1db944a3c9452acbbe4694d003d250a53bba81e68176f7219f
MD5 695b02dc94be46d4ee3e9bcec3baa920
BLAKE2b-256 3c7c92449764c3afc4fc292ebe1f3d1534f2d9d2d9be02a4e617c571a25846ab

See more details on using hashes here.

File details

Details for the file tree_sitter_nvmrc-0.1.1-cp310-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for tree_sitter_nvmrc-0.1.1-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 460447755f5b0fb78319e75ffe1ea86732a6747f350dd181c21045c350128f24
MD5 3dd4825689d9a21cb06b8798779c67db
BLAKE2b-256 6d84ad269ea539cf06fea48a7ea9d6dec076b0a1d929182bbd458776d84626e2

See more details on using hashes here.

File details

Details for the file tree_sitter_nvmrc-0.1.1-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for tree_sitter_nvmrc-0.1.1-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 c96cbf11624ffbb6400af7e731ceb08cef1fe043a01adca85627103f8ea6cca9
MD5 0bb8b61747015f71a94629b4189c5bc5
BLAKE2b-256 dc1c0531d7f40ebd062450c15997eef8f9b477facc9adf240d6be93e5c3b5546

See more details on using hashes here.

File details

Details for the file tree_sitter_nvmrc-0.1.1-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_nvmrc-0.1.1-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a0f7a15d93d09541f7913f29d672111f1f0d29a298aa936613aed0f4d2eb729b
MD5 39d528827bfb24a9c2db84c652f2b916
BLAKE2b-256 7c4aabbf16d6f8689c02cc7e005302e6020d8d2db8e37548edb72a65793deaf4

See more details on using hashes here.

File details

Details for the file tree_sitter_nvmrc-0.1.1-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for tree_sitter_nvmrc-0.1.1-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 4a412d04c6b8377e91ec961ee41b8a4a4bc8fef4eef159a2f3e935fd164d6af3
MD5 e2c299d82595875710b0e4ffb40210be
BLAKE2b-256 a724cb690a9b8b291d583c1fbccfc69f191597f26a71e2462f0390229c07b452

See more details on using hashes here.

File details

Details for the file tree_sitter_nvmrc-0.1.1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for tree_sitter_nvmrc-0.1.1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2136f0f363b4d6d0d2e39afbfb38de49e621d17bc44c15c7ef8dc40c0f64aa79
MD5 d205ed834c358bc6eedb03dbfabbbfd1
BLAKE2b-256 ec42e8778d7ea914027e8df1942ad929e8dccb8bb6ce7404710606fbe6e30a9a

See more details on using hashes here.

File details

Details for the file tree_sitter_nvmrc-0.1.1-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_nvmrc-0.1.1-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 b2762d446815553b8d0be1dc0670aae1494e27fde37f60f05d3b262857f4930b
MD5 7a42c97dda9ccab6ab9003c9ab737b4d
BLAKE2b-256 b7a34c52eba10cb979e2f16eddd2f976b34ef66dd9fb0dd7837ff2d253d0f102

See more details on using hashes here.

File details

Details for the file tree_sitter_nvmrc-0.1.1-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tree_sitter_nvmrc-0.1.1-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bb90cb07ee80030dc4af4602ba8ceeb1f3dc857057d1726778c3a18af3ad154f
MD5 f4031cefb5ae30d9ff8b830a368e41b6
BLAKE2b-256 85e8aa84c52a267c5fd742604fb8b366bf4f321d84c07a8bdf099a086ef9c935

See more details on using hashes here.

File details

Details for the file tree_sitter_nvmrc-0.1.1-cp310-abi3-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for tree_sitter_nvmrc-0.1.1-cp310-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c056599d1d31a9e84bf57812a4aee5cf4214cdab0fbd5e17dccaad620c93aadf
MD5 2c3c02693c2184083c413ceee5abb66d
BLAKE2b-256 89f6169ff78e5d239e848d5c7241d8a1eb91e433d31b226d719edc020f6e5daf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page