tree-sitter-c
Advanced tools
Comparing version 0.20.8 to 0.21.0
@@ -1,19 +0,7 @@ | ||
try { | ||
module.exports = require('../../build/Release/tree_sitter_c_binding'); | ||
} catch (error1) { | ||
if (error1.code !== 'MODULE_NOT_FOUND') { | ||
throw error1; | ||
} | ||
try { | ||
module.exports = require('../../build/Debug/tree_sitter_c_binding'); | ||
} catch (error2) { | ||
if (error2.code !== 'MODULE_NOT_FOUND') { | ||
throw error2; | ||
} | ||
throw error1; | ||
} | ||
} | ||
const root = require("path").join(__dirname, "..", ".."); | ||
module.exports = require("node-gyp-build")(root); | ||
try { | ||
module.exports.nodeTypeInfo = require('../../src/node-types.json'); | ||
module.exports.nodeTypeInfo = require("../../src/node-types.json"); | ||
} catch (_) {} |
@@ -234,2 +234,3 @@ /** | ||
$._declaration_specifiers, | ||
optional($.ms_call_modifier), | ||
field('declarator', $._declarator), | ||
@@ -251,2 +252,3 @@ field('body', $.compound_statement), | ||
seq( | ||
optional($.ms_call_modifier), | ||
$._declaration_declarator, | ||
@@ -403,2 +405,3 @@ optional($.gnu_asm_expression), | ||
'(', | ||
optional($.ms_call_modifier), | ||
$._declarator, | ||
@@ -409,2 +412,3 @@ ')', | ||
'(', | ||
optional($.ms_call_modifier), | ||
$._field_declarator, | ||
@@ -415,2 +419,3 @@ ')', | ||
'(', | ||
optional($.ms_call_modifier), | ||
$._type_declarator, | ||
@@ -421,2 +426,3 @@ ')', | ||
'(', | ||
optional($.ms_call_modifier), | ||
$._abstract_declarator, | ||
@@ -462,2 +468,3 @@ ')', | ||
abstract_pointer_declarator: $ => prec.dynamic(1, prec.right(seq('*', | ||
repeat($.ms_pointer_modifier), | ||
repeat($.type_qualifier), | ||
@@ -477,3 +484,4 @@ field('declarator', optional($._abstract_declarator)), | ||
)), | ||
)), | ||
), | ||
), | ||
@@ -970,3 +978,3 @@ _function_declaration_declarator: $ => prec.right(1, | ||
'?', | ||
optional(field('consequence', $._expression)), | ||
optional(field('consequence', choice($._expression, $.comma_expression))), | ||
':', | ||
@@ -1167,3 +1175,3 @@ field('alternative', $._expression), | ||
':', | ||
commaSep(field('register', $.string_literal)), | ||
commaSep(field('register', $._string)), | ||
), | ||
@@ -1170,0 +1178,0 @@ |
{ | ||
"name": "tree-sitter-c", | ||
"version": "0.20.8", | ||
"description": "C grammar for node-tree-sitter", | ||
"version": "0.21.0", | ||
"description": "C grammar for tree-sitter", | ||
"repository": "github:tree-sitter/tree-sitter-bash", | ||
"license": "MIT", | ||
"author": "Max Brunsfeld <maxbrunsfeld@gmail.com>", | ||
"contributors": [ | ||
"Amaan Qureshi <amaanq12@gmail.com>" | ||
], | ||
"main": "bindings/node", | ||
"types": "bindings/node", | ||
"files": [ | ||
"grammar.js", | ||
"binding.gyp", | ||
"prebuilds/**", | ||
"bindings/node/*", | ||
"queries/*", | ||
"src/**" | ||
], | ||
"keywords": [ | ||
"parser", | ||
"lexer", | ||
"incremental", | ||
"parsing", | ||
"tree-sitter", | ||
"c" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/tree-sitter/tree-sitter-c.git" | ||
}, | ||
"author": "Max Brunsfeld <maxbrunsfeld@gmail.com>", | ||
"contributors": [ | ||
"Amaan Qureshi <amaanq12@gmail.com>" | ||
], | ||
"license": "MIT", | ||
"dependencies": { | ||
"nan": "^2.18.0" | ||
"node-addon-api": "^7.1.0", | ||
"node-gyp-build": "^4.8.0" | ||
}, | ||
"peerDependencies": { | ||
"tree-sitter": "^0.21.0" | ||
}, | ||
"peerDependenciesMeta": { | ||
"tree_sitter": { | ||
"optional": true | ||
} | ||
}, | ||
"devDependencies": { | ||
"eslint": "^8.56.0", | ||
"eslint-config-google": "^0.14.0", | ||
"tree-sitter-cli": "^0.20.8" | ||
"tree-sitter-cli": "^0.21.0", | ||
"prebuildify": "^6.0.0" | ||
}, | ||
"scripts": { | ||
"build": "tree-sitter generate && node-gyp build", | ||
"build": "tree-sitter generate --no-bindings", | ||
"lint": "eslint grammar.js", | ||
"test": "tree-sitter test && tree-sitter parse examples/* --quiet --time", | ||
"test-windows": "tree-sitter test" | ||
"test": "tree-sitter test", | ||
"install": "node-gyp-build", | ||
"prebuildify": "prebuildify --napi --strip" | ||
}, | ||
@@ -42,7 +60,6 @@ "tree-sitter": [ | ||
"injection-regex": "^(c|h)$", | ||
"highlights": [ | ||
"queries/highlights.scm" | ||
] | ||
"highlights": "queries/highlights.scm", | ||
"tags": "queries/tags.scm" | ||
} | ||
] | ||
} |
# tree-sitter-c | ||
[![CI](https://github.com/tree-sitter/tree-sitter-c/actions/workflows/ci.yml/badge.svg)](https://github.com/tree-sitter/tree-sitter-c/actions/workflows/ci.yml) | ||
[![Discord](https://img.shields.io/discord/1063097320771698699?logo=discord)](https://discord.gg/w7nTvsVJhm) | ||
[![Rust Crate](https://img.shields.io/crates/v/tree-sitter-c.svg)](https://crates.io/crates/tree-sitter-c) | ||
[![Node Package](https://img.shields.io/npm/v/tree-sitter-c.svg)](https://www.npmjs.com/package/tree-sitter-c) | ||
[![CI][ci]](https://github.com/tree-sitter/tree-sitter-c/actions/workflows/ci.yml) | ||
[![discord][discord]](https://discord.gg/w7nTvsVJhm) | ||
[![matrix][matrix]](https://matrix.to/#/#tree-sitter-chat:matrix.org) | ||
[![crates][crates]](https://crates.io/crates/tree-sitter-c) | ||
[![npm][npm]](https://www.npmjs.com/package/tree-sitter-c) | ||
C grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter). | ||
Adapted from [this C99 grammar](http://slps.github.io/zoo/c/iso-9899-tc3.html). | ||
[ci]: https://img.shields.io/github/actions/workflow/status/tree-sitter/tree-sitter-c/ci.yml?logo=github&label=CI | ||
[discord]: https://img.shields.io/discord/1063097320771698699?logo=discord&label=discord | ||
[matrix]: https://img.shields.io/matrix/tree-sitter-chat%3Amatrix.org?logo=matrix&label=matrix | ||
[npm]: https://img.shields.io/npm/v/tree-sitter-c?logo=npm | ||
[crates]: https://img.shields.io/crates/v/tree-sitter-c?logo=rust |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 4 instances in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8836228
15366
17
3
4
20
1
5
+ Addednode-addon-api@^7.1.0
+ Addednode-gyp-build@^4.8.0
+ Addednode-addon-api@7.1.18.3.0(transitive)
+ Addednode-gyp-build@4.8.4(transitive)
+ Addedtree-sitter@0.21.1(transitive)
- Removednan@^2.18.0
- Removednan@2.22.0(transitive)