nvmrc grammar for tree-sitter
Project description
tree-sitter-nvmrc
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_nvmrcinnvm.shdefines the parse: split intokey/valueon 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
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2be23f7e998566ce625e04ba5be4b8c7f2d65b7fe5843d353a1497f9032db5b
|
|
| MD5 |
15fa67fc6571ead4702e9802c7fbe0d1
|
|
| BLAKE2b-256 |
6c9e2d4c948ebf0c68ea07c9bc062991e0ed941e618ebe351c08ae45dc3825f9
|
File details
Details for the file tree_sitter_nvmrc-0.1.0-cp310-abi3-win_arm64.whl.
File metadata
- Download URL: tree_sitter_nvmrc-0.1.0-cp310-abi3-win_arm64.whl
- Upload date:
- Size: 12.0 kB
- Tags: CPython 3.10+, Windows ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c60f384021979cf4ea3d13093738ba45f55646b25d358fe439da0aa1fb939b52
|
|
| MD5 |
b031aaec97fe23d3acc62d9dc7c2bd2c
|
|
| BLAKE2b-256 |
8cc182d3577b60faaa8047feaf8a370064a869fc15e9272644906b6e59bb01cc
|
File details
Details for the file tree_sitter_nvmrc-0.1.0-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: tree_sitter_nvmrc-0.1.0-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 12.3 kB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31e1ae5185ed3b6a14b4863b7991c4c8032009336c7a32fb1ab57062d33c4ca6
|
|
| MD5 |
4cad367e2164938fbbed6f368e64d51e
|
|
| BLAKE2b-256 |
19ef3349129c84b949b6d821bb8c80eeff2b1b80b3a323cbc25836b081fad063
|
File details
Details for the file tree_sitter_nvmrc-0.1.0-cp310-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: tree_sitter_nvmrc-0.1.0-cp310-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 16.3 kB
- Tags: CPython 3.10+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ac9ce5a38b59888d46fe3cf75df6f7bce912754f48c32481bcfd7f475bc081c
|
|
| MD5 |
bc2e73a977b80f742db38515f44bcd9c
|
|
| BLAKE2b-256 |
b0b0e83614e628d32032d071e22a21f6e751ed7da859538ec81e6addbcd55a09
|
File details
Details for the file tree_sitter_nvmrc-0.1.0-cp310-abi3-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: tree_sitter_nvmrc-0.1.0-cp310-abi3-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 16.7 kB
- Tags: CPython 3.10+, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4a3b56bcc4394e0b56ff96f02eca03416bc5d68b6333c9f3f8341304dd7a83b
|
|
| MD5 |
8c20ad979f037c52d27ee24a420a2118
|
|
| BLAKE2b-256 |
21a166bc7d298f03e7951aec841a49942327e92de8424793e0328079c9b0131e
|
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
- Download URL: tree_sitter_nvmrc-0.1.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
- Upload date:
- Size: 17.1 kB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ ARM64, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a44a4b1ca23ac4cdad90f26e15fe8c7c3b4f25922fc8eee760c92cc4bdbf901
|
|
| MD5 |
9fb8aa5a2dae0dcdee5677822b5dd220
|
|
| BLAKE2b-256 |
bb7322aeb1a62bdd0d8b3279925161fda01e862950c97e6c2f6bf363531edaf0
|
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
- Download URL: tree_sitter_nvmrc-0.1.0-cp310-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
- Upload date:
- Size: 16.2 kB
- Tags: CPython 3.10+, manylinux: glibc 2.28+ x86-64, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcaf3b176ab8883d8e72084de938de162624f7fff03502cf3654aac820841a30
|
|
| MD5 |
25a9058d7977500950c40e1258ad10b5
|
|
| BLAKE2b-256 |
2e9f6919894259e183190a3f0a68832ca5a1c6cdeb593b474b92606eda2f924b
|
File details
Details for the file tree_sitter_nvmrc-0.1.0-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: tree_sitter_nvmrc-0.1.0-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 10.6 kB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f310b54bad6eb783dd0a34fd70040466ff4803c519c02c79e2b318e86f50c74
|
|
| MD5 |
75822079aa0275e379792fe708f0b13c
|
|
| BLAKE2b-256 |
090e479aacf216e26c55d32ae3abb71549c6eaffbf3a9798e7017b82ce51cf0d
|
File details
Details for the file tree_sitter_nvmrc-0.1.0-cp310-abi3-macosx_10_9_x86_64.whl.
File metadata
- Download URL: tree_sitter_nvmrc-0.1.0-cp310-abi3-macosx_10_9_x86_64.whl
- Upload date:
- Size: 10.1 kB
- Tags: CPython 3.10+, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
837b0a23b1d3aecff17ac6e80f209e3e6d15798afd304464757fc636951df4ec
|
|
| MD5 |
0d2d8c85f8dee1a0b0da8153e75df9e5
|
|
| BLAKE2b-256 |
af50f390f67c5c75d3044d2fca3c7f45f1d3330892e967caad74b8739aa20d43
|