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.0.tar.gz (14.4 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.0-cp310-abi3-win_arm64.whl (12.0 kB view details)

Uploaded CPython 3.10+Windows ARM64

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

Uploaded CPython 3.10+Windows x86-64

tree_sitter_nvmrc-0.1.0-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.0-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.0-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.0-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.0-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.0-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.0.tar.gz.

File metadata

  • Download URL: tree_sitter_nvmrc-0.1.0.tar.gz
  • Upload date:
  • Size: 14.4 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.0.tar.gz
Algorithm Hash digest
SHA256 f2be23f7e998566ce625e04ba5be4b8c7f2d65b7fe5843d353a1497f9032db5b
MD5 15fa67fc6571ead4702e9802c7fbe0d1
BLAKE2b-256 6c9e2d4c948ebf0c68ea07c9bc062991e0ed941e618ebe351c08ae45dc3825f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_nvmrc-0.1.0-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 c60f384021979cf4ea3d13093738ba45f55646b25d358fe439da0aa1fb939b52
MD5 b031aaec97fe23d3acc62d9dc7c2bd2c
BLAKE2b-256 8cc182d3577b60faaa8047feaf8a370064a869fc15e9272644906b6e59bb01cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_nvmrc-0.1.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 31e1ae5185ed3b6a14b4863b7991c4c8032009336c7a32fb1ab57062d33c4ca6
MD5 4cad367e2164938fbbed6f368e64d51e
BLAKE2b-256 19ef3349129c84b949b6d821bb8c80eeff2b1b80b3a323cbc25836b081fad063

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_nvmrc-0.1.0-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 6ac9ce5a38b59888d46fe3cf75df6f7bce912754f48c32481bcfd7f475bc081c
MD5 bc2e73a977b80f742db38515f44bcd9c
BLAKE2b-256 b0b0e83614e628d32032d071e22a21f6e751ed7da859538ec81e6addbcd55a09

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_nvmrc-0.1.0-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 f4a3b56bcc4394e0b56ff96f02eca03416bc5d68b6333c9f3f8341304dd7a83b
MD5 8c20ad979f037c52d27ee24a420a2118
BLAKE2b-256 21a166bc7d298f03e7951aec841a49942327e92de8424793e0328079c9b0131e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_nvmrc-0.1.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0a44a4b1ca23ac4cdad90f26e15fe8c7c3b4f25922fc8eee760c92cc4bdbf901
MD5 9fb8aa5a2dae0dcdee5677822b5dd220
BLAKE2b-256 bb7322aeb1a62bdd0d8b3279925161fda01e862950c97e6c2f6bf363531edaf0

See more details on using hashes here.

File details

Details for the file tree_sitter_nvmrc-0.1.0-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.0-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 fcaf3b176ab8883d8e72084de938de162624f7fff03502cf3654aac820841a30
MD5 25a9058d7977500950c40e1258ad10b5
BLAKE2b-256 2e9f6919894259e183190a3f0a68832ca5a1c6cdeb593b474b92606eda2f924b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_nvmrc-0.1.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7f310b54bad6eb783dd0a34fd70040466ff4803c519c02c79e2b318e86f50c74
MD5 75822079aa0275e379792fe708f0b13c
BLAKE2b-256 090e479aacf216e26c55d32ae3abb71549c6eaffbf3a9798e7017b82ce51cf0d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tree_sitter_nvmrc-0.1.0-cp310-abi3-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 837b0a23b1d3aecff17ac6e80f209e3e6d15798afd304464757fc636951df4ec
MD5 0d2d8c85f8dee1a0b0da8153e75df9e5
BLAKE2b-256 af50f390f67c5c75d3044d2fca3c7f45f1d3330892e967caad74b8739aa20d43

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