mirror of
https://github.com/pnx/tree-sitter-dotenv
synced 2026-06-16 01:54:56 +02:00
Merge pull request #8 from pnx/dependabot/npm_and_yarn/npm-b1e5722b9b
build(deps): bump the npm group with 2 updates
This commit is contained in:
commit
d4d7c6509a
3 changed files with 32 additions and 49 deletions
20
package-lock.json
generated
20
package-lock.json
generated
|
|
@ -1,21 +1,21 @@
|
||||||
{
|
{
|
||||||
"name": "tree-sitter-dotenv",
|
"name": "tree-sitter-dotenv",
|
||||||
"version": "0.0.1",
|
"version": "0.0.5",
|
||||||
"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.5",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"node-addon-api": "^8.0.0",
|
"node-addon-api": "^8.6.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.6"
|
||||||
},
|
},
|
||||||
"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.6.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.6.0.tgz",
|
||||||
"integrity": "sha512-/bRZty2mXUIFY/xU5HLvveNHlswNJej+RnxBjOMkidWfwZzgTbPG1E3K5TOxRLOR+5hX7bSofy8yf1hZevMS8A==",
|
"integrity": "sha512-gBVjCaqDlRUk0EwoPNKzIr9KkS9041G/q31IBShPs1Xz6UTA+EXdZADbzqAJQrpDRq71CIMnOP5VMut3SL0z5Q==",
|
||||||
"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.6",
|
||||||
"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.6.tgz",
|
||||||
"integrity": "sha512-joGY67M2XUVM+ZEs7vTYmSbiDgxtwbuMf1OdKk8q1Dd6wTlbhgtU/mr3j0krBgQs2Zwom6N7vxZaqoM85b79Mw==",
|
"integrity": "sha512-aMC+NcvjGGAE63UNiaZLpcLwMT53tc6ikVLas5Edm+HmiM4NJ9wY05Nrug487gonGKdPz6e48zHsTnVEHAH1HA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
|
||||||
|
|
@ -22,12 +22,12 @@
|
||||||
"*.wasm"
|
"*.wasm"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"node-addon-api": "^8.0.0",
|
"node-addon-api": "^8.6.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.6"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"tree-sitter": "^0.21.1"
|
"tree-sitter": "^0.21.1"
|
||||||
|
|
|
||||||
57
src/tree_sitter/array.h
generated
57
src/tree_sitter/array.h
generated
|
|
@ -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`.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue