1
0
Fork 0
mirror of https://github.com/pnx/tree-sitter-dotenv synced 2026-06-16 01:54:56 +02:00

Compare commits

...

24 commits
v0.0.5 ... main

Author SHA1 Message Date
be1be5121f
Merge pull request #13 from pnx/dependabot/npm_and_yarn/npm-2b083df7eb
build(deps): bump the npm group with 2 updates
2026-05-25 12:23:40 +02:00
dependabot[bot]
dedd177c55
build(deps): bump the npm group with 2 updates
Bumps the npm group with 2 updates: [node-addon-api](https://github.com/nodejs/node-addon-api) and [tree-sitter-cli](https://github.com/tree-sitter/tree-sitter/tree/HEAD/crates/cli/npm).


Updates `node-addon-api` from 8.7.0 to 8.8.0
- [Release notes](https://github.com/nodejs/node-addon-api/releases)
- [Changelog](https://github.com/nodejs/node-addon-api/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nodejs/node-addon-api/compare/v8.7.0...v8.8.0)

Updates `tree-sitter-cli` from 0.26.8 to 0.26.9
- [Release notes](https://github.com/tree-sitter/tree-sitter/releases)
- [Commits](https://github.com/tree-sitter/tree-sitter/commits/v0.26.9/crates/cli/npm)

---
updated-dependencies:
- dependency-name: node-addon-api
  dependency-version: 8.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: tree-sitter-cli
  dependency-version: 0.26.9
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-24 11:52:53 +00:00
bed97e448a queries/highlights.scm: minor style fixes 2026-04-14 22:52:33 +02:00
0bba6d6859 v0.0.7 2026-04-14 10:29:43 +02:00
0114a48a2c v0.0.6 2026-04-13 21:44:48 +02:00
eaedb92463
Merge pull request #12 from pnx/dependabot/pip/pip-ce09a933b6
build(deps): bump the pip group with 2 updates
2026-04-12 18:59:55 +02:00
dependabot[bot]
6235e6afb5
build(deps): bump the pip group with 2 updates
Updates the requirements on [tree-sitter](https://github.com/tree-sitter/py-tree-sitter) and [setuptools](https://github.com/pypa/setuptools) to permit the latest version.

Updates `tree-sitter` to 0.25.2
- [Release notes](https://github.com/tree-sitter/py-tree-sitter/releases)
- [Commits](https://github.com/tree-sitter/py-tree-sitter/compare/v0.24.0...v0.25.2)

Updates `setuptools` to 82.0.1
- [Release notes](https://github.com/pypa/setuptools/releases)
- [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst)
- [Commits](https://github.com/pypa/setuptools/compare/v42.0.0...v82.0.1)

---
updated-dependencies:
- dependency-name: tree-sitter
  dependency-version: 0.25.2
  dependency-type: direct:development
  dependency-group: pip
- dependency-name: setuptools
  dependency-version: 82.0.1
  dependency-type: direct:development
  dependency-group: pip
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-12 11:52:56 +00:00
f3b1f1f20d
Merge pull request #11 from pnx/dependabot/npm_and_yarn/npm-d4df07ee46
build(deps): bump tree-sitter-cli from 0.26.7 to 0.26.8 in the npm group
2026-04-05 18:44:23 +02:00
dependabot[bot]
f6408ef1f3
build(deps): bump tree-sitter-cli from 0.26.7 to 0.26.8 in the npm group
Bumps the npm group with 1 update: [tree-sitter-cli](https://github.com/tree-sitter/tree-sitter/tree/HEAD/crates/cli/npm).


Updates `tree-sitter-cli` from 0.26.7 to 0.26.8
- [Release notes](https://github.com/tree-sitter/tree-sitter/releases)
- [Commits](https://github.com/tree-sitter/tree-sitter/commits/v0.26.8/crates/cli/npm)

---
updated-dependencies:
- dependency-name: tree-sitter-cli
  dependency-version: 0.26.8
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-05 11:52:45 +00:00
fe14ae318e
Merge pull request #10 from pnx/dependabot/npm_and_yarn/npm-4a653acbba
build(deps): bump node-addon-api from 8.6.0 to 8.7.0 in the npm group
2026-03-29 19:06:50 +02:00
dependabot[bot]
971995ce53
build(deps): bump node-addon-api from 8.6.0 to 8.7.0 in the npm group
Bumps the npm group with 1 update: [node-addon-api](https://github.com/nodejs/node-addon-api).


Updates `node-addon-api` from 8.6.0 to 8.7.0
- [Release notes](https://github.com/nodejs/node-addon-api/releases)
- [Changelog](https://github.com/nodejs/node-addon-api/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nodejs/node-addon-api/compare/v8.6.0...v8.7.0)

---
updated-dependencies:
- dependency-name: node-addon-api
  dependency-version: 8.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-29 11:52:35 +00:00
783a064b8b
Merge pull request #9 from pnx/dependabot/npm_and_yarn/npm-7dfa3f94ba
build(deps): bump tree-sitter-cli from 0.26.6 to 0.26.7 in the npm group
2026-03-17 08:16:00 +01:00
dependabot[bot]
e26c385655
build(deps): bump tree-sitter-cli from 0.26.6 to 0.26.7 in the npm group
Bumps the npm group with 1 update: [tree-sitter-cli](https://github.com/tree-sitter/tree-sitter/tree/HEAD/crates/cli/npm).


Updates `tree-sitter-cli` from 0.26.6 to 0.26.7
- [Release notes](https://github.com/tree-sitter/tree-sitter/releases)
- [Commits](https://github.com/tree-sitter/tree-sitter/commits/v0.26.7/crates/cli/npm)

---
updated-dependencies:
- dependency-name: tree-sitter-cli
  dependency-version: 0.26.7
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-15 11:52:38 +00:00
d4d7c6509a
Merge pull request #8 from pnx/dependabot/npm_and_yarn/npm-b1e5722b9b
build(deps): bump the npm group with 2 updates
2026-03-01 16:19:08 +01:00
5eaa7a8b57
Merge pull request #7 from pnx/dependabot/github_actions/actions-674967a53d
ci: bump actions/upload-artifact from 6 to 7 in the actions group
2026-03-01 16:18:53 +01:00
dependabot[bot]
1be5c56459 build: regenerate parser [dependabot skip] 2026-03-01 11:59:41 +00:00
dependabot[bot]
b6ca577bd3
build(deps): bump the npm group with 2 updates
Bumps the npm group with 2 updates: [node-addon-api](https://github.com/nodejs/node-addon-api) and [tree-sitter-cli](https://github.com/tree-sitter/tree-sitter/tree/HEAD/crates/cli/npm).


Updates `node-addon-api` from 8.5.0 to 8.6.0
- [Release notes](https://github.com/nodejs/node-addon-api/releases)
- [Changelog](https://github.com/nodejs/node-addon-api/blob/main/CHANGELOG.md)
- [Commits](https://github.com/nodejs/node-addon-api/compare/v8.5.0...v8.6.0)

Updates `tree-sitter-cli` from 0.26.5 to 0.26.6
- [Release notes](https://github.com/tree-sitter/tree-sitter/releases)
- [Commits](https://github.com/tree-sitter/tree-sitter/commits/v0.26.6/crates/cli/npm)

---
updated-dependencies:
- dependency-name: node-addon-api
  dependency-version: 8.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: npm
- dependency-name: tree-sitter-cli
  dependency-version: 0.26.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: npm
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-01 11:59:19 +00:00
dependabot[bot]
127f2abf33
ci: bump actions/upload-artifact from 6 to 7 in the actions group
Bumps the actions group with 1 update: [actions/upload-artifact](https://github.com/actions/upload-artifact).


Updates `actions/upload-artifact` from 6 to 7
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-01 11:58:58 +00:00
f6432aac35
Merge pull request #6 from pnx/dependabot/github_actions/actions-229d4e1b45
ci: bump the actions group with 2 updates
2026-02-08 09:53:18 +01:00
dependabot[bot]
d3c87eb8b1
ci: bump the actions group with 2 updates
Bumps the actions group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [actions/upload-artifact](https://github.com/actions/upload-artifact).


Updates `actions/checkout` from 4 to 6
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v6)

Updates `actions/upload-artifact` from 4 to 6
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-08 08:52:51 +00:00
a97968392d
Merge pull request #5 from pnx/dependabot/go_modules/go-fe18591071
build(deps): bump github.com/tree-sitter/go-tree-sitter from 0.24.0 to 0.25.0 in the go group
2026-02-08 09:52:41 +01:00
dependabot[bot]
6118d6004d
build(deps): bump github.com/tree-sitter/go-tree-sitter in the go group
Bumps the go group with 1 update: [github.com/tree-sitter/go-tree-sitter](https://github.com/tree-sitter/go-tree-sitter).


Updates `github.com/tree-sitter/go-tree-sitter` from 0.24.0 to 0.25.0
- [Commits](https://github.com/tree-sitter/go-tree-sitter/commits)

---
updated-dependencies:
- dependency-name: github.com/tree-sitter/go-tree-sitter
  dependency-version: 0.25.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: go
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-08 08:52:19 +00:00
ca2d33feb0
Merge pull request #4 from pnx/dependabot/npm_and_yarn/tar-fs-2.1.4
Bump tar-fs from 2.1.1 to 2.1.4
2026-02-08 09:50:55 +01:00
dependabot[bot]
e045d7924d
Bump tar-fs from 2.1.1 to 2.1.4
Bumps [tar-fs](https://github.com/mafintosh/tar-fs) from 2.1.1 to 2.1.4.
- [Commits](https://github.com/mafintosh/tar-fs/compare/v2.1.1...v2.1.4)

---
updated-dependencies:
- dependency-name: tar-fs
  dependency-version: 2.1.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-08 00:58:33 +00:00
13 changed files with 79 additions and 96 deletions

View file

@ -30,7 +30,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest] os: [ubuntu-latest, windows-latest, macos-latest]
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v6
- name: Set up tree-sitter - name: Set up tree-sitter
uses: tree-sitter/setup-action/cli@v2 uses: tree-sitter/setup-action/cli@v2
- name: Run parser and binding tests - name: Run parser and binding tests
@ -43,7 +43,7 @@ jobs:
with: with:
files: examples/** files: examples/**
- name: Upload failures artifact - name: Upload failures artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v7
if: "!cancelled() && steps.parse-files.outcome == 'failure'" if: "!cancelled() && steps.parse-files.outcome == 'failure'"
with: with:
name: failures-${{runner.os}} name: failures-${{runner.os}}
@ -53,7 +53,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v6
with: with:
fetch-depth: 2 fetch-depth: 2
- name: Check for scanner changes - name: Check for scanner changes

View file

@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.13) cmake_minimum_required(VERSION 3.13)
project(tree-sitter-dotenv project(tree-sitter-dotenv
VERSION "0.0.5" VERSION "0.0.7"
DESCRIPTION "Dotenv grammar for tree-sitter" DESCRIPTION "Dotenv grammar for tree-sitter"
HOMEPAGE_URL "https://github.com/pnx/tree-sitter-dotenv" HOMEPAGE_URL "https://github.com/pnx/tree-sitter-dotenv"
LANGUAGES C) LANGUAGES C)

View file

@ -1,7 +1,7 @@
[package] [package]
name = "tree-sitter-dotenv" name = "tree-sitter-dotenv"
description = "Dotenv grammar for tree-sitter" description = "Dotenv grammar for tree-sitter"
version = "0.0.5" version = "0.0.7"
license = "MIT" license = "MIT"
readme = "README.md" readme = "README.md"
keywords = ["incremental", "parsing", "tree-sitter", "dotenv"] keywords = ["incremental", "parsing", "tree-sitter", "dotenv"]

2
Makefile generated
View file

@ -2,7 +2,7 @@ ifeq ($(OS),Windows_NT)
$(error Windows is not supported) $(error Windows is not supported)
endif endif
VERSION := 0.0.5 VERSION := 0.0.7
LANGUAGE_NAME := tree-sitter-dotenv LANGUAGE_NAME := tree-sitter-dotenv

4
go.mod
View file

@ -1,7 +1,7 @@
module github.com/pnx/tree-sitter-dotenv module github.com/pnx/tree-sitter-dotenv
go 1.22 go 1.23
require github.com/tree-sitter/go-tree-sitter v0.24.0 require github.com/tree-sitter/go-tree-sitter v0.25.0
require github.com/mattn/go-pointer v0.0.1 // indirect require github.com/mattn/go-pointer v0.0.1 // indirect

56
go.sum
View file

@ -4,33 +4,33 @@ github.com/mattn/go-pointer v0.0.1 h1:n+XhsuGeVO6MEAp7xyEukFINEa+Quek5psIR/ylA6o
github.com/mattn/go-pointer v0.0.1/go.mod h1:2zXcozF6qYGgmsG+SeTZz3oAbFLdD3OWqnUbNvJZAlc= github.com/mattn/go-pointer v0.0.1/go.mod h1:2zXcozF6qYGgmsG+SeTZz3oAbFLdD3OWqnUbNvJZAlc=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/tree-sitter/go-tree-sitter v0.24.0 h1:kRZb6aBNfcI/u0Qh8XEt3zjNVnmxTisDBN+kXK0xRYQ= github.com/tree-sitter/go-tree-sitter v0.25.0 h1:sx6kcg8raRFCvc9BnXglke6axya12krCJF5xJ2sftRU=
github.com/tree-sitter/go-tree-sitter v0.24.0/go.mod h1:x681iFVoLMEwOSIHA1chaLkXlroXEN7WY+VHGFaoDbk= github.com/tree-sitter/go-tree-sitter v0.25.0/go.mod h1:r77ig7BikoZhHrrsjAnv8RqGti5rtSyvDHPzgTPsUuU=
github.com/tree-sitter/tree-sitter-c v0.21.5-0.20240818205408-927da1f210eb h1:A8425heRM8mylnv4H58FPUiH+aYivyitre0PzxrfmWs= github.com/tree-sitter/tree-sitter-c v0.23.4 h1:nBPH3FV07DzAD7p0GfNvXM+Y7pNIoPenQWBpvM++t4c=
github.com/tree-sitter/tree-sitter-c v0.21.5-0.20240818205408-927da1f210eb/go.mod h1:dOF6gtQiF9UwNh995T5OphYmtIypkjsp3ap7r9AN/iA= github.com/tree-sitter/tree-sitter-c v0.23.4/go.mod h1:MkI5dOiIpeN94LNjeCp8ljXN/953JCwAby4bClMr6bw=
github.com/tree-sitter/tree-sitter-cpp v0.22.4-0.20240818224355-b1a4e2b25148 h1:AfFPZwtwGN01BW1jDdqBVqscTwetvMpydqYZz57RSlc= github.com/tree-sitter/tree-sitter-cpp v0.23.4 h1:LaWZsiqQKvR65yHgKmnaqA+uz6tlDJTJFCyFIeZU/8w=
github.com/tree-sitter/tree-sitter-cpp v0.22.4-0.20240818224355-b1a4e2b25148/go.mod h1:Bh6U3viD57rFXRYIQ+kmiYtr+1Bx0AceypDLJJSyi9s= github.com/tree-sitter/tree-sitter-cpp v0.23.4/go.mod h1:doqNW64BriC7WBCQ1klf0KmJpdEvfxyXtoEybnBo6v8=
github.com/tree-sitter/tree-sitter-embedded-template v0.21.1-0.20240819044651-ffbf64942c33 h1:TwqSV3qLp3tKSqirGLRHnjFk9Tc2oy57LIl+FQ4GjI4= github.com/tree-sitter/tree-sitter-embedded-template v0.23.2 h1:nFkkH6Sbe56EXLmZBqHHcamTpmz3TId97I16EnGy4rg=
github.com/tree-sitter/tree-sitter-embedded-template v0.21.1-0.20240819044651-ffbf64942c33/go.mod h1:CvCKCt3v04Ufos1zZnNCelBDeCGRpPucaN8QczoUsN4= github.com/tree-sitter/tree-sitter-embedded-template v0.23.2/go.mod h1:HNPOhN0qF3hWluYLdxWs5WbzP/iE4aaRVPMsdxuzIaQ=
github.com/tree-sitter/tree-sitter-go v0.21.3-0.20240818010209-8c0f0e7a6012 h1:Xvxck3tE5FW7F7bTS97iNM2ADMyCMJztVqn5HYKdJGo= github.com/tree-sitter/tree-sitter-go v0.23.4 h1:yt5KMGnTHS+86pJmLIAZMWxukr8W7Ae1STPvQUuNROA=
github.com/tree-sitter/tree-sitter-go v0.21.3-0.20240818010209-8c0f0e7a6012/go.mod h1:T40D0O1cPvUU/+AmiXVXy1cncYQT6wem4Z0g4SfAYvY= github.com/tree-sitter/tree-sitter-go v0.23.4/go.mod h1:Jrx8QqYN0v7npv1fJRH1AznddllYiCMUChtVjxPK040=
github.com/tree-sitter/tree-sitter-html v0.20.5-0.20240818004741-d11201a263d0 h1:c46K6uh5Dz00zJeU9BfjXdb8I+E4RkUdfnWJpQADXFo= github.com/tree-sitter/tree-sitter-html v0.23.2 h1:1UYDV+Yd05GGRhVnTcbP58GkKLSHHZwVaN+lBZV11Lc=
github.com/tree-sitter/tree-sitter-html v0.20.5-0.20240818004741-d11201a263d0/go.mod h1:hcNt/kOJHcIcuMvouE7LJcYdeFUFbVpBJ6d4wmOA+tU= github.com/tree-sitter/tree-sitter-html v0.23.2/go.mod h1:gpUv/dG3Xl/eebqgeYeFMt+JLOY9cgFinb/Nw08a9og=
github.com/tree-sitter/tree-sitter-java v0.21.1-0.20240824015150-576d8097e495 h1:jrt4qbJVEFs4H93/ITxygHc6u0TGqAkkate7TQ4wFSA= github.com/tree-sitter/tree-sitter-java v0.23.5 h1:J9YeMGMwXYlKSP3K4Us8CitC6hjtMjqpeOf2GGo6tig=
github.com/tree-sitter/tree-sitter-java v0.21.1-0.20240824015150-576d8097e495/go.mod h1:oyaR7fLnRV0hT9z6qwE9GkaeTom/hTDwK3H2idcOJFc= github.com/tree-sitter/tree-sitter-java v0.23.5/go.mod h1:NRKlI8+EznxA7t1Yt3xtraPk1Wzqh3GAIC46wxvc320=
github.com/tree-sitter/tree-sitter-javascript v0.21.5-0.20240818005344-15887341e5b5 h1:om4X9AVg3asL8gxNJDcz4e/Wp+VpQj1PY3uJXKr6EOg= github.com/tree-sitter/tree-sitter-javascript v0.23.1 h1:1fWupaRC0ArlHJ/QJzsfQ3Ibyopw7ZfQK4xXc40Zveo=
github.com/tree-sitter/tree-sitter-javascript v0.21.5-0.20240818005344-15887341e5b5/go.mod h1:nNqgPoV/h9uYWk6kYEFdEAhNVOacpfpRW5SFmdaP4tU= github.com/tree-sitter/tree-sitter-javascript v0.23.1/go.mod h1:lmGD1EJdCA+v0S1u2fFgepMg/opzSg/4pgFym2FPGAs=
github.com/tree-sitter/tree-sitter-json v0.21.1-0.20240818005659-bdd69eb8c8a5 h1:pfV3G3k7NCKqKk8THBmyuh2zA33lgYHS3GVrzRR8ry4= github.com/tree-sitter/tree-sitter-json v0.24.8 h1:tV5rMkihgtiOe14a9LHfDY5kzTl5GNUYe6carZBn0fQ=
github.com/tree-sitter/tree-sitter-json v0.21.1-0.20240818005659-bdd69eb8c8a5/go.mod h1:GbMKRjLfk0H+PI7nLi1Sx5lHf5wCpLz9al8tQYSxpEk= github.com/tree-sitter/tree-sitter-json v0.24.8/go.mod h1:F351KK0KGvCaYbZ5zxwx/gWWvZhIDl0eMtn+1r+gQbo=
github.com/tree-sitter/tree-sitter-php v0.22.9-0.20240819002312-a552625b56c1 h1:ZXZMDwE+IhUtGug4Brv6NjJWUU3rfkZBKpemf6RY8/g= github.com/tree-sitter/tree-sitter-php v0.23.11 h1:iHewsLNDmznh8kgGyfWfujsZxIz1YGbSd2ZTEM0ZiP8=
github.com/tree-sitter/tree-sitter-php v0.22.9-0.20240819002312-a552625b56c1/go.mod h1:UKCLuYnJ312Mei+3cyTmGOHzn0YAnaPRECgJmHtzrqs= github.com/tree-sitter/tree-sitter-php v0.23.11/go.mod h1:T/kbfi+UcCywQfUNAJnGTN/fMSUjnwPXA8k4yoIks74=
github.com/tree-sitter/tree-sitter-python v0.21.1-0.20240818005537-55a9b8a4fbfb h1:EXEM82lFM7JjJb6qiKZXkpIDaCcbV2obNn82ghwj9lw= github.com/tree-sitter/tree-sitter-python v0.23.6 h1:qHnWFR5WhtMQpxBZRwiaU5Hk/29vGju6CVtmvu5Haas=
github.com/tree-sitter/tree-sitter-python v0.21.1-0.20240818005537-55a9b8a4fbfb/go.mod h1:lXCF1nGG5Dr4J3BTS0ObN4xJCCICiSu/b+Xe/VqMV7g= github.com/tree-sitter/tree-sitter-python v0.23.6/go.mod h1:cpdthSy/Yoa28aJFBscFHlGiU+cnSiSh1kuDVtI8YeM=
github.com/tree-sitter/tree-sitter-ruby v0.21.1-0.20240818211811-7dbc1e2d0e2d h1:fcYCvoXdcP1uRQYXqJHRy6Hec+uKScQdKVtMwK9JeCI= github.com/tree-sitter/tree-sitter-ruby v0.23.1 h1:T/NKHUA+iVbHM440hFx+lzVOzS4dV6z8Qw8ai+72bYo=
github.com/tree-sitter/tree-sitter-ruby v0.21.1-0.20240818211811-7dbc1e2d0e2d/go.mod h1:T1nShQ4v5AJtozZ8YyAS4uzUtDAJj/iv4YfwXSbUHzg= github.com/tree-sitter/tree-sitter-ruby v0.23.1/go.mod h1:kUS4kCCQloFcdX6sdpr8p6r2rogbM6ZjTox5ZOQy8cA=
github.com/tree-sitter/tree-sitter-rust v0.21.3-0.20240818005432-2b43eafe6447 h1:o9alBu1J/WjrcTKEthYtXmdkDc5OVXD+PqlvnEZ0Lzc= github.com/tree-sitter/tree-sitter-rust v0.23.2 h1:6AtoooCW5GqNrRpfnvl0iUhxTAZEovEmLKDbyHlfw90=
github.com/tree-sitter/tree-sitter-rust v0.21.3-0.20240818005432-2b43eafe6447/go.mod h1:1Oh95COkkTn6Ezp0vcMbvfhRP5gLeqqljR0BYnBzWvc= github.com/tree-sitter/tree-sitter-rust v0.23.2/go.mod h1:hfeGWic9BAfgTrc7Xf6FaOAguCFJRo3RBbs7QJ6D7MI=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

20
package-lock.json generated
View file

@ -1,21 +1,21 @@
{ {
"name": "tree-sitter-dotenv", "name": "tree-sitter-dotenv",
"version": "0.0.1", "version": "0.0.7",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "tree-sitter-dotenv", "name": "tree-sitter-dotenv",
"version": "0.0.1", "version": "0.0.7",
"hasInstallScript": true, "hasInstallScript": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"node-addon-api": "^8.0.0", "node-addon-api": "^8.8.0",
"node-gyp-build": "^4.8.1" "node-gyp-build": "^4.8.1"
}, },
"devDependencies": { "devDependencies": {
"prebuildify": "^6.0.1", "prebuildify": "^6.0.1",
"tree-sitter-cli": "^0.26.5" "tree-sitter-cli": "^0.26.9"
}, },
"peerDependencies": { "peerDependencies": {
"tree-sitter": "^0.21.1" "tree-sitter": "^0.21.1"
@ -167,9 +167,9 @@
} }
}, },
"node_modules/node-addon-api": { "node_modules/node-addon-api": {
"version": "8.5.0", "version": "8.8.0",
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.5.0.tgz", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.8.0.tgz",
"integrity": "sha512-/bRZty2mXUIFY/xU5HLvveNHlswNJej+RnxBjOMkidWfwZzgTbPG1E3K5TOxRLOR+5hX7bSofy8yf1hZevMS8A==", "integrity": "sha512-c5Ko1fZJIJmzhFIkhRN76WTq+fC6tWnGy9CXA0fA+XygsWZmEwG8vmbkNqxMyoaa0Tin4djul49NzdVcJJcjeA==",
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": "^18 || ^20 || >= 21" "node": "^18 || ^20 || >= 21"
@ -338,9 +338,9 @@
} }
}, },
"node_modules/tree-sitter-cli": { "node_modules/tree-sitter-cli": {
"version": "0.26.5", "version": "0.26.9",
"resolved": "https://registry.npmjs.org/tree-sitter-cli/-/tree-sitter-cli-0.26.5.tgz", "resolved": "https://registry.npmjs.org/tree-sitter-cli/-/tree-sitter-cli-0.26.9.tgz",
"integrity": "sha512-joGY67M2XUVM+ZEs7vTYmSbiDgxtwbuMf1OdKk8q1Dd6wTlbhgtU/mr3j0krBgQs2Zwom6N7vxZaqoM85b79Mw==", "integrity": "sha512-7l+U1RmazPVe+yA/JiX80GFOILnL/j24GbawamIzNQC8UlINrcyECbaWGaG1wuq4j/m0DQTx7Uu4r0iW9Ao1BQ==",
"dev": true, "dev": true,
"hasInstallScript": true, "hasInstallScript": true,
"license": "MIT", "license": "MIT",

View file

@ -1,6 +1,6 @@
{ {
"name": "tree-sitter-dotenv", "name": "tree-sitter-dotenv",
"version": "0.0.5", "version": "0.0.7",
"description": "Dotenv grammar for tree-sitter", "description": "Dotenv grammar for tree-sitter",
"repository": "github:pnx/tree-sitter-dotenv", "repository": "github:pnx/tree-sitter-dotenv",
"license": "MIT", "license": "MIT",
@ -22,12 +22,12 @@
"*.wasm" "*.wasm"
], ],
"dependencies": { "dependencies": {
"node-addon-api": "^8.0.0", "node-addon-api": "^8.8.0",
"node-gyp-build": "^4.8.1" "node-gyp-build": "^4.8.1"
}, },
"devDependencies": { "devDependencies": {
"prebuildify": "^6.0.1", "prebuildify": "^6.0.1",
"tree-sitter-cli": "^0.26.5" "tree-sitter-cli": "^0.26.9"
}, },
"peerDependencies": { "peerDependencies": {
"tree-sitter": "^0.21.1" "tree-sitter": "^0.21.1"

View file

@ -1,11 +1,11 @@
[build-system] [build-system]
requires = ["setuptools>=42", "wheel"] requires = ["setuptools>=82.0.1", "wheel"]
build-backend = "setuptools.build_meta" build-backend = "setuptools.build_meta"
[project] [project]
name = "tree-sitter-dotenv" name = "tree-sitter-dotenv"
description = "Dotenv grammar for tree-sitter" description = "Dotenv grammar for tree-sitter"
version = "0.0.5" version = "0.0.7"
keywords = ["incremental", "parsing", "tree-sitter", "dotenv"] keywords = ["incremental", "parsing", "tree-sitter", "dotenv"]
classifiers = [ classifiers = [
"Intended Audience :: Developers", "Intended Audience :: Developers",
@ -22,7 +22,7 @@ readme = "README.md"
Homepage = "https://github.com/pnx/tree-sitter-dotenv" Homepage = "https://github.com/pnx/tree-sitter-dotenv"
[project.optional-dependencies] [project.optional-dependencies]
core = ["tree-sitter~=0.24"] core = ["tree-sitter~=0.25"]
[tool.cibuildwheel] [tool.cibuildwheel]
build = "cp310-*" build = "cp310-*"

View file

@ -1,16 +1,16 @@
"=" @operator "=" @operator
(comment) @comment
(boolean) @constant (boolean) @constant
(number) @number (number) @number
(string) @string [
(string)
(value)
] @string
[ [
(identifier) (identifier)
(variable) (variable)
] @variable ] @variable
(value) @string
(comment) @comment

2
src/parser.c generated
View file

@ -1018,7 +1018,7 @@ TS_PUBLIC const TSLanguage *tree_sitter_dotenv(void) {
.metadata = { .metadata = {
.major_version = 0, .major_version = 0,
.minor_version = 0, .minor_version = 0,
.patch_version = 5, .patch_version = 7,
}, },
}; };
return &language; return &language;

View file

@ -60,7 +60,13 @@ extern "C" {
/// Free any memory allocated for this array. Note that this does not free any /// Free any memory allocated for this array. Note that this does not free any
/// memory allocated for the array's contents. /// memory allocated for the array's contents.
#define array_delete(self) _array__delete((self), (void *)(self)->contents, sizeof(*self)) #define array_delete(self) \
do { \
if ((self)->contents) ts_free((self)->contents); \
(self)->contents = NULL; \
(self)->size = 0; \
(self)->capacity = 0; \
} while (0)
/// Push a new `element` onto the end of the array. /// Push a new `element` onto the end of the array.
#define array_push(self, element) \ #define array_push(self, element) \
@ -130,12 +136,11 @@ extern "C" {
/// Swap one array with another /// Swap one array with another
#define array_swap(self, other) \ #define array_swap(self, other) \
do { \ do { \
struct Swap swapped_contents = _array__swap( \ void *_array_swap_tmp = (void *)(self)->contents; \
(void *)(self)->contents, &(self)->size, &(self)->capacity, \ (self)->contents = (other)->contents; \
(void *)(other)->contents, &(other)->size, &(other)->capacity \ (other)->contents = _array_swap_tmp; \
); \ _array__swap(&(self)->size, &(self)->capacity, \
(self)->contents = swapped_contents.self_contents; \ &(other)->size, &(other)->capacity); \
(other)->contents = swapped_contents.other_contents; \
} while (0) } while (0)
/// Get the size of the array contents /// Get the size of the array contents
@ -188,12 +193,6 @@ extern "C" {
// The `Array` type itself was not altered as a solution in order to avoid breakage // The `Array` type itself was not altered as a solution in order to avoid breakage
// with existing consumers (in particular, parsers with external scanners). // with existing consumers (in particular, parsers with external scanners).
/// This is not what you're looking for, see `array_delete`.
static inline void _array__delete(void *self, void *contents, size_t self_size) {
if (contents) ts_free(contents);
if (self) memset(self, 0, self_size);
}
/// This is not what you're looking for, see `array_erase`. /// This is not what you're looking for, see `array_erase`.
static inline void _array__erase(void* self_contents, uint32_t *size, static inline void _array__erase(void* self_contents, uint32_t *size,
size_t element_size, uint32_t index) { size_t element_size, uint32_t index) {
@ -228,31 +227,15 @@ static inline void *_array__assign(void* self_contents, uint32_t *self_size, uin
return new_contents; return new_contents;
} }
struct Swap {
void *self_contents;
void *other_contents;
};
/// This is not what you're looking for, see `array_swap`. /// This is not what you're looking for, see `array_swap`.
// static inline void _array__swap(Array *self, Array *other) { static inline void _array__swap(uint32_t *self_size, uint32_t *self_capacity,
static inline struct Swap _array__swap(void *self_contents, uint32_t *self_size, uint32_t *self_capacity, uint32_t *other_size, uint32_t *other_capacity) {
void *other_contents, uint32_t *other_size, uint32_t *other_capacity) { uint32_t tmp_size = *self_size;
void *new_self_contents = other_contents; uint32_t tmp_capacity = *self_capacity;
uint32_t new_self_size = *other_size; *self_size = *other_size;
uint32_t new_self_capacity = *other_capacity; *self_capacity = *other_capacity;
*other_size = tmp_size;
void *new_other_contents = self_contents; *other_capacity = tmp_capacity;
*other_size = *self_size;
*other_capacity = *self_capacity;
*self_size = new_self_size;
*self_capacity = new_self_capacity;
struct Swap out = {
.self_contents = new_self_contents,
.other_contents = new_other_contents,
};
return out;
} }
/// This is not what you're looking for, see `array_push` or `array_grow_by`. /// This is not what you're looking for, see `array_push` or `array_grow_by`.

View file

@ -15,7 +15,7 @@
} }
], ],
"metadata": { "metadata": {
"version": "0.0.5", "version": "0.0.7",
"license": "MIT", "license": "MIT",
"description": "Dotenv grammar for tree-sitter", "description": "Dotenv grammar for tree-sitter",
"authors": [ "authors": [